Documentation
¶
Overview ¶
internal/setup/setup.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuiltinProviders = []ProviderInfo{ { ID: "anthropic", Name: "Anthropic (Claude)", Description: "Claude 系列模型,推荐", BaseURL: "", EnvKey: "ANTHROPIC_API_KEY", Models: []string{ "claude-sonnet-4-6-20250514", "claude-opus-4-6-20250610", "claude-haiku-4-5-20251001", }, }, { ID: "openai", Name: "OpenAI", Description: "GPT / o 系列模型", BaseURL: "", EnvKey: "OPENAI_API_KEY", Models: []string{ "gpt-4.1", "o4-mini", "o3", }, }, { ID: "openrouter", Name: "OpenRouter", Description: "多模型聚合,支持数百个模型", BaseURL: "https://openrouter.ai/api/v1", EnvKey: "OPENROUTER_API_KEY", Models: []string{ "anthropic/claude-sonnet-4-6", "openai/gpt-4.1", "google/gemini-2.5-pro", }, }, { ID: "custom", Name: "自定义端点", Description: "兼容 OpenAI API 的自定义服务", BaseURL: "", EnvKey: "", Models: []string{}, }, }
BuiltinProviders 预置 Provider 列表
Functions ¶
Types ¶
type ProviderInfo ¶
type ProviderInfo struct {
ID string // "anthropic", "openai", "openrouter", "custom"
Name string // 显示名
Description string // 一句话描述
BaseURL string // 默认 API 端点(custom 为空)
EnvKey string // 对应的环境变量名
Models []string // 推荐模型列表(首个为默认)
}
ProviderInfo 预置 Provider 信息
Click to show internal directories.
Click to hide internal directories.