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:
@@ -15,15 +15,13 @@ $env:MAVEN_OPTS = "--enable-native-access=ALL-UNNAMED --sun-misc-unsafe-memory-a
|
||||
# $env:CLAUDE_CODE_PROVIDER = "openai" # 使用 OpenAI 兼容 API(支持代理)
|
||||
# $env:CLAUDE_CODE_PROVIDER = "anthropic" # 使用 Anthropic 原生 API
|
||||
|
||||
# OpenAI 兼容 API 配置(默认)
|
||||
# $env:AI_API_KEY = "your-api-key-here"
|
||||
# $env:AI_BASE_URL = "https://api.openai.com"
|
||||
# $env:AI_OPENAI_MODEL = "gpt-4o"
|
||||
|
||||
# Anthropic 原生 API 配置
|
||||
# $env:ANTHROPIC_API_KEY = "your-api-key-here"
|
||||
# $env:ANTHROPIC_BASE_URL = "https://api.anthropic.com"
|
||||
# $env:AI_MODEL = "claude-sonnet-4-20250514"
|
||||
# 统一环境变量(两种 Provider 通用)
|
||||
# $env:AI_API_KEY = "your-api-key-here" # API 密钥(必须)
|
||||
# $env:AI_BASE_URL = "https://api.openai.com" # API 基础 URL(按 Provider 不同默认值不同)
|
||||
# $env:AI_MODEL = "gpt-4o" # 模型名称(按 Provider 不同默认值不同)
|
||||
#
|
||||
# OpenAI 默认: AI_BASE_URL=https://api.openai.com AI_MODEL=gpt-4o
|
||||
# Anthropic 默认: AI_BASE_URL=https://api.anthropic.com AI_MODEL=claude-sonnet-4-20250514
|
||||
|
||||
# === 设置控制台 UTF-8 编码(支持 emoji 等字符) ===
|
||||
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
||||
|
||||
Reference in New Issue
Block a user