Repository navigation
Description
Context
Cloudflare now documents a model page for Claude Opus 4.8 under the AI models catalog:
- Docs: https://developers.cloudflare.com/ai/models/anthropic/claude-opus-4.8/
- Model ID:
anthropic/claude-opus-4.8 - Worker binding example:
await env.AI.run("anthropic/claude-opus-4.8", { max_tokens, messages }) - REST example:
POST /client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/messageswith a Cloudflare API token - Documented context window: 1,000,000 tokens
- Example response includes
gatewayMetadata.keySource = "Unified", which indicates Cloudflare-managed/unified provider access rather than direct Anthropic API-key usage.
This is relevant to the StackBilt Cloudflare-credit routing policy because it gives us a Cloudflare-native frontier Claude lane alongside Workers AI open models.
Current repo state
@stackbilt/[email protected] includes Cloudflare catalog entries for:
@cf/moonshotai/kimi-k2.6@cf/zai-org/glm-4.7-flashdeepseek/deepseek-v4-pro
It does not appear to include Cloudflare provider support/catalog metadata for:
anthropic/claude-opus-4.8
The direct Anthropic provider has older direct Anthropic model IDs such as claude-opus-4-6-20250618, but this new route is materially different because billing/auth/transport is Cloudflare-managed.
Desired behavior
Add a Cloudflare provider/catalog entry for the Cloudflare-managed Anthropic route, exposed downstream as a gateway-selectable alias such as:
cloudflare/anthropic/claude-opus-4.8
Provider-native model string should remain:
anthropic/claude-opus-4.8
Suggested catalog metadata
Initial conservative metadata, subject to live smoke and pricing review:
- provider:
cloudflare - model:
anthropic/claude-opus-4.8 - lifecycle:
active - use cases:
HIGH_PERFORMANCE,LONG_CONTEXT,TOOL_CALLING, possiblyBALANCEDonly if pricing/routing policy allows - max context:
1_000_000 - streaming: likely true, but verify through Cloudflare endpoint/binding
- tool calling: likely true given Anthropic message semantics, but verify before marking Codex/Claude tool-safe
- vision: unknown from the Cloudflare page; do not mark unless documented or verified
- cost: do not hardcode zero; Cloudflare docs link pricing to dashboard, so either leave unknown/placeholder or add explicit Cloudflare-dashboard-derived rates when available
- description: Cloudflare-managed Anthropic Claude Opus 4.8 frontier model with 1M context
Implementation notes
This may need more than adding a string to the existing Workers AI model list:
- The model ID is not an
@cf/...Workers model; it is a provider-managed Cloudflare AI model. - Cloudflare documents both
env.AI.run("anthropic/claude-opus-4.8", ...)and the/ai/v1/messagesREST endpoint. - The current Cloudflare provider should be checked for whether it correctly handles Anthropic-style message responses for this route, including
content[],stop_reason,usage, andgatewayMetadata. - If AI Gateway metadata/cache headers differ for
/ai/v1/messagesvs/ai/run/@cf/..., keep that difference visible in route-plan/cache metadata.
Acceptance criteria
-
CloudflareProvider.getModels()includesanthropic/claude-opus-4.8. - Public model catalog exposes the Cloudflare-managed Anthropic lane with accurate context/capability metadata.
- Downstream gateway
/modelsexposescloudflare/anthropic/claude-opus-4.8after consuming the release. - Unit tests cover model lookup, capabilities, route planning, and response normalization for an Anthropic-shaped Cloudflare response.
- Live smoke, if account access is available, proves a minimal Cloudflare REST or binding call returns successfully without an Anthropic API key.
- Do not mark this route Codex/Claude tool-loop safe until tool-call behavior is verified through
llm-gateway.
Source
Cloudflare docs verified 2026-06-10: https://developers.cloudflare.com/ai/models/anthropic/claude-opus-4.8/
Activity
stackbilt-admin commentedon Jun 10, 2026
Dogfood update 2026-06-10: attempted to use
aegis claudethrough local llm-gateway to work this issue in a non-mutating sandboxed session.Useful findings for this issue:
cloudflare/@cf/moonshotai/kimi-k2.6through/v1/messagesrepeatedly returned gateway502 provider_error: Cloudflare AI request failed (200).aegis claudelauncher completed, which narrows the issue to Cloudflare provider/gateway handling.Implications for
anthropic/claude-opus-4.8support:@cf/...models.supportsTools/ tool-loop-safe metadata conservative until a live/v1/messagessmoke proves Claude Code tool schemas work through this Cloudflare-managed Anthropic route.AEGIS launcher dogfood also found and fixed a stdin issue: local gateway startup could consume piped prompts before Claude Code received them. That is being committed in AEGIS with a regression test, and it improves future
printf ... | aegis claude --printdogfood runs.stackbilt-admin commentedon Jun 10, 2026
Fix/release update 2026-06-10:
Published provider release:
Relevant fixes for this issue:
choices[0].message.content: nullwithreasoning_contentnow normalize that text instead of surfacing as empty output.CloudflareProvider.streamResponse()now normalizes non-streaming chat-completion JSON through the same parser asgenerateResponse(). This is required for local gateways that ask Cloudflare for JSON and synthesize Claude/Codex client streams.Why this matters for
anthropic/claude-opus-4.8:Validation:
npm run typechecknpm test: 444/444npm run test:package/v1/messagesand/v1/responses.stackbilt-admin commentedon Nov 8, 2026
Closing: both acceptance criteria are met on
main(1.25.0).CloudflareProvider.getModels()includesanthropic/claude-opus-4.8, and the catalog lists it as an activeLONG_CONTEXTentry with a 1,000,000-token context, priced from the AI Gateway unified catalog ($5 / $25 per million tokens). Streaming and tools stay off until they are verified. Note for future additions: new Cloudflare catalog models are limited to ones Cloudflare hosts and serves through the Workers AI binding; models served by an outside provider through AI Gateway, like this one, stay where they are but are not the pattern going forward.fix: address review on DeepSeek V4.1 Flash
feat: add Workers AI DeepSeek V4.1 Flash (#144)