provider

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: AGPL-3.0 Imports: 15 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 AWSBedrockProvider added in v0.3.6

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

AWSBedrockProvider implements core.Provider for the AWS Bedrock Mantle backend. Bedrock Mantle exposes OpenAI-compatible and optionally Anthropic-compatible endpoints.

func NewAWSBedrockProvider added in v0.3.6

func NewAWSBedrockProvider(atomic *config.AtomicConfig) *AWSBedrockProvider

NewAWSBedrockProvider creates a new AWSBedrockProvider.

func (*AWSBedrockProvider) Capabilities added in v0.3.6

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

Capabilities returns provider-level capabilities.

func (*AWSBedrockProvider) Execute added in v0.3.6

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

func (*AWSBedrockProvider) ModelCapabilities added in v0.3.6

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

ModelCapabilities returns per-model capabilities. Returns true for all models since Bedrock hosts many different model families.

func (*AWSBedrockProvider) Name added in v0.3.6

func (p *AWSBedrockProvider) Name() string

Name returns the provider identifier.

func (*AWSBedrockProvider) RoundTripName added in v0.3.6

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

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

func (*AWSBedrockProvider) Stream added in v0.3.6

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

func (*AWSBedrockProvider) StreamIdleTimeout added in v0.3.6

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

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

func (*AWSBedrockProvider) WireFormat added in v0.3.6

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

WireFormat returns the wire format for Bedrock models. Defaults to OpenAI Chat Completions. Set wire_format: "anthropic" in aws_bedrock config for models that need raw Anthropic Messages format.

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