litellm/tests/unit/llms
devin-ai-integration[bot] f81a3f5243
fix(responses): report truncated bridged output as incomplete and echo request params (#44460)
* fix Bedrock json mode bug

* fix finish reason when max tokens hit

* fix hardcoded completion for streaming responses

* fix: echo Responses API request params onto bridged response

* refactor(responses): drop explanatory comments and build null finish_reason test without mutation

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

* test(responses): type the terminal event and Bedrock mock helpers

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

* fix(responses): keep truncated WebSocket turns in history and drop invalid echoed params

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

---------

Co-authored-by: Mrinal Chanshetty <mrinal@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-05 11:27:12 -07:00
..
a2a refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
aiml test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
aiohttp_openai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
anthropic refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
apiserpent test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
azure refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
azure_ai test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
base_llm feat(anthropic): workload identity federation and pluggable identity sources (#44448) 2026-10-03 17:08:30 -07:00
baseten test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
bedrock fix(responses): report truncated bridged output as incomplete and echo request params (#44460) 2026-10-05 11:27:12 -07:00
bedrock_mantle fix(bedrock_mantle): route Claude chat completions to the native Messages endpoint (#43646) 2026-10-03 15:24:41 -07:00
black_forest_labs refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
bytez test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
cerebras test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
chat fix(params): validate stream_chunk_size once, before any provider call (#43222) 2026-09-26 23:01:20 +00:00
chatgpt fix(chatgpt): preserve requested service tier in Responses calls (#40108) 2026-10-02 10:57:37 -07:00
clarifai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
claude_code refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
cloudflare test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
codex refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
cohere refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
cometapi refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
compactifai test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
crusoe test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
custom_httpx feat(anthropic): workload identity federation and pluggable identity sources (#44448) 2026-10-03 17:08:30 -07:00
dashscope refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
databricks fix(streaming): keep the served service_tier on streamed chunks and spend rows (#42870) 2026-09-29 12:54:17 -07:00
datarobot test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
deepagents feat: add litellm.agent() to run claude code, codex, opencode and deep agents through the ai gateway (#43885) 2026-10-01 22:27:49 +00:00
deepgram refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
deepinfra test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
deepseek refactor(anthropic): rename experimental_pass_through to pass_through (#43329) 2026-09-26 13:00:50 -07:00
docker_model_runner test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
e2b refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
edenai test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
elevenlabs refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
exa_ai fix(exa): fall back to highlights/summary when text is missing (#42213) 2026-10-02 14:15:15 -07:00
fal_ai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
fastcrw test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
featherless_ai test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
fireworks_ai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
gdc test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
gemini refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
gigachat refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
github_copilot refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
gradient_ai test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
groq test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
heroku test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
hosted_vllm fix(hosted_vllm): keep reasoning_content on replayed assistant messages (#43599) 2026-09-30 13:12:28 -07:00
huggingface test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
inception test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
jina_ai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
langflow fix(ci): stop stale CI reds, keep unit tests off the host env, retry CyberArk policy conflicts (#43294) 2026-09-26 09:25:13 -07:00
laya feat: add Bespoke Nimble gateway and OSS classifier support (#44246) 2026-10-02 19:37:08 -07:00
lemonade test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
litellm_proxy fix(spend): attribute CLI session spend to the per-user cli-session alias instead of the hashed session token (#40541) 2026-09-24 18:21:47 -07:00
llamafile test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
lm_studio test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
manus refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
meta test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
meta_llama test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
minimax refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
mistral test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
modelscope refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
mongodb test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
moonshot chore(cost-map): remove models past their deprecation date (#42435) 2026-09-22 21:19:26 +00:00
nadir test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
nebius test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
neosantara test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
nimble test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
novita test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
nscale test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
nvidia_nim refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
nvidia_riva test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
oci refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
ocr test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
ollama test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
oobabooga test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
openai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
openai_like feat(providers): add Cortecs as an OpenAI-compatible provider (#43872) 2026-09-30 19:49:24 -07:00
opencode feat: add litellm.agent() to run claude code, codex, opencode and deep agents through the ai gateway (#43885) 2026-10-01 22:27:49 +00:00
openrouter refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
ovhcloud refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
parallel_ai test: add __init__.py to phase 12 unit test directories 2026-09-20 12:36:15 +00:00
parasail test: add __init__.py to phase 12 unit test directories 2026-09-20 12:36:15 +00:00
pass_through test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
perplexity test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
pg_vector test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
publicai test: add __init__.py to phase 12 unit test directories 2026-09-20 12:36:15 +00:00
ragflow test: add __init__.py to intermediate phase 12 unit test directories 2026-09-20 12:37:21 +00:00
recraft refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
reducto test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
replicate refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
runwayml test: add __init__.py to phase 12 unit test directories 2026-09-20 12:36:15 +00:00
s3_vectors test: add __init__.py to intermediate phase 12 unit test directories 2026-09-20 12:37:21 +00:00
sagemaker refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
sail test(e2e): align completion, SAIL, and spend-log fixtures with supported contracts (#43902) 2026-09-30 14:21:22 -07:00
sambanova test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
sap test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
scaleway feat(scaleway): add rerank support (#44160) 2026-10-02 21:20:05 -07:00
snowflake refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
soniox test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
stability refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
tencent refactor(anthropic): rename experimental_pass_through to pass_through (#43329) 2026-09-26 13:00:50 -07:00
tinyfish refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
together_ai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
tool_loop feat(harness): add Harness.TOOL_LOOP, a minimal in-process tool-calling loop (#44391) 2026-10-03 17:33:01 +00:00
valkey test: migrate legacy provider tests to tests/unit (wave 2, phase 13) 2026-09-20 14:18:49 +00:00
vercel_ai_gateway test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
vertex_ai refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
volcengine test: stop CI tests from downloading tokenizer files and images (#43257) 2026-09-25 19:27:48 -07:00
voyage refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
wandb test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
watsonx refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
xai feat(xai): add native xAI batches and files support (#42812) 2026-09-25 15:35:20 -07:00
you_com test: migrate phase 14 wave 2 provider tests to tests/unit 2026-09-20 11:01:40 +00:00
zai test: add __init__.py to every tests/unit directory this migration touches 2026-09-20 11:52:09 +00:00
__init__.py test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
test_cache_control_and_reasoning.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_file_content_block.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_file_search_responses.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_lifecycle_fix.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_oss_decision.py feat: add Bespoke Nimble gateway and OSS classifier support (#44246) 2026-10-02 19:37:08 -07:00
test_polling_url_origin_match.py test: move tests/test_litellm core utils, routing, responses, caching and rust_bridge into tests/unit (#43199) 2026-09-25 17:10:13 -07:00
test_predibase_transformation.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00