litellm/litellm/integrations
yuneng-jiang 8423efc5fa
chore(release): backport #33810, #33733 to rc/1.94.0 and bump litellm-proxy-extras to 0.4.79.post1 (#34215)
* feat(spend): track prompt compression saved tokens in daily spend aggregates (#33810)

* feat(spend): track prompt compression saved tokens in daily spend aggregates

Native compression interception now records tokens_before/after/saved into the
request litellm_metadata so savings land in the SpendLog metadata JSON under a
typed compression_savings key. A single normalizer
(extract_compression_saved_tokens) sums that key with Headroom guardrail
tokens_saved; the two writers are disjoint and run at different stages, so
summing never double-counts. The spend-log redactor now preserves purely
numeric compression stats inside guardrail_response so Headroom savings
survive the store_prompts_in_spend_logs=false default. compression_saved_tokens
is threaded through BaseDailySpendTransaction, queue aggregation, the daily
upsert blocks, a new BigInt column on all six daily spend tables, and the
daily activity read path (SpendMetrics, DailySpendMetadata, raw-SQL rollups)

* fix(spend): normalize legacy guardrail shapes and float token stats in compression savings reader

* feat(spend): aggregate compression and prompt caching dollar savings in daily rollups

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

* test(spend): update daily spend aggregation fixtures for savings columns

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

* feat(ui): add Cost Optimization dashboard page

New left-nav Cost Optimization page under Observability that surfaces money saved by prompt compression and prompt caching. It reads the daily activity rollup (userDailyActivityCall / get_daily_activity) and never scans SpendLogs, so it stays fast at 1M+ rows.

Renders a Total saved card, per-driver Compression and Prompt caching cards, a savings-over-time area chart, and a savings-by-driver donut, all aggregated in memory from the per-day metrics.compression_savings_spend and metrics.prompt_caching_savings_spend fields.

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

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
(cherry picked from commit 3f3295b33f)

* Merge pull request #33733 from BerriAI/litellm_lit_4162_bedrock_batch_tags

feat(bedrock): forward bedrock_tags to CreateModelInvocationJob for batch jobs

(cherry picked from commit 3819ee5dc0)

* bump: version 0.4.79 → 0.4.79.post1

---------

Co-authored-by: tin-berri <tin@berri.ai>
Co-authored-by: Krrish Dholakia <krrishdholakia@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Mateo Wang <277851410+mateo-berri@users.noreply.github.com>
2026-07-21 19:53:06 -07:00
..
_types style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
agentops style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
arize style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
azure_sentinel fix(azure_sentinel): resolve audit stream from AZURE_SENTINEL_AUDIT_STREAM_NAME (#32010) 2026-07-03 12:09:27 -07:00
azure_storage style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
bitbucket style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
cloudzero style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
code_interpreter_interception feat(sandbox): reuse e2b container across requests when metadata.session_id is set (#31688) 2026-06-30 18:58:09 -07:00
compression_interception chore(release): backport #33810, #33733 to rc/1.94.0 and bump litellm-proxy-extras to 0.4.79.post1 (#34215) 2026-07-21 19:53:06 -07:00
datadog fix(datadog): split log batches proactively under intake payload limits (#32860) 2026-07-10 20:54:42 -07:00
deepeval style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
dotprompt style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
email_templates fix(email): apply EMAIL_SIGNATURE to budget alert emails (#31712) 2026-06-30 21:11:50 +02:00
focus style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
gcs_bucket style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
gcs_pubsub style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
generic_api style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
generic_prompt_management style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
gitlab style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
langfuse fix(langfuse_otel): build per-request OTLP exporter from key and team dynamic Langfuse credentials (#32437) 2026-07-16 13:39:10 -07:00
levo style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
litellm_agent Agent Builder - support new experimental agent builder, to ensure agents pass compliance checks (#21817) 2026-02-21 15:32:47 -08:00
mavvrik_focus style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
newrelic style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
opentelemetry_utils style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
opik chore(ci): merge oss branch (#33784) 2026-07-17 23:22:13 +00:00
otel fix(otel): restore proxy-level error.* attributes on v2 failure spans (LIT-4179) (#33664) 2026-07-18 10:52:27 -07:00
prometheus_helpers style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
SlackAlerting style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
vantage style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
vector_store_integrations style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
weave style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
websearch_interception fix(websearch): address Responses review findings 2026-07-15 00:52:16 +00:00
__init__.py add linting 2023-08-18 11:05:05 -07:00
additional_logging_utils.py build(deps-dev): bump black to 26.3.1 and apply formatting (#28525) 2026-05-21 17:24:18 -07:00
anthropic_cache_control_hook.py refactor(anthropic): use PEP 604 unions in the auto prompt-caching hook 2026-07-17 10:38:44 -07:00
argilla.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
athina.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
braintrust_logging.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
braintrust_mock_client.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
callback_configs.json feat: litellm oss 110626 (#30202) 2026-06-11 22:30:26 -07:00
custom_batch_logger.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_guardrail.py fix(guardrails): run apply_guardrail-style model-level pre_call guardrails at deployment hook (#33136) 2026-07-14 12:38:27 -07:00
custom_logger.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_prompt_management.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_secret_manager.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
custom_sso_handler.py chore(auth): require trusted proxy for header identity auth 2026-04-29 21:20:21 -07:00
dynamodb.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
email_alerting.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
galileo.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
greenscale.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
helicone.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
helicone_mock_client.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
humanloop.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
lago.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
langsmith.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
langsmith_mock_client.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
langtrace.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
literal_ai.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
logfire_logger.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
lunary.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
mlflow.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
mock_client_factory.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
openmeter.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
opentelemetry.py fix(langfuse_otel): build per-request OTLP exporter from key and team dynamic Langfuse credentials (#32437) 2026-07-16 13:39:10 -07:00
posthog.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
posthog_mock_client.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
prometheus.py feat(prometheus): expose video duration and image count consumption metrics (#33138) 2026-07-13 18:51:13 -07:00
prometheus_services.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
prompt_layer.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
prompt_management_base.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
Readme.md (Feat) - Add GCS Pub/Sub Logging integration for sending DB SpendLogs to BigQuery (#7976) 2025-01-24 20:57:20 -08:00
rubrik.py fix(guardrails): filter Add-Guardrail mode dropdown per provider (#32712) 2026-07-11 14:51:27 -07:00
s3.py fix(s3): sanitize slashes in response-id-derived object key file name (#33271) 2026-07-14 17:26:00 -07:00
s3_v2.py fix(s3_v2): pass usedforsecurity=False to hashlib.md5 for FIPS envs 2026-07-02 01:12:49 +00:00
sqs.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
supabase.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
test_httpx.py fix(utils.py): improved predibase exception mapping 2024-06-08 14:32:43 -07:00
traceloop.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00
weights_biases.py style: unify ruff format width on 120 (#31518) 2026-06-27 12:39:29 -07:00

Integrations

This folder contains logging integrations for litellm

eg. logging to Datadog, Langfuse, Prometheus, s3, GCS Bucket, etc.