Documentation
¶
Overview ¶
Package providerdiag diagnoses provider credentials and endpoint settings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthDiagnostic ¶
type AuthDiagnostic struct {
SelectedProvider string `json:"selected_provider"`
RuntimeProviderSource string `json:"runtime_provider_source,omitempty"`
RequiredAPIKeyEnv string `json:"required_api_key_env,omitempty"`
RequiredAuthEnvs []string `json:"required_auth_envs,omitempty"`
SelectedProviderAPIKeyPresent bool `json:"selected_provider_api_key_present"`
SelectedProviderAuthTokenPresent bool `json:"selected_provider_auth_token_present"`
SelectedProviderAuthPresent bool `json:"selected_provider_auth_present"`
LocalBaseURL bool `json:"local_base_url,omitempty"`
AuthOptional bool `json:"auth_optional,omitempty"`
AnthropicAPIKeyPresent bool `json:"anthropic_api_key_present"`
AnthropicAuthTokenPresent bool `json:"anthropic_auth_token_present"`
OpenAIAPIKeyPresent bool `json:"openai_api_key_present"`
XAIAPIKeyPresent bool `json:"xai_api_key_present"`
DashScopeAPIKeyPresent bool `json:"dashscope_api_key_present"`
OllamaHostPresent bool `json:"ollama_host_present"`
EffectiveAuthSource string `json:"effective_auth_source"`
HeadersSent []string `json:"headers_sent,omitempty"`
BothAnthropicAuthEnvVarsPresent bool `json:"both_anthropic_auth_env_vars_present,omitempty"`
SelectedProviderBothAuthPresent bool `json:"selected_provider_both_auth_present,omitempty"`
Warning string `json:"auth_warning,omitempty"`
Hint string `json:"auth_hint,omitempty"`
}
AuthDiagnostic reports provider auth preflight state without exposing secrets.
func AnalyzeAuth ¶
func AnalyzeAuth(opts AuthOptions) AuthDiagnostic
AnalyzeAuth returns the effective auth state for the selected runtime provider.
func (AuthDiagnostic) Data ¶
func (d AuthDiagnostic) Data() map[string]any
Data returns the legacy doctor data map plus newer auth-source fields.
Click to show internal directories.
Click to hide internal directories.