mirror of
https://github.com/musistudio/claude-code-router.git
synced 2026-10-31 12:04:59 +08:00
OpenCode Go now requires x-opencode-session on requests to https://opencode.ai/zen/go/v1; without it users receive 400 MissingSessionID (#1754, #1780). Injecting that header safely requires CCR to know which provider is really Go, so OpenCode Go is now a distinct local provider from Zen when reading OpenCode configuration, credentials, and cached catalog metadata. - Read opencode and opencode-go entries independently from models.json, opencode.json[c], auth.json, and OPENCODE_GO_API_KEY. - Add x-opencode-session only for the official Go endpoint: explicit configuration wins, otherwise forward x-claude-code-session-id or x-claude-session-id, then metadata.user_id, then a stable process-level fallback; values are sanitized for header safety. - Keep Zen discovery/import unchanged, including public models, candidate ids, fallback models, plugin suffixes, and the model cap. - Keep Go and Zen separately importable and scope provider model discovery to the requested protocol so Go providers only list models that work on that protocol. - Preserve catalog model ids, display names, and protocol classification; surface locked Go candidates with actionable guidance; update EN/ZH docs.
Claude Code Router Docs
Astro-powered documentation site for Claude Code Router.
Commands
npm install
npm run dev
npm run build
npm run preview
The local development server runs from this docs directory.
GitHub Pages
Docs are deployed from .github/workflows/docs.yml on pushes to main that change docs/** or the workflow itself. The default public URL is:
https://ccrdesk.top/
The Astro build reads ASTRO_SITE and ASTRO_BASE, defaulting to https://ccrdesk.top and /.
Content
Docs pages are authored in Markdown:
- Chinese:
src/content/docs/zh/index.md - English:
src/content/docs/en/index.md
Frontmatter provides the page title, eyebrow, and lead text. Markdown headings generate the right-side table of contents, and fenced code blocks are compiled with Shiki highlighting.