Problem
Claude Code currently routes every request through OpenCode when configured with routatic-proxy. Users with a Claude subscription need Anthropic to remain the primary service and OpenCode to take over only when Anthropic is unavailable or usage-limited.
Proposed behavior
- Add an opt-in Anthropic-first mode for
/v1/messages.
- Preserve Claude Code OAuth and Anthropic capability headers.
- Fall back on 408, 429, 5xx, and transport failures before response data is sent.
- Use Retry-After-aware adaptive recovery with a single real-request probe and no synthetic API calls.
- Keep invalid-request and authentication errors visible.
- Skip remaining OpenCode Go models after a Go usage-limit response and continue with configured Zen fallbacks.
Acceptance criteria
Streaming and non-streaming requests, subscription exhaustion, recovery probing, context continuity, and current OpenCode Go/Zen fallback models are covered by automated and Claude Code end-to-end tests.
Problem
Claude Code currently routes every request through OpenCode when configured with routatic-proxy. Users with a Claude subscription need Anthropic to remain the primary service and OpenCode to take over only when Anthropic is unavailable or usage-limited.
Proposed behavior
/v1/messages.Acceptance criteria
Streaming and non-streaming requests, subscription exhaustion, recovery probing, context continuity, and current OpenCode Go/Zen fallback models are covered by automated and Claude Code end-to-end tests.