Documentation
¶
Overview ¶
Package providers contains SDK provider wiring for common model backends.
Index ¶
Constants ¶
View Source
const ( DefaultProviderOpenAI = "openai" DefaultProviderAnthropic = "anthropic" )
View Source
const DefaultCodexBackendBaseURL = "https://chatgpt.com/backend-api/codex"
Variables ¶
This section is empty.
Functions ¶
func NewDefaultMultiProvider ¶
func NewDefaultMultiProvider() *agentsdk.MultiProvider
NewDefaultMultiProvider creates a MultiProvider with OpenAI and Anthropic registered and OpenAI as the default provider.
func NewProviderFromConfig ¶
func NewProviderFromConfig(spec ProviderSpec) (agentsdk.ModelProvider, error)
func NewRunnerFromConfig ¶
func NewRunnerFromConfig(spec ProviderSpec) (*agentsdk.Runner, error)
Types ¶
type ProviderSpec ¶
type ProviderSpec struct {
Provider string
DefaultProvider string
Model string
BaseURL string
APIKey string
AuthMode string
APIMode string
OpenAIOAuthPath string
OpenAIOAuthAccountID string
OpenAIOAuthAccountIDPath string
OpenAIAuthSession *sdkopenai.AuthSession
ProviderAPIKeys map[string]string
ProviderBaseURLs map[string]string
ProviderAPIModes map[string]string
// ModelFallbacks is an ordered list of fallback model identifiers sent as
// the OpenRouter "models" array so the provider retries the next model when
// one is unavailable. Applies to OpenAI-compatible providers (openrouter,
// gemini, groq, local, openai-api). Empty disables fallback routing.
ModelFallbacks []string
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package anthropic exposes the Anthropic provider and client helpers as part of the public agent SDK surface.
|
Package anthropic exposes the Anthropic provider and client helpers as part of the public agent SDK surface. |
|
Package openai exposes the OpenAI-compatible provider, client, and auth helpers as part of the public agent SDK surface.
|
Package openai exposes the OpenAI-compatible provider, client, and auth helpers as part of the public agent SDK surface. |
Click to show internal directories.
Click to hide internal directories.