provider

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package provider implements the core.Provider interface for all supported upstream LLM providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenCodeGoProvider

type OpenCodeGoProvider struct {
	// contains filtered or unexported fields
}

OpenCodeGoProvider implements core.Provider for the OpenCode Go backend.

func NewOpenCodeGoProvider

func NewOpenCodeGoProvider(atomic *config.AtomicConfig) *OpenCodeGoProvider

NewOpenCodeGoProvider creates a new OpenCodeGoProvider.

func (*OpenCodeGoProvider) Capabilities

func (p *OpenCodeGoProvider) Capabilities() core.ProviderCapabilities

Capabilities returns provider-level capabilities.

func (*OpenCodeGoProvider) Execute

Execute sends a non-streaming request and returns the response.

func (*OpenCodeGoProvider) ModelCapabilities

func (p *OpenCodeGoProvider) ModelCapabilities(modelID string) (core.ProviderCapabilities, bool)

ModelCapabilities returns per-model capabilities. Returns false if unknown.

func (*OpenCodeGoProvider) Name

func (p *OpenCodeGoProvider) Name() string

Name returns the provider identifier.

func (*OpenCodeGoProvider) RoundTripName

func (p *OpenCodeGoProvider) RoundTripName(model config.ModelConfig) string

RoundTripName returns the model ID to use in the upstream request.

func (*OpenCodeGoProvider) Stream

Stream sends a streaming request and returns an io.ReadCloser for SSE events.

func (*OpenCodeGoProvider) StreamIdleTimeout

func (p *OpenCodeGoProvider) StreamIdleTimeout(model config.ModelConfig) time.Duration

StreamIdleTimeout returns the maximum gap between bytes on an active stream.

func (*OpenCodeGoProvider) WireFormat

func (p *OpenCodeGoProvider) WireFormat(modelID string) core.WireFormat

WireFormat returns the wire format for the given model on the Go provider.

type OpenCodeZenProvider

type OpenCodeZenProvider struct {
	// contains filtered or unexported fields
}

OpenCodeZenProvider implements core.Provider for the OpenCode Zen backend. Zen supports four wire formats determined by model ID: Anthropic (Claude, Qwen), Responses (GPT), Gemini, and Chat Completions (everything else).

func NewOpenCodeZenProvider

func NewOpenCodeZenProvider(atomic *config.AtomicConfig) *OpenCodeZenProvider

NewOpenCodeZenProvider creates a new OpenCodeZenProvider.

func (*OpenCodeZenProvider) Capabilities

func (p *OpenCodeZenProvider) Capabilities() core.ProviderCapabilities

Capabilities returns provider-level capabilities.

func (*OpenCodeZenProvider) Execute

Execute sends a non-streaming request and returns the response.

func (*OpenCodeZenProvider) ModelCapabilities

func (p *OpenCodeZenProvider) ModelCapabilities(modelID string) (core.ProviderCapabilities, bool)

ModelCapabilities returns per-model capabilities.

func (*OpenCodeZenProvider) Name

func (p *OpenCodeZenProvider) Name() string

Name returns the provider identifier.

func (*OpenCodeZenProvider) RoundTripName

func (p *OpenCodeZenProvider) RoundTripName(model config.ModelConfig) string

RoundTripName returns the model ID to use in the upstream request.

func (*OpenCodeZenProvider) Stream

Stream sends a streaming request and returns an io.ReadCloser for SSE events.

func (*OpenCodeZenProvider) StreamIdleTimeout

func (p *OpenCodeZenProvider) StreamIdleTimeout(model config.ModelConfig) time.Duration

StreamIdleTimeout returns the maximum gap between bytes on an active stream.

func (*OpenCodeZenProvider) WireFormat

func (p *OpenCodeZenProvider) WireFormat(modelID string) core.WireFormat

WireFormat returns the wire format for the given model on Zen. This replaces the old client.ClassifyEndpoint function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL