hey y'all. was using the resume review tool when i hit this error:
Failed to fetch chat completion from Anthropic.
did some digging in the codebase and found the root cause. wanted to write it up so we can get this fixed fast - resume review has been down for ALL members since june 15 and we're in the middle of recruiting season.
what's happening
getChatCompletion in packages/core/src/infrastructure/ai.ts hardcodes the model claude-sonnet-4-20250514 in three spots - the jsdoc default, the type union and the default parameter (lines 154, 156, 193).
anthropic retired that exact snapshot from the api on june 15, 2026 (deprecation docs). no failover, no grace period - every call to it just errors now.
and because the error handling only special-cases 429 and 529, the failure falls into the otherwise branch and surfaces as that generic "failed to fetch chat completion" message. so from the outside it looks like a random outage when it's actually a retired model id.
repro
- go to resume review in the member profile
- upload any valid pdf under 1mb
- submit
- error above, every time
the fix
swap the model string to claude-sonnet-4-6 (anthropic's recommended successor) in all three spots. sonnet 4.6 supports both the temperature param resume review uses (0.25) and the ephemeral cache_control caching in this code - so it's a drop-in replacement. three line change.
follow-ups worth doing separately:
- move the model id to an env var so the next retirement is a config change, not a code change
- add explicit handling for 400/401/404 so billing, auth and model errors are actually distinguishable in logs
one caveat
that same generic error branch also catches billing/auth failures (400 low credits, 401 revoked key, 403 suspended account) - all indistinguishable from a retired model on the user side. the retirement is confirmed and sufficient on its own, but someone with access to the error reports should double check there isn't ALSO an account issue (the ColorStackError.report() context has the real status + json body). otherwise the model swap alone won't bring it back.
happy to open the pr for the swap - just say the word.
hey y'all. was using the resume review tool when i hit this error:
did some digging in the codebase and found the root cause. wanted to write it up so we can get this fixed fast - resume review has been down for ALL members since june 15 and we're in the middle of recruiting season.
what's happening
getChatCompletioninpackages/core/src/infrastructure/ai.tshardcodes the modelclaude-sonnet-4-20250514in three spots - the jsdoc default, the type union and the default parameter (lines 154, 156, 193).anthropic retired that exact snapshot from the api on june 15, 2026 (deprecation docs). no failover, no grace period - every call to it just errors now.
and because the error handling only special-cases 429 and 529, the failure falls into the
otherwisebranch and surfaces as that generic "failed to fetch chat completion" message. so from the outside it looks like a random outage when it's actually a retired model id.repro
the fix
swap the model string to
claude-sonnet-4-6(anthropic's recommended successor) in all three spots. sonnet 4.6 supports both thetemperatureparam resume review uses (0.25) and the ephemeralcache_controlcaching in this code - so it's a drop-in replacement. three line change.follow-ups worth doing separately:
one caveat
that same generic error branch also catches billing/auth failures (400 low credits, 401 revoked key, 403 suspended account) - all indistinguishable from a retired model on the user side. the retirement is confirmed and sufficient on its own, but someone with access to the error reports should double check there isn't ALSO an account issue (the
ColorStackError.report()context has the real status + json body). otherwise the model swap alone won't bring it back.happy to open the pr for the swap - just say the word.