Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)
Python
build(deps): bump openai from 2.54.0 to 3.3.0 (#1504)
dependabot[bot]f8a3b1199725
diff --git a/pyproject.toml b/pyproject.tomlindex 3614d391..f850d0a5 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "hatchling.build"[project]name = "free-claude-code"-version = "5.12.1"+version = "5.12.2"description = "Local proxy connecting coding agents to OpenAI-compatible AI providers"readme = "README.md"requires-python = ">=3.14.0"@@ -12,13 +12,14 @@ dependencies = ["fastapi[standard]>=0.141.1","uvicorn>=0.52.1","httpx[socks]>=0.28.1",+ "httpx2[socks]>=2.7.0,<3","markdown-it-py>=4.2.0","pydantic>=2.13.4","python-dotenv>=1.2.2","tiktoken>=0.13.0","python-telegram-bot>=22.8","discord.py>=2.7.1",- "openai>=2.54.0",+ "openai>=3.2.0","loguru>=0.7.0","aiohttp>=3.14.3","jsonschema>=4.25.0",diff --git a/src/free_claude_code/providers/openai_chat/provider.py b/src/free_claude_code/providers/openai_chat/provider.pyindex ecd386e2..1ff93348 100644--- a/src/free_claude_code/providers/openai_chat/provider.py+++ b/src/free_claude_code/providers/openai_chat/provider.py@@ -7,9 +7,9 @@ from collections.abc import AsyncIterator, Awaitable, Callable, Iterator, Mappinfrom dataclasses import dataclassfrom typing import Any-import httpx+import httpx2from loguru import logger-from openai import AsyncOpenAI+from openai import AsyncOpenAI, DefaultAsyncHttpx2Clientfrom free_claude_code.application.model_metadata import ProviderModelInfofrom free_claude_code.core.anthropic import (@@ -157,28 +157,24 @@ class OpenAIChatProvider(BaseProvider):# later requests clamp proactively instead of paying the 400 each time.self._model_output_caps: dict[str, int] = {}self._admission = admission+ timeout = httpx2.Timeout(+ config.http_read_timeout,+ connect=config.http_connect_timeout,+ read=config.http_read_timeout,+ write=config.http_write_timeout,+ )http_client = Noneif config.proxy:- http_client = httpx.AsyncClient(+ http_client = DefaultAsyncHttpx2Client(proxy=config.proxy,- timeout=httpx.Timeout(- config.http_read_timeout,- connect=config.http_connect_timeout,- read=config.http_read_timeout,- write=config.http_write_timeout,- ),+ timeout=timeout,)self._client = AsyncOpenAI(api_key=api_key_provider or self._api_key,base_url=self._base_url,max_retries=0,default_headers=default_headers,- timeout=httpx.Timeout(- config.http_read_timeout,- connect=config.http_connect_timeout,- read=config.http_read_timeout,- write=config.http_write_timeout,- ),+ timeout=timeout,http_client=http_client,)diff --git a/tests/providers/support.py b/tests/providers/support.pyindex 489c53d8..f6a7e372 100644--- a/tests/providers/support.py+++ b/tests/providers/support.py@@ -2,7 +2,7 @@import json-import httpx+import httpx2from openai import AsyncOpenAIfrom free_claude_code.application.reasoning import client_reasoning_policy@@ -54,11 +54,11 @@ async def capture_openai_chat_wire_body(body: dict) -> dict:"""Return the JSON body serialized by the OpenAI chat client."""captured: list[dict] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:payload = json.loads(request.content)assert isinstance(payload, dict)captured.append(payload)- return httpx.Response(+ return httpx2.Response(200,headers={"content-type": "text/event-stream"},text="data: [DONE]\n\n",@@ -67,7 +67,7 @@ async def capture_openai_chat_wire_body(body: dict) -> dict:client = AsyncOpenAI(api_key="test",base_url="https://provider.invalid/v1",- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),max_retries=0,)try:diff --git a/tests/providers/test_chutes.py b/tests/providers/test_chutes.pyindex f14295de..9d89497c 100644--- a/tests/providers/test_chutes.py+++ b/tests/providers/test_chutes.py@@ -2,7 +2,7 @@from unittest.mock import AsyncMock-import httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -224,18 +224,18 @@ async def test_incomplete_record_cannot_bypass_later_metadata_validation(async def test_model_catalog_uses_documented_url_and_bearer_auth(chutes_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(200, json={"data": [_catalog_model()]})+ return httpx2.Response(200, json={"data": [_catalog_model()]})await chutes_provider._client.close()chutes_provider._client = AsyncOpenAI(api_key="wire-chutes-key",base_url=CHUTES_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await chutes_provider.list_model_infos()diff --git a/tests/providers/test_cline_pass.py b/tests/providers/test_cline_pass.pyindex d5a3e7dd..726e61a5 100644--- a/tests/providers/test_cline_pass.py+++ b/tests/providers/test_cline_pass.py@@ -5,7 +5,7 @@ from collections.abc import AsyncIteratorfrom types import SimpleNamespacefrom unittest.mock import AsyncMock, patch-import httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -46,7 +46,7 @@ def cline_pass_provider() -> OpenAIChatProvider:def _provider_with_transport(- transport: httpx.AsyncBaseTransport,+ transport: httpx2.AsyncBaseTransport,*,api_key: str = "wire-cline-key",) -> OpenAIChatProvider:@@ -54,7 +54,7 @@ def _provider_with_transport(api_key=api_key,base_url=CLINE_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=transport),+ http_client=httpx2.AsyncClient(transport=transport),)with patch("free_claude_code.providers.openai_chat.provider.AsyncOpenAI",@@ -343,11 +343,11 @@ async def test_stream_uses_upstream_sse_and_preserves_reasoning_details(@pytest.mark.asyncioasync def test_model_catalog_uses_cline_pass_collection_endpoint_and_auth() -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(+ return httpx2.Response(200,json={"recommended": [{"id": "anthropic/claude-sonnet-4-6"}],@@ -361,7 +361,7 @@ async def test_model_catalog_uses_cline_pass_collection_endpoint_and_auth() -> N)provider = _provider_with_transport(- httpx.MockTransport(handler),+ httpx2.MockTransport(handler),)try:model_infos = await provider.list_model_infos()@@ -394,13 +394,13 @@ async def test_model_catalog_rejects_malformed_or_empty_cline_pass_collection(payload: JsonObject,message: str,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(200, json=payload)+ return httpx2.Response(200, json=payload)- provider = _provider_with_transport(httpx.MockTransport(handler))+ provider = _provider_with_transport(httpx2.MockTransport(handler))try:with pytest.raises(ModelListResponseError, match=message):diff --git a/tests/providers/test_failure_policy.py b/tests/providers/test_failure_policy.pyindex bd5968f2..195a2960 100644--- a/tests/providers/test_failure_policy.py+++ b/tests/providers/test_failure_policy.py@@ -4,6 +4,7 @@ from collections.abc import Callablefrom dataclasses import dataclassimport httpx+import httpx2import openaiimport pytest@@ -27,8 +28,8 @@ def _openai_status_error(message: str,body: object | None = None,) -> openai.APIStatusError:- request = httpx.Request("POST", "https://provider.test/v1/chat/completions")- response = httpx.Response(status_code, request=request)+ request = httpx2.Request("POST", "https://provider.test/v1/chat/completions")+ response = httpx2.Response(status_code, request=request)return error_type(message,response=response,@@ -39,7 +40,7 @@ def _openai_status_error(def _statusless_openai_error(message: str, body: object | None) -> openai.APIError:return openai.APIError(message,- request=httpx.Request("POST", "https://provider.test/v1/chat/completions"),+ request=httpx2.Request("POST", "https://provider.test/v1/chat/completions"),body=body,)@@ -251,7 +252,7 @@ _CASES = (_ClassificationCase("openai_connection_error_keeps_status",lambda: openai.APIConnectionError(- request=httpx.Request("POST", "https://provider.test/v1/chat/completions")+ request=httpx2.Request("POST", "https://provider.test/v1/chat/completions")),FailureKind.UNAVAILABLE,500,@@ -413,9 +414,9 @@ def test_http_405_diagnostic_names_rejected_upstream_endpoint() -> None:def test_connection_cause_chain_is_redacted_and_capped() -> None:- request = httpx.Request("POST", "https://provider.test/v1/chat/completions")+ request = httpx2.Request("POST", "https://provider.test/v1/chat/completions")error = openai.APIConnectionError(request=request)- error.__cause__ = httpx.ConnectError(+ error.__cause__ = httpx2.ConnectError("connect failed authorization: Bearer CAUSE_SECRET "+ "x" * (ERROR_DETAIL_DISPLAY_CAP_BYTES + 10),request=request,diff --git a/tests/providers/test_featherless.py b/tests/providers/test_featherless.pyindex ce10a395..b5e4762c 100644--- a/tests/providers/test_featherless.py+++ b/tests/providers/test_featherless.py@@ -3,7 +3,7 @@from typing import Anyfrom unittest.mock import AsyncMock-import httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -389,12 +389,12 @@ async def test_later_page_failure_cannot_return_a_partial_catalog(async def test_catalog_uses_documented_url_query_and_bearer_auth(featherless_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)page = int(request.url.params["page"])- return httpx.Response(+ return httpx2.Response(200,json=_page(page,@@ -408,7 +408,7 @@ async def test_catalog_uses_documented_url_query_and_bearer_auth(api_key="wire-featherless-key",base_url=FEATHERLESS_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await featherless_provider.list_model_infos()diff --git a/tests/providers/test_groq_reasoning.py b/tests/providers/test_groq_reasoning.pyindex 6e5173d4..c0b8b52e 100644--- a/tests/providers/test_groq_reasoning.py+++ b/tests/providers/test_groq_reasoning.py@@ -4,7 +4,7 @@ import asynciofrom types import SimpleNamespacefrom unittest.mock import AsyncMock, MagicMock, patch-import httpx+import httpx2import openaiimport pytest@@ -137,8 +137,8 @@ def test_parse_does_not_inherit_reasoning_param_into_unrelated_descendant() -> Ndef test_parse_actual_openai_bad_request() -> None:- request = httpx.Request("POST", "https://api.groq.com/openai/v1/chat/completions")- response = httpx.Response(400, request=request)+ request = httpx2.Request("POST", "https://api.groq.com/openai/v1/chat/completions")+ response = httpx2.Response(400, request=request)error = openai.BadRequestError(_ISSUE_MESSAGE,response=response,diff --git a/tests/providers/test_mistral.py b/tests/providers/test_mistral.pyindex 3b841ceb..ba9f6efd 100644--- a/tests/providers/test_mistral.py+++ b/tests/providers/test_mistral.py@@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, MagicMock, patchimport openaiimport pytest-from httpx import Request, Response+from httpx2 import Request, Responsefrom free_claude_code.config.provider_catalog import MISTRAL_DEFAULT_BASEfrom free_claude_code.core.failures import ExecutionFailurediff --git a/tests/providers/test_nebius.py b/tests/providers/test_nebius.pyindex 447162d8..8e446e2e 100644--- a/tests/providers/test_nebius.py+++ b/tests/providers/test_nebius.py@@ -3,7 +3,7 @@from types import SimpleNamespacefrom unittest.mock import AsyncMock-import httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -188,11 +188,11 @@ async def test_rejects_malformed_or_unusable_catalog_atomically(async def test_model_catalog_uses_documented_url_auth_and_verbose_query(nebius_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(+ return httpx2.Response(200,json={"data": [@@ -209,7 +209,7 @@ async def test_model_catalog_uses_documented_url_auth_and_verbose_query(api_key="wire-nebius-key",base_url=NEBIUS_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await nebius_provider.list_model_infos()diff --git a/tests/providers/test_nvidia_nim.py b/tests/providers/test_nvidia_nim.pyindex 6259505b..fcd3a7d6 100644--- a/tests/providers/test_nvidia_nim.py+++ b/tests/providers/test_nvidia_nim.py@@ -3,7 +3,7 @@ from unittest.mock import AsyncMock, MagicMock, patchimport openaiimport pytest-from httpx import Request, Response+from httpx2 import Request, Responsefrom free_claude_code.config.nim import NimSettingsfrom free_claude_code.config.provider_catalog import NVIDIA_NIM_DEFAULT_BASEdiff --git a/tests/providers/test_nvidia_nim_degraded_retry.py b/tests/providers/test_nvidia_nim_degraded_retry.pyindex 4655c432..9284bf79 100644--- a/tests/providers/test_nvidia_nim_degraded_retry.py+++ b/tests/providers/test_nvidia_nim_degraded_retry.py@@ -2,7 +2,7 @@from unittest.mock import AsyncMock, MagicMock, Mock, patch-import httpx+import httpx2import openaiimport pytest@@ -57,10 +57,10 @@ def _bad_request(*,body_extra: dict[str, str] | None = None,) -> openai.BadRequestError:- request = httpx.Request(+ request = httpx2.Request("POST", "https://integrate.api.nvidia.com/v1/chat/completions")- response = httpx.Response(400, request=request)+ response = httpx2.Response(400, request=request)body: dict[str, object] = {"status": 400,"title": "Bad Request",@@ -80,10 +80,10 @@ def _context_window_error(nested: bool = False,status_code: int = 400,) -> openai.BadRequestError | openai.InternalServerError:- request = httpx.Request(+ request = httpx2.Request("POST", "https://integrate.api.nvidia.com/v1/chat/completions")- response = httpx.Response(status_code, request=request)+ response = httpx2.Response(status_code, request=request)error_body: dict[str, object] = {"message": message,"type": "BadRequestError",diff --git a/tests/providers/test_openai_chat_usage.py b/tests/providers/test_openai_chat_usage.pyindex 98a29d78..d8c4bd3e 100644--- a/tests/providers/test_openai_chat_usage.py+++ b/tests/providers/test_openai_chat_usage.py@@ -6,7 +6,7 @@ from unittest.mock import AsyncMock, patchimport openaiimport pytest-from httpx import Request, Response+from httpx2 import Request, Responsefrom free_claude_code.core.anthropic import ReasoningReplayModefrom free_claude_code.core.anthropic.models import MessagesRequestdiff --git a/tests/providers/test_openai_compat_5xx_retry.py b/tests/providers/test_openai_compat_5xx_retry.pyindex 0541ff54..8fa1f323 100644--- a/tests/providers/test_openai_compat_5xx_retry.py+++ b/tests/providers/test_openai_compat_5xx_retry.py@@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, MagicMock, patchimport httpximport openaiimport pytest-from httpx import Request, Response+from httpx2 import Request, Responsefrom free_claude_code.config.nim import NimSettingsfrom free_claude_code.core.failures import ExecutionFailurediff --git a/tests/providers/test_provider_transport_logging.py b/tests/providers/test_provider_transport_logging.pyindex 31c505c8..047f3ab2 100644--- a/tests/providers/test_provider_transport_logging.py+++ b/tests/providers/test_provider_transport_logging.py@@ -3,7 +3,7 @@import loggingfrom unittest.mock import AsyncMock, patch-import httpx+import httpx2import openaiimport pytest@@ -53,9 +53,9 @@ async def test_stream_failure_default_logs_exclude_exception_text(caplog) -> Nonasync def test_stream_failure_default_logs_cause_types_only(caplog) -> None:provider = _provider()error = openai.APIConnectionError(- request=httpx.Request("POST", "http://localhost:1/v1/chat/completions")+ request=httpx2.Request("POST", "http://localhost:1/v1/chat/completions"))- error.__cause__ = httpx.ConnectError("SECRET_CAUSE_DETAIL")+ error.__cause__ = httpx2.ConnectError("SECRET_CAUSE_DETAIL")with (patch.object(provider,diff --git a/tests/providers/test_qwencloud.py b/tests/providers/test_qwencloud.pyindex e7571641..e6852b37 100644--- a/tests/providers/test_qwencloud.py+++ b/tests/providers/test_qwencloud.py@@ -3,7 +3,7 @@from types import SimpleNamespacefrom unittest.mock import AsyncMock-import httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -166,11 +166,11 @@ def test_build_request_body_replays_prior_reasoning_content(async def test_model_catalog_uses_standard_endpoint_base_url_and_auth(qwencloud_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(+ return httpx2.Response(200,json={"object": "list",@@ -196,7 +196,7 @@ async def test_model_catalog_uses_standard_endpoint_base_url_and_auth(api_key="wire-qwencloud-key",base_url=QWENCLOUD_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await qwencloud_provider.list_model_infos()diff --git a/tests/providers/test_qwencloud_coding.py b/tests/providers/test_qwencloud_coding.pyindex 656c5a6d..167e358f 100644--- a/tests/providers/test_qwencloud_coding.py+++ b/tests/providers/test_qwencloud_coding.py@@ -2,7 +2,7 @@from types import SimpleNamespace-import httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -194,11 +194,11 @@ def test_build_request_body_replays_prior_reasoning_content(async def test_model_catalog_uses_standard_endpoint_base_url_and_auth(qwencloud_coding_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(+ return httpx2.Response(200,json={"object": "list",@@ -224,7 +224,7 @@ async def test_model_catalog_uses_standard_endpoint_base_url_and_auth(api_key="wire-qwencloud-coding-key",base_url=QWENCLOUD_CODING_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await qwencloud_coding_provider.list_model_infos()diff --git a/tests/providers/test_stream_recovery.py b/tests/providers/test_stream_recovery.pyindex 293540c4..db194dd7 100644--- a/tests/providers/test_stream_recovery.py+++ b/tests/providers/test_stream_recovery.py@@ -1,6 +1,7 @@"""Provider stream commit-boundary and recovery policy."""import httpx+import httpx2import openaifrom free_claude_code.providers.stream_recovery import (@@ -17,7 +18,7 @@ def _statusless_openai_api_error() -> openai.APIError:return openai.APIError(message,- request=httpx.Request("POST", "https://provider.test/messages"),+ request=httpx2.Request("POST", "https://provider.test/messages"),body=body,)@@ -80,11 +81,11 @@ def test_retryable_stream_error_classifies_resource_exhausted_text() -> None:def test_retryable_stream_error_does_not_retry_bad_request_status() -> None:- request = httpx.Request("POST", "https://provider.test/messages")+ request = httpx2.Request("POST", "https://provider.test/messages")assert not is_retryable_stream_error(openai.BadRequestError("bad request",- response=httpx.Response(400, request=request),+ response=httpx2.Response(400, request=request),body={"error": {"message": "bad request"}},))diff --git a/tests/providers/test_streaming_errors.py b/tests/providers/test_streaming_errors.pyindex 91c6d84d..1e46a8ba 100644--- a/tests/providers/test_streaming_errors.py+++ b/tests/providers/test_streaming_errors.py@@ -5,6 +5,7 @@ from types import SimpleNamespacefrom unittest.mock import AsyncMock, MagicMock, patchimport httpx+import httpx2import openaiimport pytest@@ -586,9 +587,9 @@ class TestStreamingExceptionHandling:"""OpenAI SDK bodies should be raised so users can copy exact provider errors."""provider = _make_provider()request = _make_request()- response = httpx.Response(+ response = httpx2.Response(status_code=400,- request=httpx.Request("POST", "https://example.com/v1/chat/completions"),+ request=httpx2.Request("POST", "https://example.com/v1/chat/completions"),)body = {"error": {@@ -627,9 +628,9 @@ class TestStreamingExceptionHandling:tool_chunk = _make_tool_calls_chunk(name="echo_smoke", arguments="{}", tool_id="call_body", index=0)- response = httpx.Response(+ response = httpx2.Response(status_code=400,- request=httpx.Request("POST", "https://example.com/v1/chat/completions"),+ request=httpx2.Request("POST", "https://example.com/v1/chat/completions"),)body = {"error": {"message": "bad after tool"}}error = openai.BadRequestError("Bad Request", response=response, body=body)@@ -1279,12 +1280,12 @@ class TestStreamingExceptionHandling:provider = _make_provider()runner = _make_stream_runner(provider)retry_session = provider._admission.new_retry_session()- request = httpx.Request(+ request = httpx2.Request("POST", "https://test.api.nvidia.com/v1/chat/completions")degraded = openai.BadRequestError("Bad Request",- response=httpx.Response(400, request=request),+ response=httpx2.Response(400, request=request),body={"status": 400,"detail": (diff --git a/tests/providers/test_together.py b/tests/providers/test_together.pyindex 50987a17..e5012b76 100644--- a/tests/providers/test_together.py+++ b/tests/providers/test_together.py@@ -4,6 +4,7 @@ from types import SimpleNamespacefrom unittest.mock import AsyncMockimport httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -193,11 +194,11 @@ async def test_lists_only_documented_chat_models(async def test_model_catalog_uses_configured_base_url_and_auth(together_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(+ return httpx2.Response(200,json=[{@@ -214,7 +215,7 @@ async def test_model_catalog_uses_configured_base_url_and_auth(api_key="wire-together-key",base_url=TOGETHER_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await together_provider.list_model_infos()diff --git a/tests/providers/test_xai.py b/tests/providers/test_xai.pyindex fc691fb5..fe3caabd 100644--- a/tests/providers/test_xai.py+++ b/tests/providers/test_xai.py@@ -4,6 +4,7 @@ from types import SimpleNamespacefrom unittest.mock import AsyncMockimport httpx+import httpx2import pytestfrom openai import AsyncOpenAI@@ -189,11 +190,11 @@ async def test_lists_language_models_and_routable_aliases(async def test_language_model_catalog_uses_configured_base_url_and_auth(xai_provider: OpenAIChatProvider,) -> None:- requests: list[httpx.Request] = []+ requests: list[httpx2.Request] = []- def handler(request: httpx.Request) -> httpx.Response:+ def handler(request: httpx2.Request) -> httpx2.Response:requests.append(request)- return httpx.Response(+ return httpx2.Response(200,json={"models": [{"id": "grok-4.5", "aliases": []}]},)@@ -203,7 +204,7 @@ async def test_language_model_catalog_uses_configured_base_url_and_auth(api_key="wire-xai-key",base_url=XAI_DEFAULT_BASE,max_retries=0,- http_client=httpx.AsyncClient(transport=httpx.MockTransport(handler)),+ http_client=httpx2.AsyncClient(transport=httpx2.MockTransport(handler)),)try:model_infos = await xai_provider.list_model_infos()diff --git a/uv.lock b/uv.lockindex 19a0aa61..72df5aa8 100644--- a/uv.lock+++ b/uv.lock@@ -607,7 +607,7 @@ wheels = [[[package]]name = "free-claude-code"-version = "5.12.1"+version = "5.12.2"source = { editable = "." }dependencies = [{ name = "aiohttp" },@@ -615,6 +615,7 @@ dependencies = [{ name = "fastapi", extra = ["standard"] },{ name = "google-auth", extra = ["requests"] },{ name = "httpx", extra = ["socks"] },+ { name = "httpx2", extra = ["socks"] },{ name = "jsonschema" },{ name = "loguru" },{ name = "markdown-it-py" },@@ -663,12 +664,13 @@ requires-dist = [{ name = "grpcio", marker = "extra == 'voice'", specifier = ">=1.83.0" },{ name = "grpcio-tools", marker = "extra == 'voice'", specifier = ">=1.81.1" },{ name = "httpx", extras = ["socks"], specifier = ">=0.28.1" },+ { name = "httpx2", extras = ["socks"], specifier = ">=2.7.0,<3" },{ name = "jsonschema", specifier = ">=4.25.0" },{ name = "librosa", marker = "extra == 'voice-local'", specifier = ">=1.0.0" },{ name = "loguru", specifier = ">=0.7.0" },{ name = "markdown-it-py", specifier = ">=4.2.0" },{ name = "nvidia-riva-client", marker = "extra == 'voice'", specifier = ">=2.26.0" },- { name = "openai", specifier = ">=2.54.0" },+ { name = "openai", specifier = ">=3.2.0" },{ name = "pillow", marker = "sys_platform == 'darwin' or sys_platform == 'win32'", specifier = ">=12.0.0" },{ name = "pydantic", specifier = ">=2.13.4" },{ name = "pystray", marker = "sys_platform == 'darwin' or sys_platform == 'win32'", specifier = ">=0.19.5" },@@ -898,6 +900,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" },]+[[package]]+name = "httpcore2"+version = "2.12.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "h11" },+ { name = "truststore" },+]+sdist = { url = "https://files.pythonhosted.org/packages/be/ad/f4f0e57345f1870f3e8cb624e058d7eca6e5a27d33bcc3311d9b618734cd/httpcore2-2.12.0.tar.gz", hash = "sha256:9293522bba0aa7c4c8e9e3f040c16575bd8868e155a77fa30c7a9085a5eae648", size = 67548, upload-time = "2026-08-18T13:22:08.211Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/d2/74/d370e55600d9bcfa0d9794b0166126d49291a3d2b20c268fc98c453a4948/httpcore2-2.12.0-py3-none-any.whl", hash = "sha256:7e04258ce01013d7d615e5b910a3b27fac937d7a95038227e79652b4ba3b4ceb", size = 83074, upload-time = "2026-08-18T13:22:05.854Z" },+]+[[package]]name = "httptools"version = "0.8.0"@@ -940,6 +955,36 @@ socks = [{ name = "socksio" },]+[[package]]+name = "httpx2"+version = "2.12.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "anyio", marker = "sys_platform != 'emscripten'" },+ { name = "httpcore2", marker = "sys_platform != 'emscripten'" },+ { name = "httpx2-jsfetch", marker = "sys_platform == 'emscripten'" },+ { name = "idna" },+ { name = "truststore", marker = "sys_platform != 'emscripten'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/7f/f8/579a8b51e42e38ee32647df9f08aa25643ae788e275cc625b199829c4671/httpx2-2.12.0.tar.gz", hash = "sha256:7631fe9887a8a2275f4a2540e053aa670fcc50742864a9ae7c66e609fdcf12cf", size = 100040, upload-time = "2026-08-18T13:22:09.086Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/c8/95/411ba65569158e862368917aaf56597f3e5fa3b91b0502919638465a08f3/httpx2-2.12.0-py3-none-any.whl", hash = "sha256:cc8b6eecb8661c146b8f89a60e97456ee086e91a784ed31ac450c3a9e613dd36", size = 95427, upload-time = "2026-08-18T13:22:06.834Z" },+]++[package.optional-dependencies]+socks = [+ { name = "socksio" },+]++[[package]]+name = "httpx2-jsfetch"+version = "1.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/cd/c4/0e5636363151a2a1795e0a77617168b9ca438e1748ec05fc9b5687f93d64/httpx2_jsfetch-1.0.tar.gz", hash = "sha256:70a0e3eabfef7cce5ad9c629f7d01ca05e418f586646f4ddf14782e4c1454c60", size = 6872, upload-time = "2026-08-07T00:13:07.492Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/9b/43/832f631d32e4f1211caa2ba368317739fe71f0b8530e4c9d15dc454bac2a/httpx2_jsfetch-1.0-py3-none-any.whl", hash = "sha256:cb916b707601e69a07721aabc8f3f6659be3a6893bc1ff5c6f9e02241df2da32", size = 6382, upload-time = "2026-08-07T00:13:06.567Z" },+]+[[package]]name = "huggingface-hub"version = "1.12.0"@@ -962,11 +1007,11 @@ wheels = [[[package]]name = "idna"-version = "3.11"+version = "3.19"source = { registry = "https://pypi.org/simple" }-sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" }+sdist = { url = "https://files.pythonhosted.org/packages/5f/f7/abb373e5757eaec4b922b92f97ec8d6d7e057cf06778247604fbc4e7c3f3/idna-3.19.tar.gz", hash = "sha256:5e0811a4383b21dc5838069f801c4fb62113b7447663d2530d2bd6e77b49bf15", size = 215237, upload-time = "2026-08-18T05:14:24.27Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" },+ { url = "https://files.pythonhosted.org/packages/57/b0/0e52c878c53f245edd3a11020f20979b3f490f245af532c7cae3027754b5/idna-3.19-py3-none-any.whl", hash = "sha256:815e7be7a7806d54abb586dc943addc79e8b2ee16915059658cbeff4b1b43bf4", size = 68550, upload-time = "2026-08-18T05:14:22.343Z" },][[package]]@@ -1472,21 +1517,20 @@ wheels = [[[package]]name = "openai"-version = "2.54.0"+version = "3.3.0"source = { registry = "https://pypi.org/simple" }dependencies = [{ name = "anyio" },{ name = "distro" },- { name = "httpx" },+ { name = "httpx2" },{ name = "jiter" },{ name = "pydantic" },{ name = "sniffio" },- { name = "tqdm" },{ name = "typing-extensions" },]-sdist = { url = "https://files.pythonhosted.org/packages/50/9a/8c75e8c8a5b407a0586faeb2afac91674ff955c191ecc1d6d3b6669f6788/openai-2.54.0.tar.gz", hash = "sha256:e3e6f8bc1ba30ddf381ace1a14340eed381cb984a1a59bd0f34b5be3b5d49cfa", size = 1100285, upload-time = "2026-08-11T18:46:59.035Z" }+sdist = { url = "https://files.pythonhosted.org/packages/e6/6c/670271205379061112bf5ed900b78a68e21bf11733de829772c5322f92aa/openai-3.3.0.tar.gz", hash = "sha256:28f904a9fbff15288e9dd67bc0f7020d4f576d37786383a480db02fe5d8139d3", size = 1166178, upload-time = "2026-08-18T21:17:53.419Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/64/a8/bb76c7356de8ad57f59d5ff993d434df0607f07f08bcc9c9a5c275e399c0/openai-2.54.0-py3-none-any.whl", hash = "sha256:89089789197ccdb87f173a03145ed1598d00795220c93e96cf712b1cbf5e5f2b", size = 1660351, upload-time = "2026-08-11T18:46:56.684Z" },+ { url = "https://files.pythonhosted.org/packages/82/83/d44980712bf51dddaca090cd772b3102e75377ddac877eaa4b2cb58d886a/openai-3.3.0-py3-none-any.whl", hash = "sha256:ded6b2112e6d299c7a2573ff6f165dc92fb64ceaa4d7daa42345f091157bd373", size = 1690265, upload-time = "2026-08-18T21:17:51.351Z" },][[package]]@@ -2607,6 +2651,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/f0/ac/229b7d4589d2e5937310e72c6d46e89599d16a4a12b479ffa1499fee8eb8/triton-3.7.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:10ba85fa2cca4a2fbdeb36bf1cb082f2c252bda55bf9fccd74f65ec5bc647e68", size = 197824404, upload-time = "2026-06-17T19:53:42.772Z" },]+[[package]]+name = "truststore"+version = "0.10.4"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/53/a3/1585216310e344e8102c22482f6060c7a6ea0322b63e026372e6dcefcfd6/truststore-0.10.4.tar.gz", hash = "sha256:9d91bd436463ad5e4ee4aba766628dd6cd7010cf3e2461756b3303710eebc301", size = 26169, upload-time = "2025-08-12T18:49:02.73Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/19/97/56608b2249fe206a67cd573bc93cd9896e1efb9e98bce9c163bcdc704b88/truststore-0.10.4-py3-none-any.whl", hash = "sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", size = 18660, upload-time = "2025-08-12T18:49:01.46Z" },+]+[[package]]name = "ty"version = "0.0.72"