Claude Agent SDK Error: 404 Not Found For Model=default

by Alex Johnson 58 views

The Sudden Hiccup with model="default"

Have you ever experienced that moment when your code, which was working perfectly fine just yesterday, suddenly throws a cryptic error? If you're working with the Claude Agent SDK and the Claude Code CLI, you might have recently encountered this exact scenario. Since December 8th, 2025, users have been reporting a persistent HTTP 404 not_found_error when attempting to use the model="default" configuration within ClaudeAgentOptions. This has been a rather perplexing issue, especially since no changes were made to the codebases on the user's end. The error message itself, API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: default"}}, clearly points to an issue with how the default model identifier is being recognized, or rather, not recognized, by the Claude Code CLI or the underlying Anthropic API. It's like the system suddenly forgot what default meant, which is quite disruptive when you rely on it for seamless operation. This article aims to shed light on this specific bug, what might be causing it, and what steps you can take to navigate around it.

Understanding the model="default" Quandary

The model="default" setting in the Claude Agent SDK is designed to be a convenient alias, pointing to the most suitable or recommended model available at any given time without requiring users to explicitly name a specific model version. This flexibility is invaluable for development and deployment, as it allows applications to automatically leverage the latest and greatest from Anthropic without constant updates to the code. When this alias suddenly stops working, it breaks the expected behavior and introduces a significant roadblock. The fact that this issue is a regression, meaning it worked previously, adds another layer of complexity. Users who had a stable integration are now facing unexpected downtime or the need to quickly find a workaround. The error message, model: default, is particularly telling. It suggests that the default string itself is no longer a valid input for the model parameter, indicating a potential change in how the API endpoint handles model resolution or perhaps a temporary misconfiguration on the server-side.

We'll delve into the specifics of this 404 not_found_error and explore potential reasons behind this unexpected behavior. This issue was first observed around 12:43 PM IST on December 8th, 2025, and has impacted users running specific versions of the Claude Code CLI (2.0.59) and the Claude Agent SDK for Python (0.1.4). The problem manifests even with a minimal agent script, highlighting its fundamental nature. The steps to reproduce are straightforward: set up the specified versions, use model="default" in your ClaudeAgentOptions, and attempt to execute a query. The predictable outcome is the aforementioned 404 error, confirming the widespread nature of this bug. This kind of issue underscores the importance of robust error handling and clear communication from API providers when changes are made, especially those that affect fundamental functionalities like model selection.

Decoding the not_found_error Message

Let's break down the error message we're seeing: API Error: 404 {"type":"error","error":{"type":"not_found_error","message":"model: default"}}. The 404 status code is a standard HTTP response indicating that the server could not find the requested resource. In this context, the