深入了解config.yaml的每一项配置
gateway:
port: 8080
log_level: info
identity:
device_id: "0000000000000000000000000000000000000000000000000000000000000000"
email: "user@example.com"
env:
platform: darwin
arch: arm64
os_version: "Darwin 24.4.0"
node_version: v24.3.0
npm_version: v10.9.0
terminal: iTerm2.app
shell: zsh
git_version: 2.43.0
python_version: 3.12.0
prompt_env:
platform: darwin
shell: zsh
working_dir: /Users/jack/projects
home_dir: /Users/jack
temp_dir: /tmp
upstream:
base_url: https://api.anthropic.com
api_key: "your-api-key"
timeout: 60
| 配置项 | 类型 | 说明 | 默认值 |
|---|---|---|---|
port |
number | 网关监听端口 | 8080 |
log_level |
string | 日志级别:debug/info/warn/error | info |
这些是你要呈现给Anthropic服务器的标准身份信息。
| 配置项 | 类型 | 说明 |
|---|---|---|
device_id |
string | 64字符的十六进制设备ID,所有设备应使用相同的值 |
email |
string | 标准化后的邮箱地址,建议使用不重要的邮箱 |
这些值会替换HTTP请求体中的环境信息。
这些值会替换Prompt中包含的环境信息,如工作目录路径等。
| 配置项 | 说明 |
|---|---|
base_url |
Anthropic API地址 |
api_key |
你的API密钥 |
timeout |
请求超时时间(秒) |
api_key: ${ANTHROPIC_API_KEY}