{"slug":"claude-code-on-cloudflare-ai-gateway","verification":{"valid":false,"broken_at":1,"reason":"hash mismatch"},"count":37,"sources":[{"id":"s1","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Wire capture: what claude-cli 2.1.165 sends to an arbitrary ANTHROPIC_BASE_URL","quote":"POST /v1/messages?beta=true | model=<ANTHROPIC_MODEL> max_tokens=32000 tools=861 | system=[92, 62, 5681] cache_control=[none, ephemeral, ephemeral]","summary":"First-party capture, 2026-07-25: Claude Code pointed at a local logging server that answered in Anthropic format. Records the path with its query string, the two model slots (32000-token main call with tools, 1024-token background call without), the eight anthropic-beta values, and the three-block cache-marked system array.","author":"","publisher":"miscsubjects","date":"2026-07-25","claim_ids":["c1"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"genesis","hash":"be264ae0bf04553a4ed4e073dec9b6562f7d3d585baaf2b411e43d240064e4aa"},{"id":"s2","type":"publisher_documentation","url":"https://code.claude.com/docs/en/llm-gateway-protocol","title":"Claude Code gateway protocol reference","quote":"Forward the header verbatim; don't allowlist individual values, because the set changes with Claude Code releases.","summary":"Anthropic's contract for gateway authors: inference posts to /v1/messages?beta=true and must be matched on path; responses must stream or the client stalls; /v1/messages/count_tokens is optional and its absence makes the client estimate context locally; the system-prompt attribution strip is positional; gateway model discovery ignores ids that do not begin with claude or anthropic.","author":"","publisher":"Anthropic","date":"2026","claim_ids":["c1","c12","c2"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"be264ae0bf04553a4ed4e073dec9b6562f7d3d585baaf2b411e43d240064e4aa","hash":"e329fc3e0001dc618f048a70748d4a53231c3352f07473a7ddec37f3a3da2b26"},{"id":"s3","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/integrations/coding-agents/claude-code/","title":"Cloudflare AI Gateway — Claude Code integration","quote":"The Anthropic endpoint exposes the same /v1/messages API that Claude Code expects.","summary":"Cloudflare's first-party guide: three environment variables (ANTHROPIC_BASE_URL at the gateway's anthropic provider, ANTHROPIC_API_KEY, and cf-aig-authorization via ANTHROPIC_CUSTOM_HEADERS), an authenticated gateway, and a gateway token with Run permission. Also documents Bedrock and Vertex variants.","author":"","publisher":"Cloudflare","date":"2026-06-29","claim_ids":["c3"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"e329fc3e0001dc618f048a70748d4a53231c3352f07473a7ddec37f3a3da2b26","hash":"9d01f4917060ddda80a1586f7a65589890b5303e58310bd56e78c5dc6dc41159"},{"id":"s4","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/usage/providers/anthropic/","title":"Cloudflare AI Gateway — Anthropic provider","quote":"https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/anthropic","summary":"The anthropic provider slug is a reverse proxy to api.anthropic.com, taking x-api-key and anthropic-version: 2023-06-01. It serves /v1/messages and cannot route that request to a non-Anthropic model.","author":"","publisher":"Cloudflare","date":"2026","claim_ids":["c3","c4"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"9d01f4917060ddda80a1586f7a65589890b5303e58310bd56e78c5dc6dc41159","hash":"69939bc9b617b0e6e1a3c38be58e7c213f8d675472b87caf231ade1ff349c93b"},{"id":"s5","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/usage/rest-api/","title":"Cloudflare AI Gateway — REST API","quote":"The /ai/v1/messages endpoint strictly uses Anthropic's API schema and supports routing to Anthropic and other third-party models. Workers AI models (@cf/) do not support this schema.","summary":"Four endpoints on the account AI surface: /ai/run, /ai/v1/chat/completions, /ai/v1/responses and /ai/v1/messages. Chat completions serves both Workers AI and third-party catalogue models; the Anthropic-schema endpoint excludes @cf/ models. Workers AI requests require the cf-aig-gateway-id header.","author":"","publisher":"Cloudflare","date":"2026","claim_ids":["c4","c5"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"69939bc9b617b0e6e1a3c38be58e7c213f8d675472b87caf231ade1ff349c93b","hash":"09e2aec7f7360ff671559084bee22aea2af711bff389c4b99fdb8f40551cd4d1"},{"id":"s6","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai/models/moonshotai/kimi-k3/","title":"Cloudflare model catalogue — Request formats field","quote":"Request formats: Chat Completions","summary":"Every catalogue model page states which request formats it accepts. Kimi, Grok, DeepSeek and the Workers AI @cf/ models are Chat Completions only; anthropic/* and minimax/m3 list Anthropic Messages. This field is what decides whether Claude Code can reach a model without translation.","author":"","publisher":"Cloudflare","date":"2026","claim_ids":["c5"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"09e2aec7f7360ff671559084bee22aea2af711bff389c4b99fdb8f40551cd4d1","hash":"44506c2385e789db4fdf1e127ccc37cf90b531bda57742eaa8c9583c6cc3eb4c"},{"id":"s7","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Gateway log rows: measured cost, cached input and the Unified Billing 402","quote":"{\"errors\":[{\"message\":\"Gateway authentication is required to use unified billing. Enable authentication on your gateway or provide your own API key (BYOK).\",\"code\":2021}]}","summary":"First-party measurements read from the account's own AI Gateway logs, 2026-07-25. With an MCP server attached: GLM-5.2 149,443 input tokens, 64 cached, $0.20922644, 10.9s; Kimi K2.7 Code 149,187 input, $0.02852109. With MCP disabled: Kimi 21,928 input, 13,312 cached, $0.01089448, 2.8s. Also records the 402 returned when a catalogue model is routed through an unauthenticated gateway, and that minimax/m3 answers /ai/v1/messages with an OpenAI chat.completion body rather than an Anthropic envelope.","author":"","publisher":"miscsubjects","date":"2026-07-25","claim_ids":["c25","c6","c7","c8","c9"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"44506c2385e789db4fdf1e127ccc37cf90b531bda57742eaa8c9583c6cc3eb4c","hash":"1836223c34e173731f4f9ae65dbf1e46355620492d123cf842770064c143166b"},{"id":"s8","type":"github","url":"https://github.com/luohy15/y-router","title":"y-router — archived Cloudflare Worker Anthropic-to-OpenAI proxy","quote":"docs: Archive project in favor of official OpenRouter integration","summary":"The best-known Cloudflare Worker shim, archived 2026-01-11. Source review also shows it drops max_tokens and returns fabricated usage numbers, so it should not be used as a starting point.","author":"luohy15","publisher":"GitHub","date":"2026-01-11","claim_ids":["c10"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"1836223c34e173731f4f9ae65dbf1e46355620492d123cf842770064c143166b","hash":"3d49cc44500bf4a3b9efb7a4c89af56b0eb5d4ff7b79cec8529ba1e1f5cc678b"},{"id":"s9","type":"github","url":"https://github.com/glidea/claude-worker-proxy","title":"claude-worker-proxy — the one active Cloudflare Worker shim","quote":"Anthropic Messages to OpenAI-compatible proxy running on Cloudflare Workers","summary":"Active and structurally sound, with three gaps that matter to Claude Code: tool arguments are emitted as one blob instead of incremental input_json_delta, there is no /v1/messages/count_tokens route, and image blocks are dropped. No Worker-native shim handles thinking blocks or cache_control.","author":"glidea","publisher":"GitHub","date":"2026-07-10","claim_ids":["c10"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"3d49cc44500bf4a3b9efb7a4c89af56b0eb5d4ff7b79cec8529ba1e1f5cc678b","hash":"7b3bcabb0b1d7c96496503d25b88b9fd7b91e5467b9cd804da137e6260eaac11"},{"id":"s10","type":"github","url":"https://github.com/BerriAI/litellm/issues/34522","title":"LiteLLM #34522 — Kimi K2 tool calls silently stop working after tool_use id normalization","quote":"Kimi K2 tool calls silently stop working on v1.91.3+ due to tool_use id normalization","summary":"Rewriting tool_use ids to satisfy Anthropic's character class breaks upstream parsers that derive call indexes from the original id form. The reported symptom is the worst kind: Claude Code ends its turn mid-task with no error surfaced anywhere in the client.","author":"","publisher":"GitHub","date":"2026-07-24","claim_ids":["c11"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"7b3bcabb0b1d7c96496503d25b88b9fd7b91e5467b9cd804da137e6260eaac11","hash":"81b33918f4027782b5e2d4a6b69c1b6d548085f03de51e3b29578760c13e6bb4"},{"id":"s11","type":"github","url":"https://github.com/anthropics/claude-code/issues/68900","title":"claude-code #68900 — per-request billing-header nonce breaks prompt caching on third-party providers","quote":"x-anthropic-billing-header: cc_version=2.1.177.01c; cc_entrypoint=sdk-cli; cch=<NONCE>;","summary":"The first system block of every request carries a value that changes per request, sitting in front of the whole cached prefix. Reported result: 0% cache hit on third-party providers, restored to roughly 99.7% once a proxy normalised the block away. CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC does not remove it; CLAUDE_CODE_ATTRIBUTION_HEADER=0 does.","author":"","publisher":"GitHub","date":"2026-06-16","claim_ids":["c12"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"81b33918f4027782b5e2d4a6b69c1b6d548085f03de51e3b29578760c13e6bb4","hash":"b4c971d0c0c2c8ba5be925f5c4fe42ca85a8f65f05c2b662ba47deb836fb86e4"},{"id":"s12","type":"github","url":"https://github.com/anthropics/claude-code/issues/56990","title":"claude-code #56990 — desktop build rejects non-Anthropic model names","quote":"expected a gateway model route referencing an Anthropic model (e.g. claude-sonnet-4-5, anthropic/claude-*). Name routes to match the underlying model.","summary":"Client-side validation in the desktop app checks model names against an Anthropic-shaped allowlist, so a gateway model id such as kimi-k2.7-code is refused before any request is sent. Practical consequence: the names you type must look like Claude names while resolving to something else.","author":"","publisher":"GitHub","date":"2026-05-07","claim_ids":["c13"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"b4c971d0c0c2c8ba5be925f5c4fe42ca85a8f65f05c2b662ba47deb836fb86e4","hash":"56a2c79f2330d3721e672d7f33c65131671365620b10a43ef24ce0171829cba2"},{"id":"s13","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/features/unified-billing/","title":"Cloudflare AI Gateway — Unified Billing","quote":"A 5% fee is applied to all credits purchased through Unified Billing. For example, a $100 credit purchase will result in a $105 charge. Inference pricing from providers is passed through with no markup.","summary":"Unified Billing lets the gateway supply the provider credential, so no Anthropic, Moonshot or xAI key appears in the client configuration. Workers AI models prefixed @cf/ are explicitly not billed through it, so a mixed setup produces two line items on one Cloudflare invoice.","author":"","publisher":"Cloudflare","date":"2026","claim_ids":["c14","c8"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"56a2c79f2330d3721e672d7f33c65131671365620b10a43ef24ce0171829cba2","hash":"9b16a41c3d1d3124b97cccf063c1e1e874e170e1afc4aaf0cfab6a830cb35b43"},{"id":"s14","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/configuration/authentication/","title":"Cloudflare AI Gateway — authenticated gateway and token scope","quote":"The AI Gateway Read, Run, and Edit permissions cannot be restricted to a single gateway — unlike R2, which supports per-bucket scoping. Any token with AI Gateway Run can send requests through every gateway in the account, including any configured with stored provider keys through Bring Your Own Keys (BYOK), consuming those credentials.","summary":"Authentication is per gateway: with it on, a request without cf-aig-authorization fails. The permission model is account-wide, so a Run token is not a per-gateway credential no matter how you scope the rest of your setup.","author":"","publisher":"Cloudflare","date":"2026","claim_ids":["c15","c8"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"9b16a41c3d1d3124b97cccf063c1e1e874e170e1afc4aaf0cfab6a830cb35b43","hash":"6e59f1fed1a67c2bfebcc5dc8c5f02e0b9505a7c186ae21bc043742a4f1fd8e1"},{"id":"s15","type":"publisher_documentation","url":"https://developers.cloudflare.com/workers-ai/platform/pricing/","title":"Workers AI pricing","quote":"$0.011 per 1,000 Neurons","summary":"Workers AI bills in Neurons with 10,000 free per day on both Free and Paid plans, resetting at 00:00 UTC. Published per-million rates include Kimi K2.7 Code at $0.95 input / $0.19 cached input / $4.00 output, GLM-5.2 at $1.40 / $0.26 / $4.40, and GLM-4.7-Flash at $0.06 input / $0.40 output with no cached tier.","author":"","publisher":"Cloudflare","date":"2026-07-08","claim_ids":["c7"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"6e59f1fed1a67c2bfebcc5dc8c5f02e0b9505a7c186ae21bc043742a4f1fd8e1","hash":"2dcd0572f3aecb3ac1da111d1ba274fdbef180ed69a147508d3ef1638687cceb"},{"id":"s16","type":"publisher_documentation","url":"https://code.claude.com/docs/en/llm-gateway","title":"Claude Code — LLM gateway configuration","quote":"Anthropic doesn't endorse, maintain, or audit third-party gateway products, and doesn't support routing Claude Code to non-Claude models through any gateway.","summary":"Pointing the CLI at a gateway is a documented, first-class configuration; pointing it at a non-Claude model is outside what Anthropic supports. The word is support, not prohibit — no clause forbids it — but the client is a moving target and the operator absorbs every change.","author":"","publisher":"Anthropic","date":"2026","claim_ids":["c16","c7"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"2dcd0572f3aecb3ac1da111d1ba274fdbef180ed69a147508d3ef1638687cceb","hash":"945ae8d2a0662dc9d5101101fc4a1e136e6d93cfbd2f43473f884abf5cc11290"},{"id":"s17","type":"github","url":"https://github.com/anthropics/claude-code/issues/68551","title":"claude-code #68551 — adaptive thinking sent to custom base-URL models","quote":"Claude Code sends thinking: {type: adaptive} to custom ANTHROPIC_BASE_URL models — gateways 400 / return empty / hang","summary":"The client treats unrecognised gateway aliases as current models and sends the thinking field to them. Reported symptoms across backends: HTTP 400, empty responses, and multi-minute hangs. A translator that drops the field entirely avoids the whole class.","author":"","publisher":"GitHub","date":"2026-06-15","claim_ids":["c17"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"945ae8d2a0662dc9d5101101fc4a1e136e6d93cfbd2f43473f884abf5cc11290","hash":"fb7d091568830a5909ed6187e732866bfe46dd56f16607cb1619045bafab2f24"},{"id":"s18","type":"github","url":"https://github.com/anthropics/claude-code/issues/69379","title":"claude-code #69379 — subagents 400 against a third-party Anthropic endpoint","quote":"API Error: 400 invalid thinking: only type=enabled is allowed for this model","summary":"Against Moonshot's Anthropic endpoint the main thread works while subagent and structured-output calls fail, because those requests omit the thinking field the model requires. The subagent transcript is two lines and zero tool uses. MAX_THINKING_TOKENS does not fix it.","author":"","publisher":"GitHub","date":"2026-06-18","claim_ids":["c17"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"fb7d091568830a5909ed6187e732866bfe46dd56f16607cb1619045bafab2f24","hash":"03b965084ef7fdf021a648bda08aacd34670acc22e4adbe4229f5bc574e38a74"},{"id":"s19","type":"publisher_documentation","url":"https://platform.kimi.ai/docs/guide/claude-code-kimi","title":"Moonshot — using Kimi in Claude Code","quote":"export ANTHROPIC_BASE_URL=\"https://api.moonshot.ai/anthropic\"","summary":"Moonshot's own Anthropic-format endpoint and Claude Code instructions. Model ids include kimi-k3 (1,048,576-token context) and kimi-k2.7-code. The page requires ENABLE_TOOL_SEARCH=false because the endpoint does not support that feature yet, and kimi-k2.7-code rejects requests with thinking disabled. The China endpoint is api.moonshot.cn/anthropic.","author":"","publisher":"Moonshot AI","date":"2026","claim_ids":["c18"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"03b965084ef7fdf021a648bda08aacd34670acc22e4adbe4229f5bc574e38a74","hash":"7a43fdf1a52952eaa4396180d6cc2e4948ec69673da7bbf669e2076479129d35"},{"id":"s20","type":"publisher_documentation","url":"https://docs.z.ai/devpack/tool/claude","title":"Z.ai — GLM in Claude Code","quote":"\"ANTHROPIC_BASE_URL\": \"https://api.z.ai/api/anthropic\"","summary":"Z.ai publishes an Anthropic-format endpoint and a Claude Code settings block mapping the Opus and Sonnet slots to glm-5.2. The page contradicts itself on the haiku slot (glm-4.7 in prose, glm-4.5-air on a sibling page) and still claims verification against Claude Code 2.0.14.","author":"","publisher":"Z.ai","date":"2026","claim_ids":["c18"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"7a43fdf1a52952eaa4396180d6cc2e4948ec69673da7bbf669e2076479129d35","hash":"0b0cdda5d102246ff7d9681af076cf5072b47963848b1a489e57295f2fbaa5ec"},{"id":"s21","type":"publisher_documentation","url":"https://api-docs.deepseek.com/guides/anthropic_api","title":"DeepSeek — Anthropic API format","quote":"To meet the demand for using the Anthropic API ecosystem, our API has added support for the Anthropic API format, with the base_url being https://api.deepseek.com/anthropic","summary":"DeepSeek maps Claude Code's default model names for you: claude-opus* to deepseek-v4-pro, claude-haiku*/claude-sonnet* to deepseek-v4-flash. Documented limits: anthropic-beta and anthropic-version headers ignored, cache_control ignored everywhere, image and document blocks unsupported, thinking accepted but budget_tokens ignored.","author":"","publisher":"DeepSeek","date":"2026","claim_ids":["c18"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"0b0cdda5d102246ff7d9681af076cf5072b47963848b1a489e57295f2fbaa5ec","hash":"d5b6ee39a5cf9e1e5363a1b49002aff6ea51a59d3b3b345f1451bffdaf192ff8"},{"id":"s22","type":"publisher_documentation","url":"https://openrouter.ai/docs/guides/guides/claude-code-integration","title":"OpenRouter — Claude Code integration","quote":"When you set ANTHROPIC_BASE_URL to https://openrouter.ai/api, Claude Code speaks its native protocol directly to OpenRouter. No local proxy server is required.","summary":"An officially supported Anthropic-format endpoint in front of hundreds of models, with ANTHROPIC_API_KEY required to be explicitly empty. OpenRouter is also a first-class AI Gateway provider slug, which makes it the shortest documented path to many models with Cloudflare in the middle.","author":"","publisher":"OpenRouter","date":"2026","claim_ids":["c19"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"d5b6ee39a5cf9e1e5363a1b49002aff6ea51a59d3b3b345f1451bffdaf192ff8","hash":"8014c0b9191a5654f4f6b92b27fed75258317219c4ea368d5eaea6af487cf798"},{"id":"s23","type":"publisher_documentation","url":"https://developers.cloudflare.com/ai-gateway/configuration/custom-providers/","title":"Cloudflare AI Gateway — custom providers","quote":"Everything after custom-{slug}/ in your request URL is appended directly to the base_url to form the final upstream URL.","summary":"Register any HTTPS base URL as custom-<slug> and the gateway proxies arbitrary paths to it, so a vendor's own /anthropic/v1/messages can sit behind your gateway with its observability, caching and rate limits. Billing stays with the vendor; Unified Billing does not apply.","author":"","publisher":"Cloudflare","date":"2026","claim_ids":["c20"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"8014c0b9191a5654f4f6b92b27fed75258317219c4ea368d5eaea6af487cf798","hash":"23776d8f6a581b6ce8a79ff49566888c0a5dafd50fb15e25624f86cdfbae55b1"},{"id":"s24","type":"publisher_documentation","url":"https://docs.ollama.com/api/anthropic-compatibility","title":"Ollama — Anthropic API compatibility","quote":"API key is accepted but not validated.","summary":"Ollama serves /v1/messages natively from v0.14.0 (2026-01-10), so no proxy is needed for local models. Documented as not supported: /v1/messages/count_tokens, tool_choice, metadata, prompt caching via cache_control, the Batches API, citations, PDF document blocks and server-sent error events. The launch guidance recommends at least 32K context.","author":"","publisher":"Ollama","date":"2026-01-10","claim_ids":["c21"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"23776d8f6a581b6ce8a79ff49566888c0a5dafd50fb15e25624f86cdfbae55b1","hash":"7707b56a014aaa0e47dfd49deca0d493d5e1108c6fbc59d97f27564e65ca32b9"},{"id":"s25","type":"github","url":"https://github.com/ggml-org/llama.cpp/pull/17570","title":"llama.cpp #17570 — Anthropic Messages API in llama-server","quote":"While no strong claims of compatibility with the Anthropic API spec are made, in our experience it suffices to support many apps.","summary":"Merged 2025-11-28, giving llama-server a native /v1/messages endpoint including count_tokens. Tool use requires the --jinja flag. Measured in a related issue: a real Claude Code session opens at 9,617 prompt tokens on that endpoint and reaches 41,035 by the ninth request.","author":"","publisher":"GitHub","date":"2025-11-28","claim_ids":["c21"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"7707b56a014aaa0e47dfd49deca0d493d5e1108c6fbc59d97f27564e65ca32b9","hash":"81f73a58a94e760747f338499a34572b84e8150f99b463273a5233af9b217af6"},{"id":"s26","type":"publisher_documentation","url":"https://docs.vllm.ai/en/latest/serving/integrations/claude_code/","title":"vLLM — Claude Code integration","quote":"Claude Code requires a model with strong tool calling capabilities","summary":"vLLM serves the Anthropic Messages endpoint natively (merged 2025-10-22) and documents the practical traps: model names cannot contain a slash, and the client's per-request system-prompt hash can defeat prefix caching unless the server handles it or CLAUDE_CODE_ATTRIBUTION_HEADER is disabled.","author":"","publisher":"vLLM","date":"2026","claim_ids":["c21"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"81f73a58a94e760747f338499a34572b84e8150f99b463273a5233af9b217af6","hash":"357b2ecab1bfc36797a80a10dda1dbc54ecf946c5ed6cbafb9ce143e659c81a5"},{"id":"s27","type":"independent_test","url":"https://www.swebench.com/","title":"SWE-bench Verified leaderboard","quote":"mini-SWE-agent 2.0.0 — glm-5 (high) 72.8","summary":"Same-harness comparison on the official board: Claude Opus 4.5 76.8, Claude Sonnet 4.5 71.4, GLM-5 72.8, Kimi K2.5 70.8, all on mini-SWE-agent 2.0.0 at one attempt. The newest submission on the board is from February 2026, so nothing released after that appears at all.","author":"","publisher":"SWE-bench","date":"2026-02","claim_ids":["c22","c23"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"357b2ecab1bfc36797a80a10dda1dbc54ecf946c5ed6cbafb9ce143e659c81a5","hash":"f2464b94e231d18157ed9a811659e9549d42797135be43e7083bafeb53ab2cb2"},{"id":"s28","type":"independent_test","url":"https://www.tbench.ai/leaderboard/terminal-bench/2.1","title":"Terminal-Bench 2.1 leaderboard","quote":"Claude Code + Fable 5 — 83.8 ± 1.2","summary":"With Claude Code itself as the harness: Fable 5 83.8, Opus 4.8 78.9, Sonnet 5 74.6, GLM-5.1 58.7. No Kimi model appears on 2.1 in any configuration, and there is no benchmark version where all of these models coexist.","author":"","publisher":"Terminal-Bench","date":"2026-07","claim_ids":["c22"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"f2464b94e231d18157ed9a811659e9549d42797135be43e7083bafeb53ab2cb2","hash":"278b23a4b19aac29addbc6453d1f4c11335fc1878a46cee9dc849e6009b8ab45"},{"id":"s29","type":"publisher_documentation","url":"https://huggingface.co/moonshotai/Kimi-K2.6","title":"Kimi K2.6 model card — vendor-reported scores","quote":"SWE-bench Verified 80.2","summary":"Vendor scores are reported on in-house scaffolds: Kimi K2.6 claims 80.2 on SWE-bench Verified with a framework adapted from SWE-agent, averaged over ten runs. Every vendor number with an independent counterpart sits above it — GLM-4.6 68.2 self-reported against 55.4 on mini-SWE-agent, Kimi K2.5 76.8 against 70.8, Claude Opus 4.6 80.4 against 75.6. The direction is uniform, so scaffold is read before score.","author":"","publisher":"Moonshot AI","date":"2026-04-20","claim_ids":["c23"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:21:33.299Z","source_grade":"primary_or_press","link_status":"unchecked","quote_status":"unchecked","prev":"278b23a4b19aac29addbc6453d1f4c11335fc1878a46cee9dc849e6009b8ab45","hash":"206283fa3979b0443b362f1718bb108ac109a04e5e26635ee613be324770c1e7"},{"id":"s30","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Tool-search capture: 856 tool definitions become 9","quote":"ENABLE_TOOL_SEARCH=false  tools=856   |   ENABLE_TOOL_SEARCH=true  tools=9  ['Agent','AskUserQuestion','Bash','Edit','Read','Skill','ToolSearch','Workflow','Write']","summary":"First-party capture, 2026-07-25, same session and same prompt against a local logging server. With tool search off the request carries every definition from the connected MCP server; with it on the client sends nine tools plus a ToolSearch tool and expands the rest on demand.","author":"","publisher":"miscsubjects","date":"2026-07-25","claim_ids":["c24","c25"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:39:37.761Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"206283fa3979b0443b362f1718bb108ac109a04e5e26635ee613be324770c1e7","hash":"bdbfd60193bd789e17470738ea92fba19ddd3fb5aefd1d8a0d6c08433ec28847"},{"id":"s31","type":"runtime_receipt","url":"https://miscsubjects.com/api/articles/claude-code-on-cloudflare-ai-gateway","title":"Gateway log rows with tool search on, and a non-Claude model using it","quote":"{\"now\":\"2026-07-25T18:35:56-07:00\",\"today\":\"2026-07-25\",\"time\":\"18:35:56\",\"zone\":\"America/Los_Angeles\",\"iso\":\"2026-07-25T18:35:56-07:00\"}","summary":"Measured through the account gateway on 2026-07-25: with the same MCP server attached and ENABLE_TOOL_SEARCH=true, Kimi K2.7 Code turns ran at 14,109 input tokens with 12,480 cached and $0.00443075, against 149,187 tokens and $0.02852109 with tool search off. The quote is the payload Kimi returned after calling ToolSearch to find an MCP tool it had never been shown and then invoking it.","author":"","publisher":"miscsubjects","date":"2026-07-25","claim_ids":["c24","c25","c26"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:39:37.761Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"bdbfd60193bd789e17470738ea92fba19ddd3fb5aefd1d8a0d6c08433ec28847","hash":"6cefb5e3bc01ad034502811151f655608da968a8ca043fe43d18e06cbbccb656"},{"id":"s32","type":"github","url":"https://github.com/massoumicyrus/claude-code-cloudflare-gateway","title":"claude-code-cloudflare-gateway — the Worker from this article","quote":"Run Claude Code against Kimi, GLM, Grok or Claude through your own Cloudflare AI Gateway. One Worker, one bill, no provider keys.","summary":"Public MIT repository: the single-file Worker, wrangler config, the three secrets it needs, the model alias table, and tools/capture-gateway.mjs — the local Anthropic-compatible logger used for every wire measurement in this article, so the numbers can be re-derived on a newer CLI.","author":"massoumicyrus","publisher":"GitHub","date":"2026-07-25","claim_ids":["c27"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T01:39:37.761Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"6cefb5e3bc01ad034502811151f655608da968a8ca043fe43d18e06cbbccb656","hash":"ae1c5cf9003a19303c12d73298145893072d74439bcc8dc531f98ae2372b9200"},{"id":"s33","type":"reddit","url":"https://old.reddit.com/r/ClaudeAI/comments/1t1o43w/i_gave_claude_code_a_002call_coworker_and_stopped/","title":"I gave Claude Code a $0.02/call coworker and stopped hitting Pro limits","quote":"Was hitting my weekly Pro limit by Wednesday every single week. Tried compact, Sonnet for simple tasks, tighter prompts — nothing worked.","summary":"Anecdotal, r/ClaudeAI, 1,776 upvotes. The operator delegates bulk file reading and boilerplate to Kimi K2.5 through CLI scripts Claude calls via the Bash tool, with routing rules in CLAUDE.md, rather than switching the whole agent. Positive report on cost, and evidence that hitting subscription limits is the common trigger for looking at cheaper models.","author":"u/More-Hunter-3457","publisher":"Reddit","date":"2026-05-02","claim_ids":["c28"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T03:26:20.390Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"ae1c5cf9003a19303c12d73298145893072d74439bcc8dc531f98ae2372b9200","hash":"c3d856bcaaa9e23bd3324efb69487ba008297c3158a1f494a6351357bf73c43d"},{"id":"s34","type":"reddit","url":"https://old.reddit.com/r/LocalLLaMA/comments/1st3m8y/qwen_36_is_actually_useful_for_vibecoding_and_way/","title":"Qwen 3.6 is actually useful for vibe-coding, and way cheaper than Claude","quote":"Launched claude code, pointed it at my running Qwen, and, well, it vibe codes perfectly fine.","summary":"Anecdotal, r/LocalLLaMA. Points Claude Code at a local llama-server on a dual-3090 machine with 200k context and reports it working, publishing the exact env block: ANTHROPIC_AUTH_TOKEN, empty ANTHROPIC_API_KEY, ANTHROPIC_BASE_URL to the local host. Confirms local runtimes now serve the Messages API without a proxy.","author":"u/sdfgeoff","publisher":"Reddit","date":"2026-04-23","claim_ids":["c28","c29"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T03:26:20.390Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"c3d856bcaaa9e23bd3324efb69487ba008297c3158a1f494a6351357bf73c43d","hash":"84376d6572e793f4d483ccd2d2d0f5627f134a5995b3d69387d005f147473c6c"},{"id":"s35","type":"reddit","url":"https://old.reddit.com/r/ClaudeAI/comments/1v6224v/from_kimi_k3_to_claude_opus_5/","title":"From Kimi K3 to Claude Opus 5","quote":"From Kimi K3 to Claude Opus 5","summary":"Anecdotal, r/ClaudeAI, 591 upvotes, posted the same day this page was written. The quote is the thread title: an operator moving in the opposite direction, from Kimi K3 back to Claude Opus 5. Counter-evidence to the cheaper-is-enough case, and the reason model choice per session matters more than picking one winner.","author":"u/Low_Brilliant_2597","publisher":"Reddit","date":"2026-07-25","claim_ids":["c30"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T03:26:20.390Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"84376d6572e793f4d483ccd2d2d0f5627f134a5995b3d69387d005f147473c6c","hash":"52d3c50d186587c4d16f87a9c7f53bc0ce84d05e642b2edbc737105c9ec59f8f"},{"id":"s36","type":"x","url":"https://x.com/chongdashu/status/2016156608875602204","title":"Per-model settings file for switching Claude Code to Kimi","quote":"Want to use Kimi 2.5 in Claude Code? Step 1: create a file .claude/settings/kimi.json","summary":"Anecdotal, X. Publishes the settings-file pattern rather than exported shell variables: a .claude/settings/kimi.json holding ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL, launched with a shell function so one word switches model. An alternative to the env block on this page for anyone who keeps several backends.","author":"@chongdashu","publisher":"X","date":"2026","claim_ids":["c28"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T03:26:20.390Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"unverified","prev":"52d3c50d186587c4d16f87a9c7f53bc0ce84d05e642b2edbc737105c9ec59f8f","hash":"6c55b4ffd8f9cecb7bc9690bb19f816197c4b7657392afa4dd89176f640b8a05"},{"id":"s37","type":"github","url":"https://github.com/Alorse/cc-compatible-models","title":"cc-compatible-models — community catalogue of Claude Code backends","quote":"Complete guide for using alternative AI models with Claude Code — including DeepSeek, Qwen, MiniMax, Kimi, GLM, MiMo, StepFun, and more. Pricing, configs, and coding plans.","summary":"Community-maintained list of providers that answer Claude Code, with the env block and price for each. Useful as a starting point for a provider not covered here, and evidence that the practice is widespread rather than exotic. Verify any figure in it against the vendor's own pricing page before relying on it.","author":"Alorse","publisher":"GitHub","date":"2026","claim_ids":["c28"],"found_by":"Opus 5 (Claude Code)","extra":{},"accessed_at":"2026-07-26T03:26:20.390Z","source_grade":"primary_or_press","link_status":"ok","quote_status":"verified","prev":"6c55b4ffd8f9cecb7bc9690bb19f816197c4b7657392afa4dd89176f640b8a05","hash":"5cc909e00e579dbe9c7157d7e7c70f591bee70413ce97599439d9191887d11c5"}]}