litellm/tests/unit/responses
Mateo Wang 294cdc73fd
refactor(types): type the kwargs reads in the responses, images, realtime, files, rerank, batches and fine-tuning entrypoints (#54653)
* refactor(types): type the kwargs reads in the responses, images, realtime, files, google_genai, rerank, passthrough, batches and fine_tuning entrypoints

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

* test(responses): assert the returned response in the shared_session call-site test

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

* fix(google_genai): pass a non-string litellm_call_id through as None instead of validating it

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

* fix(types): read a non-callable azure_ad_token_provider and an attribute-less user_api_key_dict as unset instead of raising

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

* fix(responses): refuse a user_api_key_dict without auth attributes at the read so token limits fail closed

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

* test(rerank): assert the provider request for a wrong-typed instruction

Replace the two tests that inspected get_optional_rerank_params call args with one that checks the body sent to hosted_vllm, mark the files raw_logging_obj reads Final, and drop a banner comment that repeated the test names

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

* refactor(images): read image_generation kwargs without a cast

main's volcengine change cast the untyped **kwargs to a Mapping; this branch types them as object, so the cast is no longer needed

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

* fix(responses): keep a prompt_version sent as a numeric string

aresponses narrowed prompt_version to int and dropped "2", which main forwards to the prompt hook and Dotprompt resolves to the .v2 template. Parse digit strings to int so the same template is selected

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

* fix(responses): parse prompt_version with isdecimal so a superscript digit does not raise

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-11-26 10:07:19 +00:00
..
litellm_completion_transformation refactor(types): type the dict-style accessors on the response models and their read sites (#54620) 2026-11-26 04:15:22 +00:00
mcp fix(proxy): keep a request's slot, TPM and budget holds while it runs MCP tools (#54469) 2026-11-26 08:11:44 +00:00
__init__.py
test_additional_tools.py feat(proxy): mixed Codex model picker and LiteLLM routing on native codex routes (#49408) 2026-11-06 11:14:47 -08:00
test_custom_tool_call.py
test_input_items_query.py fix(proxy): forward limit, order, after, before and include on GET /v1/responses/{id}/input_items (#51259) 2026-11-20 07:54:26 -08:00
test_instructions_length.py fix(responses): send bridged system prompts too long for instructions as input (#52964) 2026-11-20 11:56:47 -08:00
test_metadata_codex_callback.py
test_no_duplicate_spend_logs.py
test_null_test_fix.py
test_responses_api_bridge_flag.py fix(responses): reject an unresolvable previous_response_id on the chat completions bridge (#53766) 2026-11-25 13:32:42 +00:00
test_responses_api_lifecycle.py fix(responses): log the resolved provider on Responses API calls (#52622) 2026-11-18 22:34:16 +00:00
test_responses_api_request_body.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_responses_prompt_management.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_responses_router_cooldown.py fix(openai): relay provider error codes, types, and Responses params from OpenAI-compatible backends (#51809) 2026-11-24 02:23:00 +00:00
test_responses_streaming_iterator.py fix(responses): resume background response streams with stream and starting_after (#48819) 2026-10-29 02:31:22 -07:00
test_responses_supported_endpoints_passthrough.py
test_responses_utils.py fix(responses): reject an unresolvable previous_response_id on the chat completions bridge (#53766) 2026-11-25 13:32:42 +00:00
test_responses_websocket_all_providers.py fix(responses): reject an unresolvable previous_response_id on the chat completions bridge (#53766) 2026-11-25 13:32:42 +00:00
test_rust_bridge_websocket.py refactor(rust-bridge): require the native extension (#48852) 2026-10-28 13:16:56 -07:00
test_sse_output_recovery.py
test_streaming_iterator.py fix(responses): always stream tool argument fields as strings for every Responses provider (#53953) 2026-11-24 03:45:17 +00:00
test_streaming_iterator_error_events.py fix(openai): relay provider error codes, types, and Responses params from OpenAI-compatible backends (#51809) 2026-11-24 02:23:00 +00:00
test_text_format_conversion.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00