refactor: 统一API环境变量命名,AI_API_KEY/AI_BASE_URL/AI_MODEL通用
两种Provider使用相同的环境变量,切换Provider只需改CLAUDE_CODE_PROVIDER: - AI_API_KEY: API密钥(两种Provider通用) - AI_BASE_URL: 基础URL(OpenAI默认api.openai.com,Anthropic默认api.anthropic.com) - AI_MODEL: 模型名(OpenAI默认gpt-4o,Anthropic默认claude-sonnet-4-20250514) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -3,8 +3,8 @@ spring:
|
||||
# === Anthropic 原生 API 配置 ===
|
||||
# 启用时设置 claude-code.provider=anthropic
|
||||
anthropic:
|
||||
api-key: ${ANTHROPIC_API_KEY:}
|
||||
base-url: ${ANTHROPIC_BASE_URL:https://api.anthropic.com}
|
||||
api-key: ${AI_API_KEY:}
|
||||
base-url: ${AI_BASE_URL:https://api.anthropic.com}
|
||||
chat:
|
||||
options:
|
||||
model: ${AI_MODEL:claude-sonnet-4-20250514}
|
||||
@@ -19,7 +19,7 @@ spring:
|
||||
base-url: ${AI_BASE_URL:https://api.openai.com}
|
||||
chat:
|
||||
options:
|
||||
model: ${AI_OPENAI_MODEL:gpt-4o}
|
||||
model: ${AI_MODEL:gpt-4o}
|
||||
|
||||
# 不启动 Web 服务器(纯 CLI 模式)
|
||||
main:
|
||||
|
||||
Reference in New Issue
Block a user