Developers whose applications integrate with claude-3-haiku-20240307 might have recently encountered unexpected errors. The reason: Anthropic officially retired the Claude Haiku 3 (20240307) model on April 20, 2024. This is a hard retirement, not just a deprecation; requests to the old model ID will no longer be completed and will return an error.
This deprecation cutoff was announced 60 days prior but landed with minimal fanfare. Many developers likely missed the email notification, discovering the issue through production alerts or user complaints about broken features.
Anthropic's deprecation policy explicitly states that retired models return errors, with no automatic fallback to newer versions like Haiku 4.5. The specified model ID simply ceases to resolve.
Practically, this translates to a 4XX response from the Messages API. Depending on the router's logic, it could be a not_found_error if the model identifier is gone, or an invalid_request_error if treated as a malformed request. In either case, the error body will resemble:
{
"type": "error",
"error": {
"type": "not_found_error",
"message": "The requested resource could not be found."
},
"request_id": "req_..."
}
The complexity arises because your application code hasn't changed. The request body, SDK version, and API key remain identical to what worked last week. The sole alteration is Anthropic's routing layer no longer recognizing claude-3-haiku-20240307.
So, where might the stale model ID be lurking? Most teams have multiple references to model names. Key areas to investigate include:
- Environment variables and config files: Check
ANTHROPIC_MODEL,CLAUDE_MODEL,DEFAULT_MODELin both staging and production environments, beyond just the repository. - Framework wrappers: Older versions of libraries like LangChain, LlamaIndex, Vercel AI SDK, and LiteLLM might default to
claude-3-haiku-20240307or feature it in documented examples. Verify your package pins. - Hardcoded test fixtures: VCR cassettes, snapshot tests, and mocked responses frequently capture the model string.
- Fine-grained routing logic: Any part of your code that selects a model based on task type (e.g., "use the cheap one for classification") needs to confirm which model the "cheap" branch resolves to.
- Logs and monitoring dashboards: While not a code issue, filters based on the old model ID will silently fail.
A quick check using your version control system:
git grep -n "claude-3-haiku-20240307"
git grep -n "claude-3-haiku"
If either command returns hits, immediate action is required.
What to replace it with? Anthropic recommends claude-haiku-4-5-20251001 as a direct replacement. However, Haiku 4.5 is a Claude 4-generation model, which introduced several breaking API changes that can affect code written for Haiku 3.
For instance, Haiku 4.5 no longer permits simultaneously setting both temperature and top_p, a practice accepted by Haiku 3.