cc-haha/docs/guide/faq.md
程序员阿江(Relakkes) 007b8abab8 docs: add VitePress documentation site with i18n and GitHub Pages deployment
- Set up VitePress with bilingual support (Chinese root + English /en/)
- Create unified sidebar navigation with all doc sections
- Add custom Anthropic brand theme (#D97757)
- Create Quick Start pages (zh/en) from README content
- Migrate 7 .en.md files to docs/en/ directory structure
- Translate memory/agent/skills docs to English (9 files)
- Generate English-only architecture diagrams (11 images via PicTactic)
- Copy English-ready images for agent/skills sections (21 images)
- Configure custom domain (claudecodehaha.relakkesyang.org)
- Localize Chinese UI labels (sidebar, outline, footer)
- Add documentation site badge to READMEs
- Fix dead links and update cross-references for VitePress

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 22:21:45 +08:00

1.5 KiB
Raw Permalink Blame History

常见问题

Q: undefined is not an object (evaluating 'usage.input_tokens')

原因ANTHROPIC_BASE_URL 配置不正确API 端点返回的不是 Anthropic 协议格式的 JSON而是 HTML 页面或其他格式。

本项目使用 Anthropic Messages API 协议ANTHROPIC_BASE_URL 必须指向一个兼容 Anthropic /v1/messages 接口的端点。Anthropic SDK 会自动在 base URL 后面拼接 /v1/messages,所以:

  • MiniMaxANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
  • OpenRouterANTHROPIC_BASE_URL=https://openrouter.ai/api
  • OpenRouter 错误写法:ANTHROPIC_BASE_URL=https://openrouter.ai/anthropic (返回 HTML

如果你的模型供应商只支持 OpenAI 协议,需要通过 LiteLLM 等代理做协议转换,详见 第三方模型使用指南

Q: Cannot find package 'bundle'

error: Cannot find package 'bundle' from '.../claude-code-haha/src/entrypoints/cli.tsx'

原因Bun 版本过低,不支持项目所需的 bun:bundle 等内置模块。

解决:升级 Bun 到最新版本:

bun upgrade

Q: 怎么接入 OpenAI / DeepSeek / Ollama 等非 Anthropic 模型?

本项目只支持 Anthropic 协议。如果模型供应商不直接支持 Anthropic 协议,需要用 LiteLLM 等代理做协议转换OpenAI → Anthropic

详细配置步骤请参考:第三方模型使用指南