Versions in this module Expand all Collapse all v0 v0.4.0 Sep 3, 2026 Changes in this version type Model + ThinkingBudget int v0.3.0 Sep 2, 2026 Changes in this version + type Account struct + APIKey string + Adapter string + BaseURL string + Cost float64 + Credential Credential + Enabled bool + ID string + MaxConcurrency int + Name string + Priority int + Proxy string + Weight int + type Config struct + Accounts []Account + Guardrails GuardrailsConfig + MCPServers []McpServer + Models []Model + Optimization Optimization + Plugins []PluginConfig + Proxies []string + Resilience Resilience + Routing Routing + Secret string + Server Server + Version int + VirtualKeys []VirtualKey + Webhook Webhook + type Credential struct + APIKey string + AccessToken string + ChatGPTAccountID string + ClientID string + Cookies string + ExpiresAt string + IDToken string + Kind string + OrganizationID string + RefreshToken string + Revision int64 + type GuardrailsConfig struct + Injection *bool + Mode string + PII GuardrailsPII + type GuardrailsPII struct + APIKey *bool + Card *bool + Email *bool + Phone *bool + type McpServer struct + Enabled *bool + Headers map[string]string + Name string + PinTools bool + URL string + func (m McpServer) IsEnabled() bool + type Model struct + Accounts []string + Alias string + Cache string + CacheTTL string + Fallbacks []string + InputCostPerMtok float64 + Optimization *Optimization + OutputCostPerMtok float64 + RoutingStrategy string + Sources []ModelSource + UpstreamModel string + func (m Model) ResolvedFor(account string) Model + func (m Model) UpstreamFor(account string) string + func (m Model) WeightFor(account string) (int, bool) + type ModelSource struct + Account string + InputCostPerMtok float64 + OutputCostPerMtok float64 + UpstreamModel string + Weight int + type Optimization struct + Caveman bool + CavemanMode string + Headroom bool + HeadroomKeep int + HeadroomProfile string + HeadroomReserve int + RTKCompression bool + RTKMode string + Squoze bool + type Org struct + BudgetUSD float64 + ID string + type PluginConfig struct + Enabled bool + Endpoint string + Name string + type Resilience struct + CircuitFailures int + CircuitReset string + Cooldown string + LockoutDuration string + LockoutFailures int + type Routing struct + MaxAttempts int + StickyTTL string + Strategy string + type Server struct + Addr string + Gzip bool + ReadTimeout string + WriteTimeout string + type Snapshot struct + AccountProxies map[string][]proxylib.Entry + AccountsByName map[string]Account + CircuitReset time.Duration + Cooldown time.Duration + GlobalProxies []proxylib.Entry + KeyHashes map[string][]byte + Lockout time.Duration + MCPServersByName map[string]McpServer + ModelsByAlias map[string]Model + ReadTimeout time.Duration + StickyTTL time.Duration + VirtualKeysByName map[string]VirtualKey + WriteTimeout time.Duration + func Build(c Config) (*Snapshot, error) + func Load(path string) (*Snapshot, error) + func (s *Snapshot) HashPresented(key string) []byte + func (s *Snapshot) KeyHashHex(name string) string + type Team struct + BalanceUSD float64 + BudgetUSD float64 + ID string + Org *Org + ShareUSD float64 + type VirtualKey struct + BudgetDuration string + BudgetUSD float64 + ID string + Key string + KeyHash string + MaxConcurrency int + Models []string + Name string + Optimization *Optimization + RPM int + TPM int + Team *Team + type Webhook struct + Enabled bool + Secret string + URL string v0.2.0 Aug 20, 2026