litellm/tests/unit/llms/openai
kenneth-berri 018104fa40
fix(responses): forward reasoning.effort for a Router deployment of a model the cost map does not list (#56048)
* fix(responses): forward reasoning.effort for a Router deployment the cost map has never listed

The Router registers every deployment under its shared backend key, and for a model the cost map does not list that row is empty. The reasoning gate read the empty row as a known model without supports_reasoning and refused reasoning.effort, so the fail-open path for unknown models was unreachable through the Router and the proxy. A row that names no provider is now treated as unknown.

Fixes #55919

* fix(responses): tell a Router-registered row from a catalog row by the catalog, not the provider field

A second deployment of the same backend model writes the resolved provider back onto the shared row, so the provider field could not tell the two apart.

* test(messages): expect effort none on the Responses bridge for a Router deployment of an unlisted model

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(responses): say when a resolved model with no reasoning flag is still treated as unknown

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-03 12:13:09 -08:00
..
chat fix(openai): give a reasoning-only assistant message empty content (#55539) 2026-12-02 13:17:41 -08:00
completion fix(completions): send fields the OpenAI SDK has no keyword for in the request body (#55158) 2026-11-30 23:49:09 +00:00
decisions fix(decisions): match OpenAI format answers to questions by name (#52597) 2026-11-18 12:55:45 -08:00
embeddings fix(gemini): support explicit text in embedding inputs (#53135) 2026-11-20 11:05:11 -08:00
evals fix(llms): join api_base and route with one shared helper (#47535) 2026-10-21 06:59:32 +00:00
image_generation refactor(images): remove dall-e-2 and dall-e-3 code paths (#48703) 2026-10-28 17:48:09 -07:00
image_variations fix(openai): keep the upstream error body on e.response for OpenAI and Azure errors (#49079) 2026-10-29 23:30:02 -07:00
live test(unit): make 21 flaky unit tests deterministic (#54785) 2026-11-26 20:48:13 -08:00
realtime feat(realtime)!: support latest OpenAI audio models (#35600) 2026-11-03 07:27:52 +00:00
responses fix(responses): forward reasoning.effort for a Router deployment of a model the cost map does not list (#56048) 2026-12-03 12:13:09 -08:00
speech test: add package initializers to migrated unit test directories 2026-09-20 11:52:07 +00:00
transcriptions feat(zoom_ai): add Zoom Scribe speech-to-text on /v1/audio/transcriptions (internal copy of #51370) (#55885) 2026-12-03 02:21:42 +00:00
vector_store_files fix(proxy)!: return provider-matching 4xx for the LIT-8062 status code follow-ups (#45537) 2026-10-13 11:42:39 -07:00
vector_stores test: add package initializers to migrated unit test directories 2026-09-20 11:52:07 +00:00
videos feat(videos): add first-class OpenRouter video request fields (#50319) 2026-11-06 16:50:48 -08:00
__init__.py test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
test_cost_calculation.py feat(fal_ai): bill fal video clips by duration and resolution (#51679) 2026-11-13 12:55:55 -08:00
test_data_residency.py refactor(types): type the kwargs reads in the responses, images, realtime, files, rerank, batches and fine-tuning entrypoints (#54653) 2026-11-26 10:07:19 +00:00
test_gpt_reasoning_transformation.py fix(llms): treat chat-latest and gpt-chat-latest as gpt-5 family models (#51151) 2026-11-24 04:02:51 -08:00
test_is_model_gpt_5_model.py fix(llms): treat chat-latest and gpt-chat-latest as gpt-5 family models (#51151) 2026-11-24 04:02:51 -08:00
test_o_series_transformation.py fix(openai): drop or refuse an o-series reasoning_effort level the model map turns off (#54066) 2026-11-24 06:42:03 -08:00
test_openai.py fix(openai): preserve omitted headers for chat and embeddings (#53132) 2026-11-20 10:29:22 -08:00
test_openai_audio_speech.py fix(cost): bill OpenAI token-priced aac and flac speech on the length of the returned audio (#53308) 2026-11-21 19:53:23 +00:00
test_openai_authentication_error.py test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
test_openai_common_utils.py fix(router,files,batches)!: never resend a file or batch create the provider may already have (#51315) 2026-11-25 07:20:51 +00:00
test_openai_empty_response.py fix(openai): send chat completions through client.post so the SDK's per-message param transform stops holding the event loop (#46967) 2026-10-16 18:06:01 -07:00
test_openai_file_content_streaming.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_openai_image_edit_transformation.py fix(images): send image_edit markup as a multipart file part (#53815) 2026-11-25 04:14:57 +00:00
test_openai_workload_identity.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
test_organization_costs.py feat(spend): provider cost reconciliation for OpenAI, Bedrock, Azure and Vertex AI (#55259) 2026-12-01 17:17:51 -08:00
test_use_chat_completions_api_no_leak.py fix(openai): send chat completions through client.post so the SDK's per-message param transform stops holding the event loop (#46967) 2026-10-16 18:06:01 -07:00