litellm/tests/unit/integrations
devin-ai-integration[bot] 2908e228f0
fix(anthropic)!: map reasoning effort none to supported thinking modes (#55848)
* fix(anthropic): reject disabling always-on thinking unless params are dropped

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

* fix(anthropic): preserve dictionary callers in messages mapping

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

* fix(anthropic): use between-tools thinking when supported

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

* fix(anthropic): preserve between-tools thinking on tool follow-ups

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

* fix(anthropic): avoid duplicate untyped capability reads

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

* fix(cost-map): register between-tools thinking capability schema

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

* test(s3-log): record supports_between_tools_thinking in the s3_v2 golden payloads

* fix(anthropic): keep thinking off on tool turns and treat unmapped Opus and Sonnet 5.5 ids as always thinking

With modify_params on, a tool follow-up that sent thinking disabled dropped
the param, so Haiku 5.5 thought again and billed those tokens. The replay
guard now treats disabled like between_tools.

Cost-map fallback rules mark unmapped Opus and Sonnet ids from 5.5 on as
always thinking, and Sonnet ones as supporting between_tools, so they no
longer get disabled, which those models reject. Copilot and Mantle Sonnet 5.5
rows opt out of between_tools explicitly, since it is not verified there.

The proxy no longer advertises none for always-thinking models that refuse
it, the auto-router baseline honors per-request drop_params, and the Python
refusal text now matches the Rust one.

* fix(anthropic): treat explicit disabled thinking like reasoning_effort none

An explicit thinking.type=disabled on a model that always thinks used to be
dropped silently, so the model kept thinking and billed it. It now follows the
same rule as reasoning_effort none: between_tools where the model supports it,
otherwise a 400 unless drop_params is set, on chat, /v1/messages and Bedrock.

The model listing only stops offering none on routes where LiteLLM maps it to
Anthropic's thinking param, so gateways that forward the level keep it.

Databricks Sonnet 5.5 accepts images, so its cost map row sets supports_vision.

* fix(anthropic): keep leaving out disabled thinking where between_tools is missing

Opus 5.5, Fable and Mythos go back to the #37510 behavior for
thinking={"type": "disabled"}. LiteLLM leaves it out with a warning and the
request answers 200, so routers that send one request to several model
generations keep working. Sonnet 5.5 still gets between_tools.

The Rust /v1/messages path maps disabled thinking the same way, and Databricks
Claude chat now maps it too instead of forwarding a value Databricks rejects.

* fix(anthropic): send between_tools to Copilot and Mantle Sonnet 5.5 and keep none in Copilot listings

---------

Co-authored-by: mateo <277851410+mateo-berri@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-02 23:33:35 +00:00
..
arize refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
azure_storage fix(spend)!: save streamed /v1/responses spend rows under the encrypted resp_ id the client received (#49493) 2026-11-02 14:13:17 -08:00
bitbucket refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
clickhouse feat(lens): treat Lens's own calls as ordinary calls labeled lens-signals and remove x-lens-internal (#53163) 2026-11-20 13:01:03 -08:00
cloudzero
code_interpreter_interception fix(tool_choice): accept the Responses API's flat allowed_tools layout on chat completions (#50467) 2026-11-10 13:04:06 -08:00
compression_interception fix(anthropic): stream /v1/messages text before an internal retrieve tool call (#53658) 2026-11-23 05:17:36 +00:00
custom_logger_v2 fix(realtime): enforce TPM limits during realtime sessions (#53689) 2026-11-24 05:15:04 -08:00
datadog fix(datadog): start total latency at proxy receive time so it covers overhead (#55223) 2026-12-01 13:39:23 -08:00
dotprompt refactor(typing): clear 1181 basedpyright Any errors across 431 files (#47789) 2026-10-24 11:31:09 -07:00
email_alerting feat(alerts): add management controls and opt-in daily summaries (#51418) 2026-11-12 10:06:07 -08:00
focus feat(focus): upgrade FOCUS export to the 1.5 Cost and Usage schema (#52105) 2026-11-16 15:43:15 -08:00
gcs_bucket fix(spend)!: save streamed /v1/responses spend rows under the encrypted resp_ id the client received (#49493) 2026-11-02 14:13:17 -08:00
gcs_pubsub feat(responses): store each bridged turn's path to the root so a fork replays only its ancestors (#49519) 2026-11-23 12:43:11 -08:00
generic_api feat(logging): add luca to the generic API compatible callbacks (#53899) 2026-11-23 19:13:09 -08:00
gitlab refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
helicone
langfuse fix(langfuse): upload base64 media and export its reference from the langfuse callback (#53934) 2026-11-27 11:29:16 -08:00
lens fix(lens): omit default agent query filters (#55016) 2026-11-28 18:31:18 -08:00
levo
litellm_agent
mavvrik_focus refactor: expose core private helpers under public names (#44871) 2026-10-07 00:05:27 +00:00
newrelic refactor(types): parameterize the bare list and dict fields of StandardLoggingPayload (#55383) 2026-12-01 02:58:22 +00:00
open_telemetry fix(proxy): answer 503 no_db_connection only when the database call failed (#55238) 2026-11-30 15:11:19 -08:00
opik refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
otel fix(otel): honor redact_user_api_key_info for key identity on OTel v2 spans (#55724) 2026-12-02 13:25:08 -08:00
pointfive chore(lint): remove the LIT002 mutable-construction rule (#43971) 2026-10-01 12:24:02 -07:00
prompt_cache_alerts test: stabilize the flaky prompt cache detector unit tests (#52671) 2026-11-18 14:47:18 -08:00
s3_v2_golden fix(anthropic)!: map reasoning effort none to supported thinking modes (#55848) 2026-12-02 23:33:35 +00:00
SlackAlerting feat(proxy): add /team/key/bulk_generate to create one key per team member (#55272) 2026-12-01 12:31:01 -08:00
ternary feat(focus): add ternary destination for FOCUS export (#46106) 2026-10-12 22:52:40 -07:00
vantage chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
vector_store_integrations 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
websearch_interception feat(websearch_interception): accept "*" in enabled_providers and treat an empty list as the Bedrock default (#55590) 2026-12-02 03:34:25 +00:00
zerobus
__init__.py
conftest.py fix(spend)!: save streamed /v1/responses spend rows under the encrypted resp_ id the client received (#49493) 2026-11-02 14:13:17 -08:00
rubrik_test_helpers.py
s3_v2_rust_support.py refactor(s3-log): move the rust-backed s3 logger from s3_v3 to s3_v2 (#51893) 2026-11-14 22:24:23 -08:00
test_agentops.py fix(caching): key cached async clients by a per-loop token instead of id(loop) (#48877) 2026-10-29 13:14:48 -07:00
test_anthropic_cache_control_hook.py fix(vertex_ai): cache the whole conversation prefix up to the cache_control block so Gemini sees turns in order (#54434) 2026-11-25 21:26:15 +00:00
test_argilla.py refactor(types): parameterize the bare list and dict fields of StandardLoggingPayload (#55383) 2026-12-01 02:58:22 +00:00
test_athina.py
test_azure_sentinel.py
test_braintrust_logging.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_braintrust_span_name.py
test_custom_callback_input.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_custom_guardrail.py fix(guardrails)!: close gaps in bedrock tool call and tool description scans (#54169) 2026-11-25 06:56:15 +00:00
test_custom_guardrail_post_call_once.py feat(custom-logger-v2): add types, dispatcher and route callback call sites (step 0) (#51214) 2026-11-13 22:08:05 +00:00
test_custom_guardrail_recursion.py
test_custom_logger.py feat(custom-logger-v2): add types, dispatcher and route callback call sites (step 0) (#51214) 2026-11-13 22:08:05 +00:00
test_custom_prompt_management.py refactor(typing): clear 1146 basedpyright Any errors across 365 files (#52768) 2026-11-21 04:25:33 +00:00
test_customer_budget_webhook.py fix(proxy): alert on customer org, customer team, and customer member budgets (#51579) 2026-11-13 09:16:33 -08:00
test_deepeval.py refactor(types): give embedding, image and rerank their own arm of the logged response union (#55456) 2026-12-01 08:34:08 +00:00
test_dynamodb.py fix(spend)!: save streamed /v1/responses spend rows under the encrypted resp_ id the client received (#49493) 2026-11-02 14:13:17 -08:00
test_email_alerting.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_galileo.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_guardrail_logging_sync.py
test_helicone.py refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
test_humanloop.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_lago.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_langfuse.py fix(logging): mark mirrored silent_model calls with is_silent_experiment in spend logs (#48888) 2026-10-29 05:12:50 -07:00
test_langfuse_otel.py fix(langfuse_otel): keep the dropped attribute count on a call exported as its named trace's root (#54599) 2026-11-26 03:00:28 +00:00
test_langsmith.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_langsmith_init.py
test_langtrace.py fix(otel): serialize pydantic Message objects in langfuse_otel, weave_otel and langtrace (#46845) 2026-11-10 14:50:39 -08:00
test_literal_ai.py refactor(types): parameterize the bare list and dict fields of StandardLoggingPayload (#55383) 2026-12-01 02:58:22 +00:00
test_lunary.py fix(anthropic)!: do not surface server_tool_use as client tool_calls (#48385) 2026-11-06 03:54:34 -08:00
test_mlflow.py test(unit): wait on the work itself instead of fixed sleeps (#46261) 2026-10-13 12:41:06 -07:00
test_openmeter.py fix(spend)!: save streamed /v1/responses spend rows under the encrypted resp_ id the client received (#49493) 2026-11-02 14:13:17 -08:00
test_opentelemetry.py fix(otel): emit a span for every failed retry and fallback attempt (#50310) 2026-11-17 14:38:25 -08:00
test_opentelemetry_dynamic_imports.py
test_opentelemetry_request_spans.py feat(lens): add authenticated SDK Lens callback (#55012) 2026-11-28 18:22:56 -08:00
test_opik_utils.py refactor(types): replace Any with proven types in 137 files (#44478) 2026-10-05 11:01:45 -07:00
test_otel_guardrail_violation_spans.py
test_otel_team_attributes_matrix.py
test_performance_alert_notifications.py feat(alerts): add management controls and opt-in daily summaries (#51418) 2026-11-12 10:06:07 -08:00
test_posthog.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_prefix_block_hashes.py feat(proxy): opt-in prefix block hashes in spend logs for workload replay (#52120) 2026-11-16 22:52:42 -08:00
test_prometheus_api_promql_escape.py
test_prometheus_budget_metric_guard.py
test_prometheus_budget_metrics_db_lookups.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_prometheus_budget_metrics_timeout.py
test_prometheus_cache_metrics.py
test_prometheus_caller_identity.py
test_prometheus_carried_budget_state.py refactor(redis): move per-request miss, settlement and shutdown-drain tracking from Python into Rust (#51384) 2026-11-20 17:57:37 +09:00
test_prometheus_client_ip_user_agent.py fix(prometheus): read the proxy failure hook's client ip and user agent from litellm_metadata (#55070) 2026-11-30 11:29:09 +09:00
test_prometheus_custom_metadata_label_counts.py fix(prometheus): fill routing_decision labels on auto-routed request metrics (#54604) 2026-11-30 22:37:49 +00:00
test_prometheus_deployment_state_proxy_rejects.py fix(responses): refuse a previous_response_id follow-up whose stored turns are redacted (#54636) 2026-11-30 21:08:16 +00:00
test_prometheus_end_user_cardinality.py
test_prometheus_input_sequence_length_label.py feat(ui): add auto-router usage and savings table (#45152) 2026-10-07 15:04:07 -07:00
test_prometheus_invalid_key_filtering.py feat(github_copilot): support GitHub App authentication with PEM upload (#51427) 2026-11-14 10:33:20 -05:00
test_prometheus_labels.py fix(gemini): return an error instead of an empty 200 when a Gemini image request gets no image (#29125) 2026-11-25 20:55:23 +00:00
test_prometheus_mcp_tool_metrics.py
test_prometheus_media_generation_metrics.py
test_prometheus_metric_name_consistency.py feat(proxy): send gateway model calls to Lens as traces when the Lens store is connected (#53042) 2026-11-20 10:12:08 -08:00
test_prometheus_metrics_endpoint.py test(unit): wait on the work itself instead of fixed sleeps (#46261) 2026-10-13 12:41:06 -07:00
test_prometheus_missing_metrics.py
test_prometheus_none_metadata.py
test_prometheus_overhead_with_guardrails.py fix(prometheus): count pre-call guardrail time once in overhead with guardrails (#55225) 2026-12-01 10:34:36 -08:00
test_prometheus_queue_guardrail_metrics.py
test_prometheus_rate_limit_labels.py fix(prometheus): skip custom metadata labels a metric already carries (#46267) 2026-10-13 18:20:52 -07:00
test_prometheus_remaining_tokens_router_fallback.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_prometheus_requested_model_cardinality.py
test_prometheus_rust_families.py feat(gateway): record prometheus metrics in the rust gateway (#53712) 2026-11-30 11:29:09 +09:00
test_prometheus_series_cardinality.py feat(prometheus): cap series per metric for every labeled metric (#44420) 2026-10-06 01:28:44 +00:00
test_prometheus_service_tier_label.py fix(bedrock): answer 400 for service tiers Bedrock cannot serve, forward reserved (#50516) 2026-11-14 01:33:57 +00:00
test_prometheus_services.py test: move routing, caching and callback tests out of local_testing (#45761) 2026-10-10 09:33:09 -07:00
test_prometheus_spend_capture_rate.py
test_prometheus_spend_logs_metadata.py fix(prometheus): fill routing_decision labels on auto-routed request metrics (#54604) 2026-11-30 22:37:49 +00:00
test_prometheus_stream_label.py
test_prometheus_token_detail_metrics.py
test_prometheus_user_team_metrics.py refactor(auth_cache): type auth cache keys and keep the cache always native (#51130) 2026-11-21 17:20:30 +09:00
test_prometheus_zero_cost_metric.py
test_prompt_layer.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_prompt_manager_ssti.py
test_responses_background_cost.py fix(responses): send the billed background response cost to the creating key's and team's loggers (#47506) 2026-10-20 23:22:21 +00:00
test_rubrik.py feat(customer portal): set budgets per customer and gateway app (#52477) 2026-11-18 17:31:03 +00:00
test_s3.py feat(s3_v2): add s3_partition_granularity option for hourly S3 folders (#43748) 2026-10-01 11:00:21 -07:00
test_s3_v2_native.py refactor(rust): rename participle functions in llms, bridge, redis and router crates (#55222) 2026-12-01 15:46:37 +00:00
test_s3_v2_rust.py refactor(rust): rename the compiled module _native to _rust (#55198) 2026-12-01 07:08:38 -08:00
test_s3_v2_strip_writer.py refactor(rust): rename the compiled module _native to _rust (#55198) 2026-12-01 07:08:38 -08:00
test_shadow_eval_logger.py feat(shadow-eval): add optional rubric grades (#52321) 2026-11-17 12:04:31 -08:00
test_sqs.py test: migrate SDK and proxy-booting legacy CircleCI tests to their tiers (#45758) 2026-10-11 00:17:21 -07:00
test_wandb.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_weave_otel.py fix(otel): serialize pydantic Message objects in langfuse_otel, weave_otel and langtrace (#46845) 2026-11-10 14:50:39 -08:00