litellm/tests/unit
Mikalai Karytka 7507379f61
fix(anthropic)!: send extra_body fields at the top level of the Messages request (#48373)
* fix(anthropic): send extra_body fields at the top level of the Messages request

extra_body passed to litellm.completion for an Anthropic model reached the
Messages API as a literal nested "extra_body" key, and Anthropic rejected the
request with "extra_body: Extra inputs are not permitted". That blocked every
Anthropic request field litellm doesn't model yet, including server-side
fallbacks

AnthropicConfig.transform_request now pops extra_body from the request params
and merges its keys into the wire body. The direct Anthropic, Vertex AI and
Azure paths all go through this transform. Paths on llm_http_handler, like
Bedrock invoke, already pop extra_body before transform_request, so nothing
is merged twice. extra_body only adds fields the request doesn't already
have. It can't override anything litellm built, can't change the model
(EXTRA_BODY_ROUTING_KEYS), and can't set messages or system, so content
that pre-call guardrails checked or redacted is the content that is sent

fallbacks is registered in BETA_GATED_FIELDS under both betas that unlock it,
server-side-fallback-2026-07-01 and server-side-fallback-2026-06-01. Under
drop_params a request that doesn't end up sending either of them, like a
Vertex AI leg where the 07-01 beta is filtered out or a deployment without
the header, drops fallbacks with a warning instead of getting a 400

The proxy rejects fallbacks inside a client's extra_body with a 400. Anthropic
runs the fallback model itself, so those targets never reach the key's model
access checks. Server-side fallback is set in the deployment's litellm_params
instead, next to the beta header the admin already configures there

When Anthropic serves a turn from a fallback model, usage.iterations spans
models, so its entries are no longer summed. The top-level usage, which
Anthropic documents as the attempt that served the turn, is priced at the
response's model. Attempts that declined with a billed refusal category are
not priced yet

The regression tests drive litellm.completion end to end against a mock
transport and assert the request body

* fix(anthropic): never take tools from extra_body

The proxy checks a key's or team's allowed tools against the request's
top-level tools only. A tools list inside extra_body skipped that check
and still reached Anthropic when the request had no top-level tools, so
extra_body now never supplies tools, like messages and system.

* fix(anthropic): keep every fallback attempt in usage

Dropping usage.iterations for a server-side fallback chain left only the
serving attempt in spend, so billed refusals on earlier attempts escaped
key and team budgets. Usage is back to adding up every attempt, which can
overcount but never lets billed tokens escape. #50556 prices each attempt
at its own model's rate.

* fix(proxy): reject fallbacks inside a fallback target's extra_body

A litellm fallback target can carry its own extra_body, which the router
merges into the request when that target runs. The proxy only rejected
fallbacks in the request's own extra_body, so a target's extra_body could
still pick Anthropic server-side fallback models the key isn't allowed to
use. Every fallback target's extra_body now gets the same check.

* test(anthropic): type the extra_body request test

* fix(anthropic): let extra_body override defaults on every Claude route and admit client fallbacks through the admin opt-ins

extra_body now wins over fields litellm set, so its max_tokens takes effect, while model, messages,
system, tools, and stream stay litellm's on anthropic/, azure_ai, and Bedrock invoke. A non-object
extra_body answers 400 instead of a retried 500. Bedrock invoke drops extra_body fallbacks under
drop_params without a fallback beta, like anthropic/. Client extra_body fallbacks go through the
banned-param opt-ins (allow_client_side_credentials or configurable_clientside_auth_params)

* fix(anthropic): let extra_body lower max_tokens but never raise it past the request's cap

The rate limiter reserves output tokens from the top-level max_tokens, so an
extra_body max_tokens above it would spend tokens the limiter never reserved.

* fix(anthropic): answer 400 for extra_body keys litellm builds unless drop_params is on

Setting model, messages, system, tools or stream in extra_body now answers 400 naming them, or drops them under drop_params, on anthropic/, Vertex AI, Azure AI and Bedrock invoke Claude. Databricks keeps sending extra_body as it is, and a non-object extra_body error is returned as a value

* fix(vertex_ai): apply the batch row's drop_params to its extra_body

A Claude batch row's extra_body merge got an empty litellm_params, so drop_params set on the row or deployment never reached the extra_body rule and a field litellm builds answered 400 instead of being dropped

* fix(anthropic): add the beta headers a field sent in extra_body needs

A field like context_management sent in extra_body reached Anthropic at the top level without the anthropic-beta header that the same top-level field gets, so Anthropic answered 400. The extra_body fields litellm forwards now count toward the beta headers too

* fix(anthropic): answer 400 for a raised extra_body max_tokens and promote system on Azure AI and OpenCode Go

An extra_body max_tokens above the request's answers 400 unless drop_params
is on, which caps it, so the output tokens the limiters reserved still bound
the call. Keys litellm builds that extra_body tries to set are dropped with a
warning under drop_params. Azure AI and OpenCode Go send extra_body.system as
the system prompt, since litellm moves a top-level system kwarg there.
extra_body output_config now wins over the mapped one, and transform_request
no longer pops extra_body from the caller's optional_params.

* fix(bedrock): keep the extra_body guard on Bedrock Mantle without the invoke beta strip

Bedrock Mantle inherits the Bedrock invoke extra_body guard. The invoke strip reads betas from the body's anthropic_beta list, which a Mantle body never carries, so under drop_params it dropped beta-gated thinking fields the client sent. Mantle now runs the Anthropic guard alone, the same way its own request path skips the strip

The internal-params wire test now reads the custom key at the top level on anthropic/, where extra_body fields go after this change

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-20 06:52:56 -08:00
..
a2a_protocol perf(token_counter): memoize token counts of long texts per tokenizer (#51904) 2026-11-16 19:21:55 +00:00
accounting feat(proxy): emit budget alerts for app customer scopes (#52955) 2026-11-19 16:21:09 -08:00
anthropic_interface feat(anthropic): forward message threads on native /v1/messages (#50976) 2026-11-10 18:33:54 -08:00
batch_completion test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
batches feat(vertex_ai): label Vertex requests with the caller's key, team, org, and project (#50732) 2026-11-14 00:39:01 -05:00
caching refactor(redis): move per-request miss, settlement and shutdown-drain tracking from Python into Rust (#51384) 2026-11-20 17:57:37 +09:00
completion_extras fix(responses)!: reject previous_response_id on chat completions and Messages (#53038) 2026-11-19 22:21:46 -08:00
compression test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
containers refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
db_scripts chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
decisions fix(decisions): support the litellm_proxy provider (#51611) 2026-11-19 11:44:40 -08:00
endpoints feat(vertex-ai)!: support gemini 3.1 flash tts (#31915) 2026-10-21 04:18:42 +00:00
enterprise fix(files): match gemini file id spellings to dispatch parsing (#53004) 2026-11-20 02:31:53 +00:00
expected_fine_tuning_api
expected_responses_api_request
experimental_mcp_client fix(mcp): load deprecated package aliases on demand (#48615) 2026-10-27 19:46:19 +00:00
extraction feat(extraction): add /v1/extraction with Cloudflare Clairic support (#47473) 2026-10-20 15:51:45 -07:00
files fix(hosted_vllm): accept the vLLM production-stack router's file and batch objects (#49068) 2026-10-30 23:11:34 -07:00
fine_tuning fix(fine_tuning): stop forwarding api_version to the OpenAI client (#44995) 2026-10-21 01:58:25 +00:00
fixtures
gateway feat(gateway): serve one native app in both modes, answering a master key caller's /v1/messages with it in front of Python (#52229) 2026-11-19 12:06:49 +09:00
google_genai fix(google_genai): honor snake_case generation_config on generateContent (#51139) 2026-11-18 03:47:08 +00:00
harness fix(responses): preserve incomplete status in synthetic streams (#52489) 2026-11-19 22:24:50 -08:00
images fix(images): honor additional_drop_params given as a tuple or holding non-string entries (#52390) 2026-11-19 09:56:32 -08:00
integration_support test(vertex): align scripted authentication with Rust routing (#53001) 2026-11-20 01:57:57 +00:00
integrations refactor(redis): move per-request miss, settlement and shutdown-drain tracking from Python into Rust (#51384) 2026-11-20 17:57:37 +09:00
interactions fix(responses): preserve incomplete status in synthetic streams (#52489) 2026-11-19 22:24:50 -08:00
litellm_core_utils fix(count_tokens): count custom-named deployments with their base_model's tokenizer (#50734) 2026-11-19 21:24:13 -08:00
litellm_proxy_extras fix(proxy-extras): keep the host query param in the v2 migration lock URL (#52797) 2026-11-19 09:37:00 -08:00
llms fix(anthropic)!: send extra_body fields at the top level of the Messages request (#48373) 2026-11-20 06:52:56 -08:00
mcp_client fix(mcp): return an upstream -32042 URL elicitation error from /mcp as a JSON-RPC error (#52384) 2026-11-19 08:56:01 -08:00
models feat(alerts): add email labels, bulk actions and threshold editing (#52139) 2026-11-16 15:32:19 -08:00
ocr test(rust-bridge): relocate dispatch tests before routing changes (#46926) 2026-10-16 12:29:33 -07:00
passthrough fix(bedrock): forward x-pass- headers on the /bedrock/model pass-through routes (#50728) 2026-11-10 21:28:49 +00:00
proxy fix(anthropic)!: send extra_body fields at the top level of the Messages request (#48373) 2026-11-20 06:52:56 -08:00
rag fix(rag)!: use team provider credentials and allow viewer and JWT team access (#45497) 2026-10-17 23:51:48 +00:00
realtime_api feat(bedrock): derive STS session tags and session name from caller identity (#52978) 2026-11-19 17:11:09 -08:00
redis feat(auth_cache): name each auth cache object with a typed key (#52831) 2026-11-20 17:57:38 +09:00
repositories feat(usage-export): include key and user metadata objects in daily activity export rows (#49360) 2026-11-20 03:58:01 +00:00
rerank_api test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
responses fix(responses): preserve incomplete status in synthetic streams (#52489) 2026-11-19 22:24:50 -08:00
router_rust feat(redis): serve the health checks' deployment states from a native store (#50357) 2026-11-13 03:22:28 +00:00
router_strategy feat(tts)!: stream audio from the provider as it arrives on /v1/audio/speech (#46222) 2026-11-17 15:03:12 +00:00
router_utils refactor(router): delete router code nothing calls (#52516) 2026-11-19 06:11:10 +09:00
rust_bridge feat(bedrock): derive STS session tags and session name from caller identity (#52978) 2026-11-19 17:11:09 -08:00
sandbox fix(streaming): keep merged think tags balanced and split SSE lines only on CR/LF (#48755) 2026-10-28 17:00:29 -07:00
search fix(tavily): price the search depth chosen automatically (#52564) 2026-11-18 13:04:12 -08:00
secret_managers chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
skills feat(skills): add a litellm-setup agent skill (#47731) 2026-10-28 15:44:43 -07:00
systemone fix(databricks): reuse base OAuth for decisions (#48395) (#48527) 2026-10-26 20:18:16 -07:00
telemetry feat(telemetry): add AggregatingSink, fixed-bucket histograms, Report and HttpExporter (#45487) 2026-10-13 18:33:01 -07:00
test_router fix(bedrock): send native chat and Responses calls to aws_bedrock_runtime_endpoint like Converse (#50582) 2026-11-19 16:40:23 -08:00
text_completions fix(proxy): name the deployment in stream error alerts on chat, completions, responses and messages (#51034) 2026-11-11 22:50:23 +00:00
tracing fix(proxy): cooldown errors carry 429, Sentry starts at boot without request bodies, tracing failures log at ERROR, exporter counters exported (#46344) 2026-10-16 00:53:52 +00:00
types fix(caching): preserve otel cache hits and align logging metadata (#52971) 2026-11-19 16:25:26 -08:00
vector_stores feat(vector_stores): add YAML-configured unified search fallbacks (#52093) 2026-11-18 08:41:02 -08:00
videos refactor(typing): clear 1141 basedpyright Any errors across 182 files (#50711) 2026-11-11 22:11:47 +00:00
__init__.py
AGENTS.md feat(vector_stores): add OpenSearch k-NN search as a vector store provider (#47759) 2026-10-29 08:15:05 -07:00
conftest.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
create_mock_standard_logging_payload.py test: migrate legacy unit dirs and unrun folders into tests/unit, tests/integration and tests/e2e (#45940) 2026-10-11 06:24:57 -07:00
test_a2a_registry_lookup.py
test_acompletion_session_reuse_e2e.py
test_add_deployment_no_master_key.py
test_aembedding_session_reuse_e2e.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_anthropic_beta_gated_fields.py fix(anthropic)!: drop beta-gated body fields under drop_params (#48793) 2026-10-29 06:25:31 -07:00
test_anthropic_beta_headers_filtering.py fix(bedrock): forward the compact-2026-09-04 compaction param on Invoke /v1/messages (#51223) 2026-11-11 15:10:32 -08:00
test_anthropic_skills_transformation.py
test_assert_ci_coverage.py ci(unit): split proxy-infra-root in two, isolate subprocess tests, make its file exclusions take effect (#51316) 2026-11-11 17:39:10 -08:00
test_assert_secret_absent.py ci: run the integration groups on GitHub Actions (#48985) 2026-10-29 12:50:08 -07:00
test_assert_workflow_dir_hygiene.py
test_audio_transcription_rust_bridge.py fix(bedrock): omit system prompt from audio transcription and report its token usage (#41565) 2026-10-28 19:23:15 -07:00
test_azure_ad_token_credential_resolution.py feat(proxy)!: only let clients pick S3 buckets the admin allowed (#47496) 2026-11-06 02:50:15 +00:00
test_azure_ai_grok_4_3_model_metadata.py
test_azure_ai_grok_4_6_model_metadata.py
test_baseten_glm_5_3_model_metadata.py
test_batch_completion_models_all_responses.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_bedrock_marengo_embed_3_model_metadata.py
test_build_core_distribution.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_cerebras_llama_model_metadata.py chore(cost-map): remove the 52 rows whose provider retired them before 2026 (#49974) 2026-11-03 16:23:06 -08:00
test_chat_ui_responses_session.py
test_check_licenses.py
test_check_mcp_operation_boundary.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_check_migrations_lock_timeout.py fix(proxy-extras): bound migration lock waits with SET LOCAL lock_timeout in the migration SQL (#46329) 2026-10-13 20:51:03 -07:00
test_check_migrations_no_data_rewrites.py
test_check_openapi_docs.py feat(proxy): support Cursor CLI subscriptions (#52205) 2026-11-16 21:49:12 -08:00
test_check_py310_typing_imports.py
test_check_test_quality.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_check_type_discipline.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_check_unbounded_in_lists.py test: migrate legacy unit dirs and unrun folders into tests/unit, tests/integration and tests/e2e (#45940) 2026-10-11 06:24:57 -07:00
test_check_windows_wheel_install.py test: move packaging and install checks off CircleCI build_and_test (#45757) 2026-10-10 09:33:51 -07:00
test_ci_path_filter.py Skip unit-core shards for test-only pull requests (#52720) 2026-11-19 02:00:05 +00:00
test_claude_fable_5_config.py feat: add claude mythos 5.2 to vertex ai cost map (#50940) 2026-11-10 09:35:37 -08:00
test_claude_haiku_5_5_config.py fix(model_prices): consolidate claude-haiku-5-5 over-100k pricing and capability flags (#45151) 2026-10-07 14:14:47 -07:00
test_claude_opus_4_6_config.py
test_claude_opus_4_8_config.py
test_claude_opus_5_config.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_claude_sonnet_5_config.py refactor(cost-map): remove openrouter rows, part 5 of 5 (#45669) 2026-10-09 22:48:55 +00:00
test_cli_package.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_cloudflare_workers_ai_model_metadata.py
test_completion_timeout_resolution.py fix(router)!: bound fake-streamed calls by the request timeout, not stream_timeout (#47162) 2026-10-17 22:08:02 +00:00
test_compression.py
test_conftest_isolation.py refactor(model-cost): move the cost map inputs, fetch and register_model overlay into Rust (#50501) 2026-11-10 02:37:35 +00:00
test_constants.py fix(router): cap the default OTPM reservation and reconcile token counters after each call (#49054) 2026-10-29 20:32:04 -07:00
test_container_router.py
test_cost_calculation_log_level.py
test_cost_calculator.py fix(cost): price a requested fireworks_ai router from its own row when Fireworks serves the base model (#52973) 2026-11-20 04:34:51 +00:00
test_cost_map_guard.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_count_tokens_public_api.py feat(mistral): add native upstream token counting support (#50652) (#50653) 2026-11-14 03:19:57 -05:00
test_dashscope_image_generation.py feat(dashscope): add image edits and text-to-speech (#48998) 2026-10-29 17:48:38 -07:00
test_daybreak_model_metadata.py
test_deepseek_model_metadata.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_default_branch.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_detect_changes.py Skip unit-core shards for test-only pull requests (#52720) 2026-11-19 02:00:05 +00:00
test_docker_entrypoint.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_docker_no_network_on_deploy.py chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
test_dockerfile_apk_repository.py chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
test_dockerfile_bedrock_realtime_extra.py chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
test_dockerfile_non_root.py chore: move deployment sources under litellm/deploy (#50981) 2026-11-12 04:19:56 +00:00
test_e2e_egress_sentinel.py
test_elevenlabs_tts_pricing.py fix(cost-map): rolling registry audit, add elevenlabs api rates, together minimax-m3.1-flash, mistral voxtral 3 and azure_ai phi-4 dates (#47623) 2026-10-23 14:57:35 -07:00
test_empty_mock_response.py fix: honor empty mock completion responses (#48162) (#48266) 2026-10-28 00:56:45 +00:00
test_env_key_doc_gate.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_exception_exports.py
test_exception_header_preservation.py fix(openai): keep the upstream error body on e.response for OpenAI and Azure errors (#49079) 2026-10-29 23:30:02 -07:00
test_exception_mapping_request_attribute.py
test_fake_openai_endpoint.py test: migrate local_testing SDK and provider tests out of build_and_test (#45760) 2026-10-10 23:14:25 +00:00
test_filter_out_litellm_params.py
test_fireworks_serverless_model_costs.py
test_gate_slot_lock.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_gemini_3_1_flash_lite_image_pricing.py
test_gemini_4_argon_model_metadata.py feat(gemini)!: auto-continue gemini-4-argon long decodes with continuationToken (#46240) 2026-10-15 22:54:23 +00:00
test_gemini_tts_native_audio_pricing.py
test_get_blog_posts.py chore(blog): refresh the bundled blog posts backup with the latest 50 posts from the docs RSS feed (#49971) 2026-11-03 23:41:15 +00:00
test_git_hooks.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_gpt_5_4_model_metadata.py
test_gpt_5_5_model_metadata.py
test_gpt_image_cost_calculator.py fix(cost): bill SVG authoring usage on OpenAI image responses (#52571) 2026-11-18 13:04:49 -08:00
test_gpt_realtime_mode.py chore(cost-map): remove the 52 rows whose provider retired them before 2026 (#49974) 2026-11-03 16:23:06 -08:00
test_groq_streaming_encoding.py fix(streaming): keep merged think tags balanced and split SSE lines only on CR/LF (#48755) 2026-10-28 17:00:29 -07:00
test_guardrail_exception_status_codes.py
test_guardrails.py Add guardrails.apply SDK helper (#49217) (#49469) 2026-10-31 23:37:45 +00:00
test_integration_run.py test(integration): isolate every multi-worker integration suite by default (#46027) 2026-10-12 03:46:06 -07:00
test_internal_context.py refactor(router): delete router code nothing calls (#52516) 2026-11-19 06:11:10 +09:00
test_lazy_imports.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_lint_base_counts.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_lint_workflow_diff_gates.py ci: fit the pull request gate into five minutes (#52660) 2026-11-18 14:41:04 -08:00
test_litellm_cli.py ci(unit): cut unit check time with cheaper per-test resets and fewer non-unit tests (#51864) 2026-11-14 15:41:30 -08:00
test_litellm_overhead.py test(unit): wait on the work itself instead of fixed sleeps (#46261) 2026-10-13 12:41:06 -07:00
test_litellm_params_reserved_keys.py
test_logging.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_lowest_latency_zero_tokens.py
test_main.py fix(azure_ai)!: call Responses natively for a model router on a Foundry project or resource base (#52474) 2026-11-18 16:36:46 +00:00
test_main_module_header.py
test_mistral_large_4_model_metadata.py chore(cost-map): fill Bedrock regional and Azure Government pricing gaps, rolling registry audit 2026-11-18 (#52458) 2026-11-18 07:02:05 -08:00
test_mistral_medium_3_5_model_metadata.py
test_mistral_small_4_0_model_metadata.py
test_mistral_zai_glm_5_2_model_metadata.py
test_model_block_unblock.py refactor(router): move router callers onto the entry points and invert the proxy imports (#48847) 2026-10-29 17:26:33 +00:00
test_model_cost_aliases.py fix(cost-map): restore backward compatibility after the Rust loader move (#51545) 2026-11-14 08:12:17 +09:00
test_model_param_helper.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_model_prices_and_context_window.py fix(cost-map): refresh Azure and Together retirement dates and add GMI Gemini 4 Hydrogen (#52763) 2026-11-19 16:18:40 +00:00
test_model_response_normalization.py
test_muse_ember_1_0_model_metadata.py feat(cost-map): add meta/muse-ember-1.0 with long-context rates from the Meta pricing page (#50847) 2026-11-10 06:36:06 +00:00
test_muse_spark_1_1_model_metadata.py
test_muse_spark_1_2_model_metadata.py
test_muse_spark_1_3_model_metadata.py refactor(router): route the router family through RoutingContext and close the outside surface (#49118) 2026-10-30 19:18:54 -07:00
test_mutation_report.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_nested_drop_params.py
test_no_top_level_test_invocations.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_non_chat_routes_open_llm_spans.py
test_openai_embedding_encoding_format_default.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_record_replay_proxy.py test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
test_openai_service_tier_long_context_pricing.py
test_openapi_docs_gate.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_package_layout.py
test_package_metadata.py fix(packaging): keep the litellm-proxy package version in step with litellm (#51807) 2026-11-14 18:16:47 -08:00
test_pre_commit_lint.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_prisma_generate_if_needed.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_private_usage_aliases.py feat(model_capacity): replace the python dynamic rate limiter v3 with a rust callback (#51540) 2026-11-17 22:20:54 +00:00
test_process_helpers.py
test_project_alias_tracking.py
test_project_tags_pydantic.py
test_proxy_auth.py
test_pydantic_namespaces.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_rag_openai_ingestion.py
test_rate_limit_error_unification.py feat(model_capacity): replace the python dynamic rate limiter v3 with a rust callback (#51540) 2026-11-17 22:20:54 +00:00
test_rate_limit_error_unification_rust.py feat(callbacks-parallel-request-limiter): port parallel request limiter v3 to a rust callback (#51537) 2026-11-16 22:56:38 -08:00
test_read_rc_version.py
test_recursive_detector.py chore: move workspace packages under litellm (#51000) 2026-11-12 04:19:57 +00:00
test_redact_string_in_error_paths.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_redis.py fix(redis): drop ssl_ kwargs from the async pool when ssl is off (#52344) 2026-11-17 13:23:34 -08:00
test_redis_credential_provider.py
test_register_model_custom_pricing.py fix(cost-map): restore backward compatibility after the Rust loader move (#51545) 2026-11-14 08:12:17 +09:00
test_register_model_zero_cost_persistence.py
test_replicate_model_key_format.py
test_responses_api_bridge_non_stream.py refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
test_responses_id_security.py fix(responses)!: authorize and decode comparison response IDs (#49402) 2026-11-03 03:40:46 +00:00
test_responses_streaming_container_ownership.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_retrieve_batch_bedrock_dispatch.py refactor(llms): expose public names for private provider helpers (#45037) 2026-10-07 08:49:25 -07:00
test_router_block_helpers.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_exception_redaction.py fix(streaming)!: map stream read timeouts to litellm.Timeout on chat, messages, and responses (#47198) 2026-10-18 13:58:34 +00:00
test_router_get_settings.py
test_router_google_genai.py
test_router_model_cost_isolation.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_router_order_fallback.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_per_deployment_num_retries.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_redis_init.py
test_router_retry_backoff_headers.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_retry_non_retryable_errors.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_retry_policy_update.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_silent_experiment.py fix(router)!: stop a client's metadata flag from turning off silent_model mirroring (#52083) 2026-11-16 15:45:56 -08:00
test_router_streaming_fallback_metadata.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_router_weighted_failover.py refactor(router): delete the python router core, the rust core is the only core (#50178) 2026-11-05 10:40:46 -08:00
test_ruff_strict_gate.py chore: move config and docs off the repo root (#50966) 2026-11-11 18:29:35 -08:00
test_sambanova_model_metadata.py
test_scaledown_model_prices.py feat(scaledown): add native text provider support (#44168) 2026-10-10 14:01:17 -07:00
test_scheduler.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_secret_redaction.py perf(logging): scan opt-in spend-log tokens natively (#51770) 2026-11-15 06:09:02 +08:00
test_seed_tracing_fixtures.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_select_changed_tests.py ci(unit): run the proxy-extras tests when a pull request touches proxy-extras (#52917) 2026-11-19 11:52:05 -08:00
test_select_ui_test_scope.py fix(ci): measure PR gates from the target branch's current tip (#49078) 2026-10-29 18:28:16 -07:00
test_service_logger.py test: move 76 live top-level tests to offline unit and integration coverage (#45352) 2026-10-08 10:33:35 -07:00
test_setup_wizard.py
test_shared_session_integration.py
test_snowflake_model_prices.py chore(cost-map): rolling registry update, fal_ai kling v4, azure gpt-6-luna flex, snowflake, bedrock/mantle claude 5.5 (#52299) 2026-11-17 19:36:09 +00:00
test_socket_policy.py
test_spend_logs_guard.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_ssl_verify_unit.py
test_stream_chunk_builder_annotations.py fix(anthropic)!: send /v1/messages PDF documents to OpenAI-shaped providers as file parts (#47166) 2026-10-29 08:06:12 -07:00
test_stream_chunk_builder_citations.py
test_stream_chunk_builder_images.py
test_streaming_connection_cleanup.py fix(aiohttp): reset the upstream connection when a stream closes early, so aborted Bedrock Invoke streams stop (#50657) 2026-11-14 12:08:03 -05:00
test_system_message_format_bug.py fix(prompt_templates): do not mutate messages in-place in function_call_prompt (#41676) 2026-10-15 14:37:11 -07:00
test_test_quality_gate.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_thinking_enabled.py
test_together_ai_model_metadata.py fix(cost-map): refresh Azure and Together retirement dates and add GMI Gemini 4 Hydrogen (#52763) 2026-11-19 16:18:40 +00:00
test_tool_loop.py fix(tool_choice): accept the Responses API's flat allowed_tools layout on chat completions (#50467) 2026-11-10 13:04:06 -08:00
test_type_check_gate.py chore: move config and docs off the repo root (#50966) 2026-11-11 18:29:35 -08:00
test_type_discipline_gate.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_typesafe_model_metadata.py fix(cost): price typesafe/jev-1.14.0 (#46594) 2026-10-14 20:27:35 -07:00
test_unit_shard_missing_paths.py ci: render lint, unit and smoke checks as <tier> / <job> with one collector per tier (#45480) 2026-10-09 04:28:41 +00:00
test_unit_shard_per_test_timeout.py ci: render lint, unit and smoke checks as <tier> / <job> with one collector per tier (#45480) 2026-10-09 04:28:41 +00:00
test_utils.py test(utils): skip gemini/genie-4 in the gemini tpm/rpm check (#52900) 2026-11-19 10:57:29 -08:00
test_utils_get_model_info.py feat(cost-map): price Claude on Bedrock Mantle under bedrock_mantle/ and bedrock/mantle/ (#52231) 2026-11-17 07:12:16 +00:00
test_utils_get_optional_params.py fix(cohere)!: map tool_choice, reasoning_effort and json_schema response_format on the v2 chat route (#50834) 2026-11-17 18:10:37 +00:00
test_utils_module_docstring.py
test_uuid_helper.py fix: support Python 3.15 (#48359) 2026-10-26 16:00:11 +00:00
test_vcr_classification.py test: move offline logging, secret manager and provider tests from legacy dirs into tests/unit (#45554) 2026-10-09 09:48:10 -07:00
test_vcr_conftest_common_banner.py ci: remove CircleCI (#50950) 2026-11-11 15:38:27 -08:00
test_vcr_filters.py test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
test_vcr_leak_guard.py test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
test_vcr_redis_persister.py test: migrate tests/llm_translation into unit, integration and e2e tiers (#45759) 2026-10-11 07:58:53 +00:00
test_vcr_safe_body_matcher.py
test_version.py feat(sdk): build core from an independent packaging manifest (#44340) 2026-10-08 18:40:14 -07:00
test_vertex_ai_xai_grok_prompt_caching_metadata.py
test_video_generation.py fix(cost): keep a deployment's per-second video price over the catalog row's flat price (#51688) 2026-11-15 12:04:41 -08:00
test_with_dashboard_node.py chore: move scripts and runtime sources under litellm (#51006) 2026-11-12 04:19:57 +00:00
test_ws_vcr.py test: move whole-unit legacy test files into tests/unit and delete dead skips (#44807) 2026-10-07 05:02:28 +00:00
test_xai_grok_4_3_model_metadata.py
test_xai_responses_auto_routing.py fix(router)!: stop a chat-mode Mantle deployment from rewriting the shared Responses routing row (#46263) 2026-10-17 21:39:14 +00:00
whitelisted_bedrock_models.txt chore(cost-map): fill Bedrock regional and Azure Government pricing gaps, rolling registry audit 2026-11-18 (#52458) 2026-11-18 07:02:05 -08:00