build(deps): bump the python-dependencies group, migrating the LLM SDKs to httpx2 - #331
Merged
Merged
Conversation
…Ks to httpx2 Supersedes the grouped dependabot PR #327, which could not merge: it bundled seven routine bumps with two majors that CI rejected. anthropic 1.x and openai 3.x are built on httpx2 rather than httpx, so the `http_client=` the LLM adapters pass them became a type error (`httpx._client.AsyncClient` is not assignable to `httpx2._client.AsyncClient`) and the `test` job failed on pyright. Both adapters now build an `httpx2.AsyncClient` for the outbound-proxy path (#97). The proxy contract is untouched: `resolve_kwargs()` still returns `proxy` / `trust_env`, spelled identically in both libraries, and still returns `{}` when the cache is unloaded so the SDK builds its own default client. httpx2 arrives with the provider SDK and is never a core dependency, so it is imported lazily inside `_http_client()` — the adapter modules themselves import eagerly to register, and a deployment without an `llm-*` extra has neither the SDK nor httpx2. OIDC (Authlib) and the SIEM http sink are unaffected and stay on httpx. The `llm-*` extras floor at the first httpx2-era majors so a fresh install cannot resolve an SDK that would reject an httpx2 client. Bumps: alembic 1.18.5->1.19.2, anthropic 0.120.2->1.4.0, authlib 1.7.2->1.8.0, openai 2.51.0->3.9.0, playwright 1.61.0->1.62.0, pydantic-settings 2.14.2->2.15.0, pytest-playwright 0.8.0->0.9.0, ruff 0.16.1->0.16.6, sqlmodel 0.0.39->0.0.42. Verified on Python 3.14.7: `uv lock --check`, ruff, pyright (0 errors — the failure #327 hit), bandit, and pytest (838 passed; the one `-n0` failure in test_effective_config reproduces identically on pristine main and is unrelated). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AEwQQfnF8ceg8q1Hn9Y1gQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes the grouped dependabot PR #327, which could not merge as-is.
#327 bundled seven routine bumps with two majors that CI rejected:
anthropic0.120.2 → 1.x andopenai2.51.0 → 3.x are built onhttpx2rather thanhttpx. The LLM adapters hand those SDKs anhttp_client=for outbound proxying (#97), so the bump turned that into a type error and thetestjob failed on pyright:This PR carries the same group of upgrades plus the code change that makes them land.
What changed
httpx2.AsyncClientfor the proxy path. The proxy contract is untouched —resolve_kwargs()still returnsproxy/trust_env, spelled identically in both libraries, and still returns{}when the cache is unloaded so the SDK builds its own default client.httpx2arrives with the provider SDK and is never a core dependency, so it is imported lazily inside_http_client()— the adapter modules themselves import eagerly (to register), and a deployment without anllm-*extra has neither the SDK norhttpx2.httpsink are unaffected and stay onhttpx.llm-*extras now floor at the first httpx2-era majors (anthropic>=1.2.0,openai>=3.6.0) so a fresh install cannot resolve an SDK that would reject anhttpx2client.PLAN.md§ Outbound proxy records the httpx/httpx2 split.Bumps: alembic 1.18.5→1.19.2, anthropic 0.120.2→1.4.0, authlib 1.7.2→1.8.0, openai 2.51.0→3.9.0, playwright 1.61.0→1.62.0, pydantic-settings 2.14.2→2.15.0, pytest-playwright 0.8.0→0.9.0, ruff 0.16.1→0.16.6, sqlmodel 0.0.39→0.0.42.
Related issue
n/a — dependency maintenance; supersedes #327.
Type of change
Checklist
ruff check app/ tests/passespytestpasses locally (838 passed — see note below)tests/test_proxy.pyalready cover this seam and assert on behaviour (http_client is not None/is None), not on the client class, so they pass unchanged and still pin the contractPLAN.md§ Outbound proxy)Notes for reviewers
Verified locally on Python 3.14.7 (matching CI) against a real Postgres:
uv lock --check,ruff,pyright app/(0 errors — the exact failure #327 hit),bandit, andpytest.Two caveats worth knowing:
1 failed, 838 passed, 1 skippedunder-n0against a single shared external Postgres —test_effective_config_lists_every_setting_and_never_secret_values. That failure reproduces identically on pristinemain(same counts), passes in isolation, and is unrelated to this change: it is an ordering artifact of-n0on a shared DB rather than CI's container-per-xdist-worker setup.uijob was not run locally (this sandbox cannot fetch the Chromium/Tailwind binaries).playwright1.61→1.62 andpytest-playwright0.8→0.9 are in this bump, so that job is the one thing here validated only by CI.Once this merges, #327 is fully redundant and can be closed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01AEwQQfnF8ceg8q1Hn9Y1gQ
Generated by Claude Code