Fork of router-for-me/CLIProxyAPI. For project overview, sponsors, ports, and the full feature set, see the upstream README.
Each patch is strict-additive: it only changes behavior when its condition is met.
internal/translator/openai/claude/openai_claude_response.go (three call sites).
When reasoning_content is absent or empty in the upstream response, fall back to reasoning. reasoning_content still wins when both are present.
internal/translator/openai/claude/openai_claude_request.go (stripCacheControl helper at the top of ConvertClaudeRequestToOpenAI).
Remove cache_control from messages[].content[], system[], tools[], and message-level fields before translation.
Previously: OAuth access tokens (sk-ant-oat01-*) stored in claude-api-key: entries were routed via Authorization: Bearer … instead of x-api-key. Retired in the v7.2.140 sync because (a) upstream now detects OAuth tokens natively (isClaudeOAuthToken in internal/runtime/executor/claude_executor_request.go forces Bearer on the request path), and (b) the AMPECO deployment migrated from claude-api-key: token entries to OAuth credential files (--claude-login), so the api-key code path no longer carries OAuth tokens at all.
internal/registry/models/models.json and .github/scripts/refresh-model-catalogs.sh (post-refresh strip; the script is invoked by every build job in release.yaml).
Antigravity's published catalog includes claude-opus-4-6-thinking and claude-sonnet-4-6 because Google's AI Code Assist tier resells Claude models via cloudcode-pa.googleapis.com. With those entries present, an antigravity OAuth becomes eligible alongside the Anthropic OAuth pool when the selector picks for claude-* routes. Session-affinity then pins entire Claude Code sessions (parent + sub-agents) to the antigravity OAuth whenever the parent request was a Gemini call, exhausting Antigravity's small Sonnet quota within hours.
Strip every entry whose id starts with claude-, whose type is claude, or whose owned_by is anthropic from the antigravity array. Applied both to the in-tree models.json (so go test ./... and local dev see the patched shape) and to .github/scripts/refresh-model-catalogs.sh (so upstream catalog refreshes during tagged builds re-apply the strip automatically). After the patch the antigravity OAuth is Gemini-only and Claude requests fall through to the Anthropic OAuth pool.
go test ./internal/translator/openai/claude/... # Patches 1 + 2
go test ./internal/registry/... # Patch 4 (catalog integrity)Monthly intentional bump — no auto-pull. When rebasing:
git fetch upstream- Cherry-pick or rebase the patches on top of the new upstream tag.
go test ./...— the patch tests must pass.- Cut a release tag
vX.Y.Z-ampecowith adarwin-arm64binary +.sha256sidecar attached.
MIT — see LICENSE.