Vibeleaderboard
← All Intel
Intel / repo

anthropic-sdk-python v2.14.0

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

Context

Version 2.14.0 of Anthropic's Python SDK changes how its HTTP clients choose a proxy, and some requests that used to skip a proxy will now go through one (release notes). The change concerns `DefaultHttpxClient` and `DefaultAsyncHttpxClient`, the preconfigured clients a developer builds and passes to the SDK to adjust networking, such as routing traffic through a company proxy. A proxy can be set in code with the `proxy=` argument or through the standard environment variables `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY` and `NO_PROXY`, the last of which lists hosts to reach directly. Until now these clients read the variables even when the caller passed `proxy=` or turned them off with `trust_env=False`, and in the notes' words, "the variables won."

Now an explicit `proxy=` applies to every request and the variables are not read, and `trust_env=False` ignores them, which the notes say matches the behavior of plain `httpx2`, the HTTP library the SDK is built on. In the client code for this release, the explicit proxy is mounted for all hosts, environment proxies load only when no proxy is given and `trust_env` is left on, and mounts the caller supplies are applied last, so they take priority.

The difference shows up with `NO_PROXY`. With `proxy=` set, a listed there used to be reached directly and now goes through the proxy, which could turn working requests into failures if the proxy cannot reach that host. The notes give the way to keep a host off the proxy: pass `mounts={"all://that.host": None}`. The reverse also follows from the change: a built with `trust_env=False` that environment variables were still routing through a proxy now connects directly. The release also adds support for Google-managed data controls on Google Cloud projects and on user profiles, and for compliance review cases, notices and items, without describing them.

Terms in this piece · Glossary
  • Client — The program that sends a request to a server and receives its response.
  • Host — The computer on which a process runs.
  • API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

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

Checking sign-in…

Loading comments…