go.bigb.es/claudio
Index
Functions
func ResolveProvider(key string, pc ProviderConfig) *provider.Provider
ResolveProvider builds a provider.Provider for the given key by merging the built-in registry entry (if any) with config overrides. Custom providers defined entirely in config are also supported.
Types
type Config struct { Schema string `yaml:"$schema,omitempty"` ActiveProvider string `yaml:"active_provider"` Proxy string `yaml:"proxy,omitempty"` // global proxy for upstream requests, e.g. "socks5://127.0.0.1:1080" ClaudeProxy string `yaml:"claude_proxy,omitempty"` // HTTP(S) proxy for Claude Code (it doesn't support SOCKS5) Providers map[string]ProviderConfig `yaml:"providers"` }
Config is the top-level configuration.
type ProviderConfig struct { APIKey string `yaml:"api_key"` Name string `yaml:"name,omitempty"` Description string `yaml:"description,omitempty"` BaseURL string `yaml:"base_url,omitempty"` Model string `yaml:"model,omitempty"` SmallModel string `yaml:"small_model,omitempty"` Compat string `yaml:"compat,omitempty"` // "anthropic" or "openai" Proxy string `yaml:"proxy,omitempty"` // e.g. "socks5://127.0.0.1:1080" ClaudeProxy string `yaml:"claude_proxy,omitempty"` // HTTP(S) proxy for Claude Code (it doesn't support SOCKS5) Plan string `yaml:"plan,omitempty"` // plan key for providers with multiple plans (e.g. "api", "coding") ContextWindow int `yaml:"context_window,omitempty"` // model context window in tokens Env map[string]string `yaml:"env,omitempty"` // extra env vars to set at launch Hidden bool `yaml:"hidden,omitempty"` // hide from the main menu }
ProviderConfig holds per-provider user settings. For built-in providers only api_key is needed. For custom providers, set base_url + model + compat to define one entirely in YAML.
Path returns the config file path following XDG Base Directory Specification.