litellm/tests/test_litellm/llms/custom_httpx
Milan ea08de2a74
fix(vertex_ai): clear cached Vertex OAuth credentials on HTTP 401 for Anthropic /messages
- Add VertexBase.invalidate_credentials; remove (creds, project_id) and (creds, None)
  when project_id is set (#23512).
- async_anthropic_messages_handler: on httpx 401 for vertex_ai, invalidate before
  _handle_error so retries can load_auth/refresh.
- Use module-level httpx in invalidation helper (no redundant inline import).
- Unit tests in test_vertex_llm_base.py and test_llm_http_handler.py (mocked).

Fixes #23512

Made-with: Cursor
2026-04-14 12:01:57 -07:00
..
test_aiohttp_cleanup_closed.py fix(aiohttp): only set enable_cleanup_closed when required (#21897) 2026-02-23 21:06:29 -08:00
test_aiohttp_handler.py [Release Fix] (#22411) 2026-02-28 09:46:35 -08:00
test_aiohttp_transport.py fix(aiohttp): prevent closing shared ClientSession in AiohttpTransport (#21117) 2026-02-16 18:28:28 +05:30
test_gemini_session_leak.py Fix __main__ exit bug, close litellm_async_client, restore global state 2026-03-14 18:14:42 -07:00
test_http_handler.py Fix __main__ exit bug, close litellm_async_client, restore global state 2026-03-14 18:14:42 -07:00
test_llm_http_handler.py fix(vertex_ai): clear cached Vertex OAuth credentials on HTTP 401 for Anthropic /messages 2026-04-14 12:01:57 -07:00
test_mock_transport.py fix(ollama): thread api_base to get_model_info + graceful fallback (#21970) 2026-02-23 21:00:37 -08:00