Releases: Jakevin/CC-Adapter
Releases · Jakevin/CC-Adapter
v0.5.5
Full Changelog: v0.5.4...v0.5.5
v0.5.4
Full Changelog: v0.5.3...v0.5.4
v0.5.3
Full Changelog: v0.5.2...v0.5.3
v0.5.2
Full Changelog: v0.5.1...v0.5.2
v0.5.1
Full Changelog: v0.5.0...v0.5.1
v0.5.0
v0.5.0
變更紀錄(繁體中文)
- 即時 config 熱重載:改用
notify監控config.toml的檔案系統事件,比單純輪詢修改時間更即時。 - 自動退回 polling:若檔案監控器在目前環境無法啟動或無法監控目錄,會自動退回原本的 polling 模式。
- 更完整的 graceful shutdown:伺服器現在同時處理
SIGINT(Ctrl+C)與SIGTERM,並在關閉時通知背景 watcher 停止,讓~/.claude/settings.json的還原更可靠。 - 標記舊 token store API 為 deprecated:舊的
save/load/delete介面保留向後相容,但現在會明確提示改用save_named/load_named/delete_named。 - ChatGPT Responses 轉換更貼近 Anthropic 語義:
thinking區塊不再當作普通文字轉送,並補上incomplete_details.reason與 cache token 使用量映射,讓stop_reason與 usage 統計更準確。
Change Log (English)
- Real-time config hot reload:
config.tomlchanges are now monitored withnotifyfilesystem events instead of relying only on mtime polling. - Automatic polling fallback: if the filesystem watcher cannot start or cannot watch the target directory in the current environment, the adapter automatically falls back to the original polling mode.
- More complete graceful shutdown: the server now handles both
SIGINT(Ctrl+C) andSIGTERM, and notifies the background watcher to stop during shutdown so restoring~/.claude/settings.jsonis more reliable. - Legacy token store APIs are now deprecated: the old
save/load/deletehelpers remain for backward compatibility, but now explicitly point users tosave_named/load_named/delete_named. - ChatGPT Responses conversion now matches Anthropic semantics more closely:
thinkingblocks are no longer forwarded as plain text, andincomplete_details.reasonplus cache token usage are now mapped back sostop_reasonand usage statistics are more accurate.
v0.4.0
v0.4.0
變更紀錄(繁體中文)
- ChatGPT 多帳號支援:
login/logout新增--name(預設chatgpt),可用claude-adapter login --name chatgpt2新增第二個帳號,並在config.toml中以[providers.chatgpt2]使用。 - Token 依 Provider 名稱分檔保存:OAuth token 會保存到
~/.claude-adapter/tokens-<name>.json(例如tokens-chatgpt2.json),chatgpt仍向後相容讀取舊的tokens.json。
Change Log (English)
- Multiple ChatGPT accounts:
login/logoutnow support--name(defaultchatgpt). Useclaude-adapter login --name chatgpt2to add a second account and reference it via[providers.chatgpt2]inconfig.toml. - Per-provider token files: OAuth tokens are stored as
~/.claude-adapter/tokens-<name>.json(e.g.tokens-chatgpt2.json). The defaultchatgptprovider remains backward compatible with the legacytokens.json.
v0.3.0
v0.3.0
變更紀錄(繁體中文)
多 Provider 與路由
- 支援多個 Provider 同時配置:透過
config.toml的[providers.*]定義多個供應商(chatgpt/openai/anthropic-compatible等)。 - 新增
anthropic-compatibleProvider 類型:直接透過 Anthropic Messages API 格式轉發到相容後端,只需設定base_url+api_key。 - 模型路由表改為結構化:使用
[models]+[models.routing],每個 key 映射到{ provider, model }。 - 支援「最長前綴匹配」模型路由:
models.routing的 key 可以只寫「型號前綴」(如claude-haiku-4-5),自動匹配claude-haiku-4-5-20251001等帶日期後綴的變體。 - 保留舊版單一 Provider 格式:仍支援原本的
[provider]+models.mapping,內部會自動轉成多 Provider 結構。
串流與錯誤處理
supports_streaming設定啟用:在每個 Provider 的 config 裡用supports_streaming控制是否對後端開啟 stream;預設建議false,由 Adapter 統一模擬 SSE。- 請求失敗時在錯誤訊息中加入完整 API URL(OpenAI / ChatGPT / Anthropic-compatible),方便排查 404 / 路徑錯誤。
- 針對 Anthropic-compatible 後端回傳 SSE 的情況,強制
stream=false時期望 JSON 回應;若仍為 SSE,會在錯誤訊息中附上 Raw body 以方便 debug。
thinking 區塊支援
- 回應型別新增
thinking變體:MessagesResponse.content現在支援type: "thinking",包含thinking與可選的signature欄位。 - Anthropic-compatible 回應可正確解析含
thinking的 content 陣列,不再因未知 variant 而失敗。 - SSE 串流輸出時,
thinking會用 Anthropic 官方 SSE 事件格式(content_block_start+thinking_delta+content_block_stop),而不是當作一般文字輸出;UI 可以選擇隱藏或特殊處理 thinking,而不會顯示<thinking>...</thinking>純文字。
文件與樣板更新
- 更新
config-example.toml:展示多 Provider 配置(含supports_streaming與前綴路由註解)。 - 更新 README(英文 / 繁中 / 簡中):說明多 Provider 結構、
models.routing前綴匹配規則、Anthropic-compatible Provider、thinking 區塊行為。
Change Log (English)
Multi-provider & routing
- Support configuring multiple providers at once via
[providers.*]inconfig.toml(e.g.chatgpt,openai,anthropic-compatible). - New
anthropic-compatibleprovider type: forwards Anthropic Messages API requests directly to compatible backends by configuringbase_url+api_key. - Structured model routing: use
[models]+[models.routing], each key maps to{ provider, model }. - Longest-prefix model routing:
models.routingkeys can be “family prefixes” (e.g.claude-haiku-4-5), automatically matching dated variants likeclaude-haiku-4-5-20251001. - Legacy single-provider format still supported: original
[provider]+models.mappingis normalized internally into the same multi-provider structure.
Streaming & error handling
supports_streamingflag activated per provider: controls whether the adapter asks the backend for streaming responses; recommendedfalseso the adapter simulates SSE uniformly.- Include full API URL in provider error messages (OpenAI / ChatGPT / Anthropic-compatible) to quickly diagnose 404 and path issues.
- For Anthropic-compatible backends that return SSE while
stream=false, parse failures now include the full raw body to aid debugging.
Thinking block support
- Response type extended with
thinkingvariant:MessagesResponse.contentnow supportstype: "thinking"withthinkingtext and optionalsignature. - Anthropic-compatible JSON responses containing
thinkingblocks can be deserialized correctly, instead of failing on unknown variants. - When emitting SSE, thinking blocks are forwarded using Anthropic’s official SSE schema (
content_block_start+thinking_delta+content_block_stop), not as plain text; UIs can hide or specially render thinking instead of showing it inline as<thinking>...</thinking>.
Docs & templates
- Updated
config-example.tomlto showcase multi-provider configuration,supports_streaming, and prefix-based routing with detailed comments. - Updated README (EN / ZH-HANT / ZH-HANS) to document multi-provider architecture,
models.routingresolution rules, Anthropic-compatible providers, and thinking block behavior.
v0.2.1
Full Changelog: v0.2.0...v0.2.1
v0.1.0
Claude API Adapter v0.1.0
API adapter that lets Claude Code use OpenAI, Grok, and ChatGPT providers.
Downloads
| Platform | Architecture | File |
|---|---|---|
| macOS | Apple Silicon (arm64) | claude-adapter-darwin-arm64.tar.gz |
| Linux | ARM64 | claude-adapter-linux-arm64.tar.gz |
Usage
tar xzf claude-adapter-<platform>.tar.gz
cd claude-adapter
# Edit config-example.toml → config.toml, then:
./claude-adapter serve --config config.tomlMore platform binaries (Linux amd64, macOS amd64) will be available in future tagged releases via CI.