Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(profile config.ProviderProfile, options Options) (zeroruntime.Provider, error)
New creates a runtime provider for a resolved provider profile.
Types ¶
type Options ¶
type Options struct {
UserAgent string
HTTPClient *http.Client
ModelRegistry *modelregistry.Registry
// OAuthResolver, when set, lets the provider authenticate model calls with an
// OAuth bearer token (preferred over the API key). nil => API-key auth only.
// Applied to the OpenAI, Anthropic, and Google (Gemini) providers.
OAuthResolver providerio.TokenResolver
// OAuthLoginKey is the credential-store key OAuthResolver bound to (empty when
// there is no OAuth login). It is the SAME selection the bearer resolver made,
// resolved ONCE by the caller so the Codex chatgpt-account-id header reads its
// account from the exact login that issued the bearer token — never a second,
// independent lookup that could pick a different login (a backend-rejected
// mismatch).
OAuthLoginKey string
}
Options configures provider construction.
type RuntimeMetadata ¶
type RuntimeMetadata struct {
ProviderKind config.ProviderKind
APIModel string
}
RuntimeMetadata describes the provider identity and concrete API model used after Zero model aliases and provider-kind defaults are resolved.
func ResolveRuntimeMetadata ¶
func ResolveRuntimeMetadata(profile config.ProviderProfile, options Options) (RuntimeMetadata, error)
ResolveRuntimeMetadata returns the provider kind and API model that New would use for a profile, without constructing a network client.
Click to show internal directories.
Click to hide internal directories.