-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yaml
More file actions
80 lines (72 loc) · 4.69 KB
/
Copy pathconfig.example.yaml
File metadata and controls
80 lines (72 loc) · 4.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# ============================================================================
# MewCode config / 配置文件 —— copy to config.yaml / 复制为 config.yaml
#
# Keep exactly ONE provider block active (uncommented); comment out the rest.
# 只保留一组 provider 启用(顶格、无 #),其余整段注释掉。
# Switch provider = uncomment the one you want, comment the others.
# 切换 provider = 取消想用那组的注释,注释掉其他组。
#
# Four core fields / 四个核心字段:
# protocol protocol to use / 走哪家协议 anthropic | openai | deepseek
# model model id / 用哪个模型
# base_url endpoint (optional) / 请求地址(可选)
# api_key auth / 认证 see "API key" note below / 见下方说明
# Optional / 可选:
# thinking extended thinking / 扩展思考 Anthropic & DeepSeek; OpenAI ignores
# name display label / 显示名
# context_window auto-compaction window / 自动压缩窗口 default 200000 / 默认 200000
#
# ── API key: 3 ways / 三种写法 (pick one / 任选其一) ─────────────────────────
# 1) manual literal / 手动填入: api_key: sk-xxxxx
# 2) env import / 环境导入: api_key: ${OPENAI_API_KEY}
# 3) explicit env / 显式声明: api_key_env: OPENAI_API_KEY
# If omitted / 都不写: falls back to the provider's default env var
# (ANTHROPIC_API_KEY / OPENAI_API_KEY / DEEPSEEK_API_KEY).
# Priority / 优先级: manual literal > env var / 手动填入 > 环境变量
# ============================================================================
# ---------------------------------------------------------------------------
# Option A / 方案 A: Anthropic Claude
# uncomment this block & comment out the others / 取消注释并注释掉其他组
# ---------------------------------------------------------------------------
# protocol: anthropic
# model: claude-sonnet-4-6 # e.g. claude-opus-4-6 / claude-sonnet-4-6
# base_url: https://api.anthropic.com # optional / 可选
# api_key: ${ANTHROPIC_API_KEY} # or literal / 或明文: sk-ant-xxxxx
# thinking: true # adaptive on opus/sonnet-4-6+ / 否则固定 budget
# context_window: 200000 # ch08: auto-compaction threshold base / 自动压缩阈值的窗口
# ---------------------------------------------------------------------------
# Option B / 方案 B: OpenAI (Responses API) (active / 当前启用)
# ---------------------------------------------------------------------------
protocol: openai
model: gpt-4.1 # e.g. gpt-4.1 / gpt-4o / o4-mini
base_url: https://api.openai.com/v1 # optional / 可选
api_key: ${OPENAI_API_KEY} # or literal / 或明文: sk-xxxxx
thinking: false # OpenAI ignores / OpenAI 忽略此项
context_window: 200000 # ch08: auto-compaction threshold base /
# 自动压缩阈值的窗口;预算小(如紧的 TPM 限制)就调小
# ---------------------------------------------------------------------------
# Option C / 方案 C: DeepSeek V4 (Chat Completions API)
# uncomment this block & comment out the others / 取消注释并注释掉其他组
# ---------------------------------------------------------------------------
# protocol: deepseek
# model: deepseek-v4-pro # deepseek-v4-pro / deepseek-v4-flash
# base_url: https://api.deepseek.com # optional, this is the default / 可选,默认值
# api_key: ${DEEPSEEK_API_KEY} # or literal / 或明文: sk-xxxxx
# thinking: false # reasoning streams auto / reasoning 自动流式
# context_window: 128000 # ch08: auto-compaction threshold base / 自动压缩阈值的窗口
# ---------------------------------------------------------------------------
# MCP servers / 外部 MCP 服务器 (optional / 可选, ch07)
# Connected at startup; each server's tools appear as mcp_<server>_<tool>.
# 启动时连接;每个 server 的工具以 mcp_<server>_<tool> 形式注册。
# Declare exactly ONE transport per server / 每个 server 只能选一种传输:
# stdio: command + args (+ env) | http: url (+ headers)
# headers/env values support ${VAR} expansion / 支持 ${VAR} 环境变量展开
# ---------------------------------------------------------------------------
# mcp_servers:
# context7: # stdio: local subprocess / 本地子进程
# command: npx
# args: ["-y", "@upstash/context7-mcp"]
# remote: # http: Streamable HTTP / 远程
# url: https://example.com/mcp
# headers:
# Authorization: "Bearer ${MCP_TOKEN}"