Files
claude-code-source-code/docs/zh/02-隐藏功能与模型代号.md
2026-04-01 18:55:02 +08:00

83 lines
3.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 隐藏功能与模型代号
> 基于网络公开资料与社区讨论整理的 Claude Code v2.1.88 分析报告。
## 模型代号体系
Anthropic 使用**动物名称**作为内部模型代号。这些代号被严格保护,防止泄露到外部构建中。
### 已知代号
| 代号 | 角色 | 证据 |
|------|------|------|
| **Tengu**(天狗) | 产品/遥测前缀,也可能是模型 | 所有 250+ 分析事件和 feature flag 使用 `tengu_*` 前缀 |
| **Capybara**(水豚) | Sonnet 系列模型,当前版本 v8 | `capybara-v2-fast[1m]`v8 行为问题的 prompt 补丁 |
| **Fennec**(耳廓狐) | Opus 4.6 的前代 | 迁移: `fennec-latest``opus` |
| **Numbat**(袋食蚁兽) | 下一代模型 | 注释: "Remove this section when we launch numbat" |
### 代号保护机制
Undercover 模式明确列出了受保护的代号:
```typescript
// src/utils/undercover.ts:48-49
NEVER include in commit messages or PR descriptions:
- Internal model codenames (animal names like Capybara, Tengu, etc.)
- Unreleased model version numbers (e.g., opus-4-7, sonnet-4-8)
```
构建系统使用 `scripts/excluded-strings.txt` 扫描泄露的代号。Buddy 系统的物种通过 `String.fromCharCode()` 编码以避免触发金丝雀检查:
```typescript
// src/buddy/types.ts:10-13
// One species name collides with a model-codename canary in excluded-strings.txt.
// 运行时构造值,保持字面量不出现在构建产物中
```
那个冲突的物种就是 **capybara** — 既是宠物物种又是模型代号。
### Capybara v8 的行为问题
架构揭示了 Capybara v8 的具体行为问题:
1. **停止序列误触发** (~10% 概率) — prompt 尾部出现 `<functions>`
2. **空 tool_result 导致零输出** — 需要注入 marker workaround
3. **过度写注释** — 需要专门的反注释 prompt 补丁
4. **高虚假声明率**: v8 为 29-30%,而 v4 为 16.7%
5. **验证不足** — 需要 "thoroughness counterweight" 补丁
## Feature Flag 命名约定
所有 feature flag 使用 `tengu_` 前缀 + **随机词对**以掩盖用途:
| Flag | 用途 |
|------|------|
| `tengu_onyx_plover` | Auto Dream后台记忆整理|
| `tengu_coral_fern` | memdir 功能 |
| `tengu_herring_clock` | 团队内存 |
| `tengu_frond_boric` | 分析 kill switch |
| `tengu_amber_quartz_disabled` | 语音模式 kill switch |
| `tengu_amber_flint` | 代理团队 |
## 内外部用户的差异
Anthropic 员工 (`USER_TYPE === 'ant'`) 获得显著更好的待遇:
| 维度 | 外部用户 | 内部用户 (ant) |
|------|---------|--------------|
| 输出风格 | "尽量简洁" | "倾向于更多解释" |
| 虚假声明缓解 | 无 | 专门的 Capybara v8 补丁 |
| 数值长度锚定 | 无 | "工具间 ≤25 词,最终回复 ≤100 词" |
| 验证代理 | 无 | 非简单改动必须启用 |
| 主动性 | 无 | "发现用户误解要指出" |
## 隐藏命令
| 命令 | 状态 | 描述 |
|------|------|------|
| `/btw` | 活跃 | 顺带提问,不打断主对话 |
| `/stickers` | 活跃 | 订购 Claude Code 贴纸 |
| `/thinkback` | 活跃 | 2025 年度回顾 |
| `/good-claude` | 占位 | 隐藏的 stub 命令 |
| `/bughunter` | 占位 | 隐藏的 stub 命令 |