litellm/tests/test_litellm/integrations
Krrish Dholakia f42ffed2bd
Litellm oss staging 04 02 2026 p1 (#25055)
* fix(vertex_ai): support pluggable (executable) credential_source for WIF auth (#24700)

The WIF credential dispatch in load_auth() only handled identity_pool and
aws credential types. When credential_source.executable was present (used
for Azure Managed Identity via Workload Identity Federation), it fell
through to identity_pool.Credentials which rejected it with MalformedError.

Add dispatch to google.auth.pluggable.Credentials for executable-type
credential sources, following the same pattern as the existing identity_pool
and aws helpers.

Fixes authentication for Azure Container Apps → GCP Vertex AI via WIF
with executable credential sources.

* feat(logging): add component and logger fields to JSON logs for 3rd p… (#24447)

* feat(logging): add component and logger fields to JSON logs for 3rd party filtering

* Let user-supplied extra fields win over auto-generated component/logger, tighten test assertions

* Feat - Add organization into the metrics metadata for org_id & org_alias (#24440)

* Add org_id and org_alias label names to Prometheus metric definitions

* Add user_api_key_org_alias to StandardLoggingUserAPIKeyMetadata

* Populate user_api_key_org_alias in pre-call metadata

* Pass org_id and org_alias into per-request Prometheus metric labels

* Add test for org labels on per-request Prometheus metrics

* chore: resolve test mockdata

* Address review: populate org_alias from DB view, add feature flag, use .get() for org metadata

* Add org labels to failure path and verify flag behavior in test

* Fix test: build flag-off enum_values without org fields

* Gate org labels behind feature flag in get_labels() instead of static metric lists

* Scope org label injection to metrics that carry team context, remove orphaned budget label defs, add test teardown

* Use explicit metric allowlist for org label injection instead of team heuristic

* Fix duplicate org label guard, move _org_label_metrics to class constant

* Reset custom_prometheus_metadata_labels after duplicate label assertion

* fix: emit org labels by default, remove flag, fix missing org_alias in all metadata paths

* fix: emit org labels by default, no opt-in flag required

* fix: write org_alias to metadata unconditionally in proxy_server.py

* fix: 429s from batch creation being converted to 500 (#24703)

* add us gov models (#24660)

* add us gov models

* added max tokens

* Litellm dev 04 02 2026 p1 (#25052)

* fix: replace hardcoded url

* fix: Anthropic web search cost not tracked for Chat Completions

The ModelResponse branch in response_object_includes_web_search_call()
only checked url_citation annotations and prompt_tokens_details, missing
Anthropic's server_tool_use.web_search_requests field. This caused
_handle_web_search_cost() to never fire for Anthropic Claude models.

Also routes vertex_ai/claude-* models to the Anthropic cost calculator
instead of the Gemini one, since Claude on Vertex uses the same
server_tool_use billing structure as the direct Anthropic API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(anthropic): pass logging_obj to client.post for litellm_overhead_time_ms (#24071)

When LITELLM_DETAILED_TIMING=true, litellm_overhead_time_ms was null for
Anthropic because the handler did not pass logging_obj to client.post(),
so track_llm_api_timing could not set llm_api_duration_ms. Pass
logging_obj=logging_obj at all four post() call sites (make_call,
make_sync_call, acompletion, completion). Add test to ensure make_call
passes logging_obj to client.post.

Made-with: Cursor

* sap - add additional parameters for grounding

- additional parameter for grounding added for the sap provider

* sap - fix models

* (sap) add filtering, masking, translation SAP GEN AI Hub modules

* (sap) add tests and docs for new SAP modules

* (sap) add support of multiple modules config

* (sap) code refactoring

* (sap) rename file

* test(): add safeguard tests

* (sap) update tests

* (sap) update docs, solve merge conflict in transformation.py

* (sap) linter fix

* (sap) Align embedding request transformation with current API

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) mock commit

* (sap) run black formater

* (sap) add literals to models, add negative tests, fix test for tool transformation

* (sap) fix formating

* (sap) fix models

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) commit for rerun bot review

* (sap) minor improve

* (sap) fix after bot review

* (sap) lint fix

* docs(sap): update documentation

* fix(sap): change creds priority

* fix(sap): change creds priority

* fix(sap): fix sap creds unit test

* fix(sap): linter fix

* fix(sap): linter fix

* linter fix

* (sap) update logic of fetching creds, add additional tests

* (sap) clean up code

* (sap) fix after review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) add a possibility to put the service key by both variants

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) update test

* (sap) update service key resolve function

* (sap) run black formater

* (sap) fix validate credentials, add negative tests for credential fetching

* (sap) fix validate credentials, add negative tests for credential fetching

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) fix after bot review

* (sap) lint fix

* (sap) lint fix

* feat: support service_tier in gemini

* chore: add a service_tier field mapping from openai to gemini

* fix: use x-gemini-service-tier header in response

* docs: add service_tier to gemini docs

* chore: add defaut/standard mapping, and some tests

* chore: tidying up some case insensitivity

* chore: remove unnecessary guard

* fix: remove redundant test file

* fix: handle 'auto' case-insensitively

* fix: return service_tier on final steamed chunk

* chore: black

* feat: enable supports_service_tier to gemini models

* Fix get_standard_logging_metadata tests

* Fix test_get_model_info_bedrock_models

* Fix test_get_model_info_bedrock_models

* Fix remaining tests

* Fix mypy issues

* Fix tests

* Fix merge conflicts

* Fix code qa

* Fix code qa

* Fix code qa

* Fix greptile review

---------

Co-authored-by: michelligabriele <gabriele.michelli@icloud.com>
Co-authored-by: Josh <36064836+J-Byron@users.noreply.github.com>
Co-authored-by: mubashir1osmani <mubashir.osmani777@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: milan-berri <milan@berri.ai>
Co-authored-by: Alperen Kömürcü <alperen.koemuercue@sap.com>
Co-authored-by: Vasilisa Parshikova <vasilisa.parshikova@sap.com>
Co-authored-by: Lin Xu <lin.xu03@sap.com>
Co-authored-by: Mark McDonald <macd@google.com>
Co-authored-by: Sameer Kankute <sameer@berri.ai>
2026-04-08 21:37:10 -07:00
..
arize fix(arize-phoenix): enable nested traces coexistence with otel callback 2026-02-26 04:59:17 -05:00
azure_storage Fixing circular reference for azure storage 2026-01-14 16:11:55 -08:00
bitbucket (Feat) Add BitBucket Integration for Prompt Management (#14882) 2025-09-25 15:51:00 -07:00
cloudzero fix: test 2026-01-09 11:23:47 +09:00
datadog Ishaan - March 18th changes (#24056) 2026-03-19 10:20:35 -07:00
dotprompt test_dotprompt_with_prompt_version 2025-11-22 11:00:47 -08:00
focus [Fix] Use cached async HTTP client in Vantage destination 2026-03-14 12:23:40 -07:00
gcs_bucket update GCSBucketBase to handle GSM project ID if passed (#11409) 2025-06-04 10:02:26 -07:00
gcs_pubsub Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
gitlab TestEncryptResponseId 2026-01-07 21:03:22 +05:30
langfuse fix: prevent sys.modules["langfuse"] import failures in langfuse unit tests 2026-02-18 08:22:23 -03:00
levo TestLevoIntegration 2026-01-07 18:17:22 +05:30
litellm_agent Agent Builder - support new experimental agent builder, to ensure agents pass compliance checks (#21817) 2026-02-21 15:32:47 -08:00
open_telemetry/data add metrics and logs (events) with semconv attributes 2025-09-02 09:20:25 -06:00
SlackAlerting feat: add optional digest mode for Slack alert types (#21683) 2026-02-21 15:19:17 -08:00
websearch_interception Litellm fix update bedrock models (#24947) 2026-04-01 19:22:54 -07:00
test_agentops.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_anthropic_cache_control_hook.py Merge branch 'main' into litellm_oss_staging_03_04_2026 2026-03-11 18:31:20 +05:30
test_athina.py Litellm fix GitHub action testing (#11163) 2025-05-26 14:41:42 -07:00
test_azure_sentinel.py [Feat] New Logging Integration - Azure Sentinel Logger (#18146) 2025-12-18 02:04:49 +05:30
test_braintrust_logging.py [Bug]: Fix tests to reference moved attributes in braintrust_logging module (#13978) 2025-08-26 18:58:16 -07:00
test_braintrust_span_name.py Add details in docs (#15721) 2025-10-21 16:57:51 -07:00
test_custom_guardrail.py fix(security): strip secret_fields from guardrail logging response (#23162) 2026-03-10 08:58:18 -07:00
test_custom_guardrail_recursion.py fix: recursive pydantic issue (#19531) 2026-01-22 19:56:41 -08:00
test_custom_prompt_management.py [Fix] CI/CD - Fix failing proxy and core integration tests (#17926) 2025-12-13 10:11:01 -08:00
test_deepeval.py fix: use fastuuid helper (#14903) 2025-09-25 15:47:01 -07:00
test_langfuse.py Align Langfuse trace_id fallback with DB session_id for failed requests 2026-03-02 20:55:31 +05:30
test_langfuse_otel.py fix: prevent sys.modules["langfuse"] import failures in langfuse unit tests 2026-02-18 08:22:23 -03:00
test_langsmith_init.py Merge branch 'main' into litellm_oss_staging_03_17_2026 2026-03-20 08:42:41 +05:30
test_mlflow.py Fix: MLflow streaming spans for Anthropic passthrough (#17288) 2025-12-05 14:59:36 -08:00
test_openmeter.py [Bug]: Set user from token user_id for OpenMeter integration 2025-07-30 22:23:30 +02:00
test_opentelemetry.py Code review 2026-03-18 16:25:42 -05:00
test_opentelemetry_dynamic_imports.py Make grpc dependency optional (#19447) 2026-01-20 19:03:52 -08:00
test_prometheus_cache_metrics.py feat(prometheus): add caching metrics (#18755) 2026-01-07 21:29:04 +05:30
test_prometheus_client_ip_user_agent.py Litellm oss staging 04 02 2026 p1 (#25055) 2026-04-08 21:37:10 -07:00
test_prometheus_invalid_key_filtering.py refactor(prometheus): skip metrics for invalid API key requests (#18788) 2026-01-07 17:14:14 -08:00
test_prometheus_labels.py fix(prometheus): sanitize label values to prevent metric scrape failures (#20600) 2026-02-09 15:48:59 -08:00
test_prometheus_metric_name_consistency.py fix: align prometheus metric names with DEFINED_PROMETHEUS_METRICS (#18463) 2026-01-04 00:48:09 +05:30
test_prometheus_missing_metrics.py add callbacks and labels to prometheus (#19708) 2026-01-25 23:03:23 -08:00
test_prometheus_none_metadata.py fix: guard against None metadata in prometheus metrics (#21489) 2026-02-18 12:40:45 -08:00
test_prometheus_queue_guardrail_metrics.py feat: Add Prometheus metrics for request queue time and guardrails (#17973) 2026-01-06 23:50:11 +05:30
test_prometheus_services.py fix(proxy): resolve high CPU when router_settings in DB by avoiding REGISTRY.collect() in PrometheusServicesLogger (#20087) 2026-01-30 14:01:45 -08:00
test_prometheus_spend_logs_metadata.py test(prometheus): add tests for spend_logs_metadata in custom labels 2026-03-23 11:02:21 -07:00
test_prometheus_stream_label.py feat(prometheus): add opt-in stream label to litellm_proxy_total_requests_metric (#22023) 2026-02-24 11:51:42 -08:00
test_prometheus_user_team_metrics.py Litellm oss staging 04 02 2026 p1 (#25055) 2026-04-08 21:37:10 -07:00
test_responses_background_cost.py fix(test): update test_responses_background_cost assertions for pagination and stale cleanup 2026-03-13 16:18:15 -07:00
test_s3_v2.py Merge pull request #21157 from Point72/ephrimstanley/s3-logger-skip-missing-standard-logging-object 2026-02-16 18:29:59 +05:30
test_weave_otel.py feat: Basic Weave OTEL integration (#17439) 2025-12-03 21:26:22 -08:00