litellm/tests/unit/llms/openai_like
mateo-berri 855219f1c1 fix(responses): refuse background only where the server starts a run
Adapted from main commit ff4206896f for
lts/1.108.x. completion() here calls the guard inline, dispatch resolution
also takes the api_base, and the bridge's request_data and the OpenAI URL
builder's litellm_params are typed as on main so the type gate stays flat.
The JSON provider URL builder folds two nested ifs into one expression with
the same result. refuseless, openinfer, zerogpu and bigmodel have no
Responses config on this line, so their parts are left out.

A bridged call is refused before any request only where the server is known
to start a background run. Any other server gets background as sent, and a
queued reply ends in one 400 that the router never retries. drop_params drops
background on every bridged call that does not stream live.
2026-11-25 09:48:16 -08:00
..
chat test: add package initializers to migrated unit test directories 2026-09-20 11:52:07 +00:00
embedding test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
messages fix(anthropic): add the dangerous-tool-use beta when a /v1/messages request carries safeguards (#43955) 2026-10-27 17:23:26 -07:00
responses test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
__init__.py test: add package initializers to migrated unit test directories 2026-09-20 11:52:07 +00:00
test_abliteration_provider.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_assemblyai_provider.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_charity_engine.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_cognition_provider.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_coralbricks_provider.py feat(providers): add CoralBricks as a native provider (#44700) 2026-10-12 21:56:59 +00:00
test_cortecs_provider.py feat(providers): add Cortecs as an OpenAI-compatible provider (#43872) 2026-09-30 19:49:24 -07:00
test_dynamic_config.py fix(responses): refuse background only where the server starts a run 2026-11-25 09:48:16 -08:00
test_empiriolabs_provider.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_inferenceapis_provider.py feat(providers): add Inference APIs as OpenAI-compatible provider (#41669) 2026-10-15 08:17:36 -07:00
test_json_loader.py fix(crusoe): update base URL to current endpoint (#33121) 2026-10-15 19:10:58 -07:00
test_json_providers.py fix(json_providers): price gateway transcription at OpenAI's row and replace the OpenAI key with a lowercase caller authorization header 2026-11-17 10:36:46 -08:00
test_libertai_provider.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_meta_provider.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_model_info.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_perplexity_orchestrator_provider.py fix(perplexity_orchestrator): rewrite legacy thinking for adaptive Claude models, limit service_tier by model and honor allowed_openai_params 2026-11-22 20:21:20 -08:00
test_pinstripes_provider.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_prism_provider.py feat(providers): add Prism provider (internal copy of #40914) (#41961) 2026-09-28 16:07:09 -07:00
test_provider_affinity_forwarding.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_reka_provider.py feat: add Reka as an OpenAI-compatible provider (#44278) 2026-10-05 17:47:23 -07:00
test_resetdata_provider.py fix(provider): keep JSON providers off the OpenAI key on every endpoint and price ResetData 2026-11-17 10:32:34 -08:00
test_scx_ai_provider.py feat(cost-map): add scx-ai DeepSeek-V4.1-flash, GLM-5.3 and Kimi-K3 (#46496) 2026-10-14 20:22:16 -07:00
test_tensormesh_provider.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_xiaomi_mimo.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00