Anthropic Python SDK Updates Add Context Window Stop Reason and MCP Stability Fix
Anthropic released two updates to its Python SDK, versions 0.119.0 and 0.120.1, bringing notable improvements for developers building with Claude models. Version 0.119.0 introduces a new 'model_context_window_exceeded' stop reason, giving developers a clear programmatic signal when a prompt exceeds the model's maximum context length. The same release also fixes a bug in how binary files are handled within agent toolsets, improving reliability for multi-modal AI agents. Version 0.120.1 follows as a stability patch that pins the MCP extra dependency to below version 2, preventing conflicts in environments that rely on the Model Context Protocol. The MCP Python SDK also received its own update to v1.29.0, adding progress reporting enhancements for context routing.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in