You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With apiProxy.maxAiCredits active (the default), the api-proxy rejects every request for claude-sonnet-5 with HTTP 400 unknown_model_ai_credits, so any gh-aw workflow pinned to that model fails at its first inference call. The model is missing from both pricing sources the AI-credits guard consults, while the rest of the toolchain already advertises it as available — githubnext/gh-aw (current release v0.81.6) lists claude-sonnet-5 in both pkg/cli/data/models.json and actions/setup/js/models.json, so workflows compile and validate cleanly and then fail at runtime inside the firewall.
This is the same class of failure as #5969 (claude-fable-5), just for a different model. Filing separately since the fix rows differ and Sonnet 5 is the model most orgs will actually move their Sonnet-tier workflows to.
Root cause
containers/api-proxy/guards/ai-credits-guard.js resolves pricing as: curated table (ai-credits-pricing.js) → bundled catalog (models.dev.catalog.json) → defaultAiCreditsPricing → reject. For claude-sonnet-5, every step misses:
containers/api-proxy/ai-credits-pricing.js — the Sonnet entries stop at claude-sonnet-4-6 (Opus goes up to claude-opus-4-8, so the table has been maintained past the Sonnet 5 release for other model lines).
containers/api-proxy/models.dev.catalog.json — the vendored catalog's newest Sonnet entry is claude-sonnet-4.6 (anthropic/claude-4.6-sonnet-20260217); it predates the Claude Sonnet 5 release and hasn't been re-synced.
With maxAiCredits set and no defaultAiCreditsPricing, checkUnknownModelRejection() rejects the request.
The availability/pricing mismatch
The frustrating part is that the model is "available" everywhere except the one layer that can hard-fail the run:
Layer
Knows claude-sonnet-5?
gh-aw compiler / models.json (v0.81.6)
✅ compiles and runs workflows pinned to it
Anthropic API behind the proxy
✅ serves the model
AWF curated pricing table
❌
AWF bundled models.dev catalog
❌
So the failure only surfaces at the first model call, deep inside a workflow run, as a 400 from the api-proxy — and the only workarounds throw away cost enforcement (defaultAiCreditsPricing, or disabling the credits budget) or force a revert to claude-sonnet-4-6. We hit exactly this: upgraded our workflows to claude-sonnet-5, every run failed at the first inference call, and we had to revert the model bump.
Suggested fix
Ideally both:
Add a curated row matching Anthropic's published pricing ($/1M tokens — sticker price; Anthropic is running an introductory $2/$10 promo through 2026-08-31, but the sticker rate is the safe value for credits enforcement):
Summary
With
apiProxy.maxAiCreditsactive (the default), the api-proxy rejects every request forclaude-sonnet-5with HTTP 400unknown_model_ai_credits, so any gh-aw workflow pinned to that model fails at its first inference call. The model is missing from both pricing sources the AI-credits guard consults, while the rest of the toolchain already advertises it as available —githubnext/gh-aw(current release v0.81.6) listsclaude-sonnet-5in bothpkg/cli/data/models.jsonandactions/setup/js/models.json, so workflows compile and validate cleanly and then fail at runtime inside the firewall.This is the same class of failure as #5969 (
claude-fable-5), just for a different model. Filing separately since the fix rows differ and Sonnet 5 is the model most orgs will actually move their Sonnet-tier workflows to.Root cause
containers/api-proxy/guards/ai-credits-guard.jsresolves pricing as: curated table (ai-credits-pricing.js) → bundled catalog (models.dev.catalog.json) →defaultAiCreditsPricing→ reject. Forclaude-sonnet-5, every step misses:containers/api-proxy/ai-credits-pricing.js— the Sonnet entries stop atclaude-sonnet-4-6(Opus goes up toclaude-opus-4-8, so the table has been maintained past the Sonnet 5 release for other model lines).containers/api-proxy/models.dev.catalog.json— the vendored catalog's newest Sonnet entry isclaude-sonnet-4.6(anthropic/claude-4.6-sonnet-20260217); it predates the Claude Sonnet 5 release and hasn't been re-synced.maxAiCreditsset and nodefaultAiCreditsPricing,checkUnknownModelRejection()rejects the request.The availability/pricing mismatch
The frustrating part is that the model is "available" everywhere except the one layer that can hard-fail the run:
claude-sonnet-5?models.json(v0.81.6)So the failure only surfaces at the first model call, deep inside a workflow run, as a 400 from the api-proxy — and the only workarounds throw away cost enforcement (
defaultAiCreditsPricing, or disabling the credits budget) or force a revert toclaude-sonnet-4-6. We hit exactly this: upgraded our workflows toclaude-sonnet-5, every run failed at the first inference call, and we had to revert the model bump.Suggested fix
Ideally both:
(identical rates to the existing
claude-sonnet-4-6row: input $3, cache read 0.1×, cache write 1.25×, output $15 — per https://platform.claude.com/docs/en/about-claude/models/overview)models.dev.catalog.json(and consider a scheduled re-bundle) — as also requested in AI-credits guard rejects claude-fable-5: pricing missing from curated table and stale bundled models.dev catalog #5969. Every new model launch currently repeats this failure mode until someone hand-adds a curated row.Reproduction
Any gh-aw workflow with:
and
maxAiCreditsleft at its default fails its first model call with:The pricing files on
maintoday still lack the model.🤖 Drafted with the help of Claude Code