Fix model_id: claude-opus-4.8 → claude-opus-4-8#31151
Conversation
|
Evidence — same id, two paths, different behavior. AI Gateway provider-native (fails — Anthropic 404, screenshot from gateway logs): Workers AI curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/v1/messages \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "anthropic/claude-opus-4.8",
"max_tokens": 64,
"messages": [{"content": "reply with the single word: OK", "role": "user"}]
}'
# → {"model":"claude-opus-4-8","stop_reason":"end_turn","content":[{"type":"text","text":"OK"}], ...}Note the upstream-normalized |
Review✅ No style-guide issues found in commit CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
|
Closing — broader smoke shows the catalog is correct. On Workers AI's OpenAI-compat endpoint ( So three endpoints, three behaviors for the same upstream:
The catalog id is the OpenAI-compat key, where dot is required. Switching to hyphen would break that endpoint. The AI Gateway 404 I hit is an AIG-side concern (literal forwarding to Anthropic), not a catalog issue. Apologies for the noise — I should have smoked all three endpoints before opening. |

The catalog
model_idanthropic/claude-opus-4.8works on Workers AI's/ai/v1/messages(CF normalizes.→-internally) but fails through AI Gateway provider routing, which forwards the id literally to Anthropic:{ "request_id": "req_011CbYUJederp2KvDoT8QYJU", "error": { "type": "not_found_error", "message": "model: claude-opus-4.8 was not found. Did you mean claude-opus-4-8?" }, "type": "error" }Hyphen form works on both paths; dot only works on one. See comment for screenshot + curl evidence.