litellm/litellm/integrations
devin-ai-integration[bot] fa6b209165
feat(guardrails): add only_scan_new_messages for per-session incremental scanning (#33278)
* feat(guardrails): add only_scan_new_messages for per-session incremental scanning

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(guardrails): use fixed TTL constant and revert unrelated test formatting

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(guardrails): run only_scan_new_messages in the unified apply_guardrail path

The initial wiring lived in BedrockGuardrail.async_pre_call_hook, but the proxy
routes Bedrock through the unified apply_guardrail interface, so the flag had no
effect live. Move incremental selection into apply_guardrail: filter the flat
texts list against per-session scanned hashes, skip the Bedrock call when nothing
is new, and mark hashes only after a successful (non-blocked) scan. Full-context
fallback is preserved when there is no session id, the cache is unavailable, or a
masking guardrail is configured.

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(guardrails): cover session-id fallbacks and mark_texts_scanned guards

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(guardrails): fall back to full scan when incremental guardrail masks content, use shared cache

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(guardrails): cover generic agent multi-turn incremental scan

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(guardrails): cover incremental scan cache resolver fallbacks

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(guardrails): cover flag interactions and /v1/messages incremental scan semantics

* feat(guardrails): make GUARDRAIL_SCANNED_MESSAGES_CACHE_TTL_SECONDS env configurable

* test(guardrails): prove skip_system/skip_tool are enforced upstream of incremental scan

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
Co-authored-by: Yucheng Zhu <yucheng@berri.ai>
2026-07-22 09:56:59 -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 feat(spend): track prompt compression saved tokens in daily spend aggregates (#33810) 2026-07-18 17:47:54 -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): send v4 ingestion header for otel callback (#33907) 2026-07-18 20:36:51 -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 fix(anthropic): carry the stand-down judgment inside written-back injection points 2026-07-18 17:11:03 -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 feat(guardrails): add only_scan_new_messages for per-session incremental scanning (#33278) 2026-07-22 09:56:59 -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.