litellm/tests/unit/proxy/anthropic_endpoints
mateo-berri 42a311d4d0 fix(openai): relay provider error fields without moving logged error codes
Mapped errors now carry the provider body, so code, param, and extra fields reach clients on every status, including /v1/messages before a stream starts. Chat mid-stream frames carry them too, and /v1/responses mid-stream frames carry the code and extra fields

Logged error_code stays what it was at the base. Relayed text, OpenRouter, and OpenAI-route failures relay the provider code to the client and keep logging their HTTP status

Relayed fields and param redact credentials and stop at the recursion cap, and the Responses bridge only names a field the caller sent

Adapted for this line: /v1/completions relays the fields, the completion handler raises RelayOnlyBodyOpenAIError, the OpenAI Responses config defaults to the relay-only class, relayed OpenAI errors count as relay-only, Anthropic error envelopes stay out of the relay, moderations redacts param, and azure_ai needs no reset
2026-11-22 04:50:47 -08:00
..
__init__.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
test_claude_code_marketplace.py feat(claude-code): emit installationPreference in marketplace.json entries (#41430) 2026-10-14 07:59:25 +00:00
test_claude_code_skill_access.py feat(access-groups): grant Claude Code skills through access groups (#46294) 2026-10-14 23:18:50 +00:00
test_endpoints.py fix(openai): relay provider error fields without moving logged error codes 2026-11-22 04:50:47 -08:00
test_gateway_endpoints.py feat(claude_code_gateway): issue rotating refresh tokens and a revocation endpoint (#44635) 2026-10-06 20:57:50 -07:00
test_skills_endpoints.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
test_streaming_model_restamp.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00