auto

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package auto provides zero-config service construction on top of llm.Service.

Index

Constants

View Source
const (
	ProviderClaude     = "claude"
	ProviderBedrock    = "bedrock"
	ProviderCodex      = "codex"
	ProviderOpenAI     = "openai"
	ProviderOpenRouter = "openrouter"
	ProviderAnthropic  = "anthropic"
	ProviderMiniMax    = "minimax"
	ProviderOllama     = "ollama"
	ProviderDockerMR   = "dockermr"
)

Provider type names.

View Source
const (
	EnvOpenAIKey     = "OPENAI_API_KEY"
	EnvOpenAIKeyAlt  = "OPENAI_KEY"
	EnvOpenRouterKey = "OPENROUTER_API_KEY"
	EnvAnthropicKey  = "ANTHROPIC_API_KEY"
	EnvMiniMaxKey    = "MINIMAX_API_KEY"
)

Environment variable names.

View Source
const (
	AliasFast     = "fast"
	AliasDefault  = "default"
	AliasPowerful = "powerful"
)

Built-in top-level aliases provided by provider/auto.

View Source
const (
	AliasCodex = "codex"
)

Common provider/user alias names.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, opts ...Option) (*llm.Service, error)

New creates a Service configured from explicit provider requests and/or auto-detected providers. This is the preferred zero-config entry point.

Types

type Option

type Option func(*config)

func WithAnthropic

func WithAnthropic() Option

func WithBedrock

func WithBedrock() Option

func WithClaude

func WithClaude(store claude.TokenStore) Option

func WithClaudeAccount

func WithClaudeAccount(name string, store claude.TokenStore) Option

func WithClaudeLocal

func WithClaudeLocal() Option

func WithCodexLocal

func WithCodexLocal() Option

func WithDockerModelRunner

func WithDockerModelRunner(opts ...llm.Option) Option

func WithGlobalAlias

func WithGlobalAlias(alias string, targets ...string) Option

func WithGlobalAliases

func WithGlobalAliases(aliases map[string][]string) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithLLMOptions

func WithLLMOptions(opts ...llm.Option) Option

func WithName

func WithName(name string) Option

func WithOllama

func WithOllama() Option

func WithOpenAI

func WithOpenAI() Option

func WithOpenRouter

func WithOpenRouter() Option

func WithoutAutoDetect

func WithoutAutoDetect() Option

func WithoutBedrock

func WithoutBedrock() Option

func WithoutBuiltinAliases

func WithoutBuiltinAliases() Option

func WithoutCodex

func WithoutCodex() Option

func WithoutDockerMR

func WithoutDockerMR() Option

func WithoutOllama

func WithoutOllama() Option

func WithoutProvider

func WithoutProvider(providerType string) Option

Jump to

Keyboard shortcuts

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