Vibeleaderboard
← All Intel
Intel / repo

anthropic-sdk-python v2.8.0

Source
github.com
Author
anthropic-sdks-releaser[bot]Top Viber
Date

Context

Version 2.8.0 of Anthropic's Python SDK, released on 10 November, changes how its clients for Claude on Amazon Bedrock, Google Vertex AI and Google Cloud build request addresses, so that a model name or project ID cannot change which address a request reaches. These clients write such values straight into the URL path, for example `/model/<model>/invoke` on Bedrock. A value containing a slash or a `..` segment, which servers read as "go up one level", would turn that into a different path; `/model/../invoke` resolves to `/invoke`.

Version 2.5.0 already made the Bedrock client refuse a model named `.` or `..` and made the Vertex client percent-encode its values. Its shared path check also covers the semicolon: a path segment may carry parameters after a `;`, and the SDK's code notes that some servers drop the `;` and everything after it before routing, so a value such as `..;x` is refused there because it would reach such a server as `..`. Bedrock did not need that check, because it encoded `;` as `%3B`. This release changes that: the Bedrock fix now sends `;` unencoded, so it also checks the part before the first `;` and refuses it if it is empty, `.` or `..`. On Vertex the model name shares its segment with the action, as in `<model>:rawPredict`, and a server that dropped everything after a `;` would drop that action too, so the Vertex client now encodes `;` in the model as `%3B`. It also refuses an empty model, project ID or region instead of writing an empty segment into the path.

The Google Cloud client, which sends requests to Claude's own endpoint at claude.googleapis.com, had a plainer gap. It inserted the project, location and workspace ID into its base address without encoding them. The release's tests show the change: a workspace ID of `w/../../x`, which would previously have become extra path steps, is now sent as the single encoded segment `w%2F..%2F..%2Fx`, and an empty project, location or workspace ID now raises an error.

Ordinary model and project IDs are sent exactly as before, so most programs will see no difference. The fixes matter to software that passes a model name or project ID taken from users or other untrusted input into these clients. Anthropic lists them as bug fixes and the release notes do not describe any request having been misrouted in practice. The rest of 2.8.0 is administrative: new usage metrics and a reply setting for Claude Tag, Anthropic's Claude teammate for Slack, plus documentation changes.

More from anthropic-sdks-releaser[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…