Teknium
2158c44efd
fix: Anthropic OAuth compatibility — Claude Code identity fingerprinting (#1597)
Anthropic routes OAuth/subscription requests based on Claude Code's
identity markers. Without them, requests get intermittent 500 errors
(~25% failure rate observed). This matches what pi-ai (clawdbot) and
OpenCode both implement for OAuth compatibility.
Changes (OAuth tokens only — API key users unaffected):
1. Headers: user-agent 'claude-cli/2.1.2 (external, cli)' + x-app 'cli'
2. System prompt: prepend 'You are Claude Code, Anthropic's official CLI'
3. System prompt sanitization: replace Hermes/Nous references
4. Tool names: prefix with 'mcp_' (Claude Code convention for non-native tools)
5. Tool name stripping: remove 'mcp_' prefix from response tool calls
Before: 9/12 OK, 1 hard fail, 4 needed retries (~25% error rate)
After: 16/16 OK, 0 failures, 0 retries (0% error rate)
2026-03-16 17:08:22 -07:00
..
2026-02-21 22:31:43 -08:00
2026-03-16 17:08:22 -07:00
2026-03-14 23:44:47 -07:00
2026-03-14 02:33:31 -07:00
2026-03-15 20:21:21 -07:00
2026-03-16 04:42:48 -07:00
2026-03-12 17:04:31 -07:00
2026-03-16 06:52:32 -07:00
2026-03-13 18:08:46 -07:00
2026-03-13 03:14:04 -07:00
2026-03-14 21:28:51 -07:00
2026-03-16 12:36:29 -07:00
2026-02-21 22:31:43 -08:00
2026-03-16 04:42:48 -07:00