Commit Graph

32958 Commits

Author SHA1 Message Date
Chesars 56386969b5 fix(anthropic): remove empty system messages from message list
Empty system messages were skipped for Anthropic's system param but
not removed from the messages list, causing BadRequestError when
anthropic_messages_pt encountered the unsupported "system" role.

Fixes #21622
2026-02-19 21:46:17 -03:00
github-actions[bot] 2d39825868 chore: regenerate poetry.lock to match pyproject.toml (#21626)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-02-20 00:25:50 +00:00
jquinter 30a6b18c0d Merge pull request #21625 from BerriAI/fix/regenerate-lock-drop-pat-approval
fix(ci): drop PAT_TOKEN_2 approval, use github.token for auto-merge
2026-02-19 21:20:02 -03:00
Julio Quinteros Pro 11d0fca0de fix(ci): drop PAT_TOKEN_2 approval step, use github.token for auto-merge
PAT_TOKEN_2 does not have the scope for addPullRequestReview.
github.token cannot approve its own PR either, so drop the approval
step entirely. Auto-merge with github.token is enough: the PR will
merge automatically once required CI checks pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 21:17:40 -03:00
jquinter 3a51d8bcb5 Merge pull request #21619 from BerriAI/fix/regenerate-lock-auto-approve
feat(ci): auto-approve and auto-merge the regenerated poetry.lock PR
2026-02-19 21:03:16 -03:00
Ishaan Jaffer d4ae3c8370 ui new build 2026-02-19 15:57:19 -08:00
Ishaan Jaff 655973e8c8 feat(ui): show latency overhead for AI-suggested policy templates (#21620)
* feat(policy): add estimated_latency_ms to all policy templates

* feat(policy): add estimated_latency_ms to backup templates

* feat(ui): show latency overhead badge in AI policy suggestions
2026-02-19 15:45:07 -08:00
Julio Quinteros Pro 41776b0382 feat(ci): auto-approve and auto-merge the regenerated poetry.lock PR
Now that "Allow GitHub Actions to create and approve pull requests" is
enabled in repo settings:
- PR creation uses github.token (no secret needed)
- Approval uses PAT_TOKEN_2 (GitHub requires a different identity from
  the PR creator to approve)
- Auto-merge is enabled with --squash so the PR merges as soon as
  required checks pass

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 20:23:07 -03:00
jquinter c32892dd46 Merge pull request #21618 from BerriAI/fix/regenerate-lock-pr-token
fix(ci): use PAT_TOKEN_2 for gh pr create in regenerate-lock workflow
2026-02-19 20:16:49 -03:00
Julio Quinteros Pro 9c70cd615a fix(ci): use PAT_TOKEN_2 for gh pr create
github.token cannot open PRs when "Allow GitHub Actions to create and
approve pull requests" is disabled in repo settings. PAT_TOKEN_2
bypasses that restriction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 20:13:58 -03:00
jquinter b88ecb11f0 Merge pull request #21617 from BerriAI/fix/regenerate-lock-no-update-flag
fix(ci): remove --no-update flag removed in Poetry 2.x
2026-02-19 20:09:57 -03:00
Julio Quinteros Pro 08b5907c9c fix(ci): remove --no-update flag removed in Poetry 2.x
The workflow fails with:
  The option "--no-update" does not exist

--no-update was removed in Poetry 2.x. Plain `poetry lock` is the
correct equivalent — it re-solves only what pyproject.toml requires
without upgrading already-locked packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 20:07:14 -03:00
Ishaan Jaff 3d8c042ca5 feat: prompt injection guardrail policy template (#21520)
* add semantic guard constants

* add SEMANTIC_GUARD enum value

* add keyword-based prompt injection policy template

* add semantic prompt injection route template

* add semantic guard route loader

* add semantic guard guardrail

* add semantic guard registration

* add semantic guard tests

* enhance SQL injection keyword category with more patterns and exceptions

* add standalone SQL injection policy template

* add SQL injection semantic guard route template

* add SQL injection guardrail tests

* remove standalone sql_injection policy template, use categories/prompt_injection_sql.yaml instead
2026-02-19 15:06:06 -08:00
jquinter 1edd6459b3 Merge pull request #21616 from BerriAI/fix/regenerate-lock-token-fallback
fix(ci): fall back to github.token when GH_TOKEN secret is not set
2026-02-19 20:01:46 -03:00
Julio Quinteros Pro 54470ec1d9 fix(ci): use github.token with explicit permissions instead of PAT secret
Drop the PAT_TOKEN_2 secret (whose scope is unknown) in favour of the
built-in github.token, which is always available. Grant it exactly the
two permissions it needs:
  - contents: write      → push the auto/regenerate-* branch
  - pull-requests: write → open the PR via gh cli

No external secret needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:56:59 -03:00
Julio Quinteros Pro 8cc50d6736 chore: fix stale GH_TOKEN comment 2026-02-19 19:55:44 -03:00
Julio Quinteros Pro e590674083 fix(ci): use PAT_TOKEN_2 instead of non-existent GH_TOKEN secret
GH_TOKEN is not configured in this repository. The correct PAT secret
is PAT_TOKEN_2, which has the permissions needed to push branches and
open PRs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:55:33 -03:00
Julio Quinteros Pro 755dd46d45 fix(ci): fall back to github.token when GH_TOKEN secret is not set
When secrets.GH_TOKEN is not configured, the workflow fails immediately with:
  "Input required and not supplied: token"

Using || github.token ensures a valid token is always available.
GH_TOKEN (PAT) is preferred when set; github.token is used as fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:52:01 -03:00
jquinter a6af0425ea Merge pull request #21615 from BerriAI/fix/regenerate-poetry-lock-yaml-syntax
fix(ci): fix YAML syntax error in regenerate-poetry-lock workflow
2026-02-19 19:47:36 -03:00
Julio Quinteros Pro 8edc6effb1 fix(ci): fix YAML syntax error in regenerate-poetry-lock workflow
A heredoc inside \$() inside a double-quoted string inside a YAML multiline
run block breaks the YAML parser at line 60. Replaced with: write the PR
body to /tmp/pr-body.md using a standalone heredoc, then pass it via
gh pr create --body-file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:45:14 -03:00
jquinter f106c97bf2 Merge pull request #21609 from BerriAI/fix/delete-keys-return-failed-tokens
fix(key management): return failed_tokens in delete_verification_tokens response
2026-02-19 19:31:39 -03:00
jquinter b32ba5902b Merge pull request #21610 from BerriAI/fix/auto-regenerate-poetry-lock
ci: auto-regenerate poetry.lock when pyproject.toml changes on main
2026-02-19 19:29:08 -03:00
Julio Quinteros Pro b9f36645f3 fix(key management): populate failed_tokens for admin partial-delete path
The admin bulk-delete path (prisma_client.delete_data) was never comparing
the DB return value against the requested tokens, so failed_tokens was
always empty for admins even when the DB silently skipped some tokens.

Adds the same mismatch check as the non-admin path, and a new test that
exercises admin bulk-delete returning fewer tokens than requested.

Fixes gap identified by Greptile review on #21609.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:28:03 -03:00
Julio Quinteros Pro b9e79cc07b fix(ci): restrict GITHUB_TOKEN to contents:read via explicit permissions block
GitHub Advanced Security flagged that the workflow had no permissions block,
leaving GITHUB_TOKEN with its default broad scope. All write operations
(git push, gh pr create) already use GH_TOKEN (PAT), so the implicit
GITHUB_TOKEN only needs read access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:24:57 -03:00
Julio Quinteros Pro 5681229e7c fix(ci): force-push bot branch to handle pre-existing branch from prior run
A re-run within the same second (or a leftover branch) would cause
`git push` to fail. Adding -f is safe since this is a bot-owned branch
that is immediately turned into a PR and never used for anything else.

Fixes inline suggestion from Greptile review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:20:01 -03:00
Julio Quinteros Pro dfbf14e626 fix(ci): pass GH_TOKEN to checkout so git push can create the branch
Without the token in the checkout step the subsequent `git push` uses the
default GITHUB_TOKEN which lacks permission to push new branches, causing
the workflow to fail silently. Fixes issue flagged by Greptile review.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:18:18 -03:00
Julio Quinteros Pro d7d651dfeb ci: auto-regenerate poetry.lock when pyproject.toml changes on main
Adds a workflow that triggers whenever pyproject.toml is merged into main
and opens a PR with the refreshed lock file, fixing the recurring CI failure:
"pyproject.toml changed significantly since poetry.lock was last generated."

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:13:54 -03:00
Julio Quinteros Pro 079bc364bb fix(key management): return failed_tokens in delete_verification_tokens response
Instead of raising an exception when some requested tokens are not found
in the DB, populate `failed_tokens` in the return dict so callers can
inspect which keys were not deleted without catching a generic Exception.

Supersedes #12577.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-19 19:10:55 -03:00
Ishaan Jaff c9cdce96fa feat(policy): test playground for AI policy suggestions (#21608)
* fix aviation safety topic filter: remove overly broad exceptions, add cockpit access block words

* fix airline brand protection filter: add identifier words, competitor/ops block words, tighten exceptions

* feat(policy): add POST /policy/templates/test endpoint for testing guardrails before creating them

* feat(ui): add testPolicyTemplate networking function

* feat(ui): add test playground to AI policy suggestion modal

* test(policy): add tests for POST /policy/templates/test endpoint
2026-02-19 14:09:20 -08:00
Ishaan Jaff 779c355f1e feat: add airline off-topic restriction policy template (#21607)
* fix aviation safety topic filter: remove overly broad exceptions, add cockpit access block words

* fix airline brand protection filter: add identifier words, competitor/ops block words, tighten exceptions

* feat: add airline off-topic restriction policy template

* feat: register airline off-topic restriction in policy templates backup

* test: add tests for airline off-topic restriction policy template

* fix: remove overly broad block words (explain, recommend, suggest, best) to reduce false positives

* test: add false-positive tests for recommend/explain airline queries
2026-02-19 13:45:59 -08:00
Ishaan Jaff 18f8a2cee3 docs: add latency overhead troubleshooting guide (#21603)
* add latency overhead troubleshooting doc

* add latency_overhead to troubleshooting sidebar

* docs: add x-litellm-overhead-duration-ms to latency troubleshooting guide
2026-02-19 12:42:33 -08:00
Ishaan Jaff 2c8fcf854a docs: add latency overhead troubleshooting guide (#21600)
* add latency overhead troubleshooting doc

* add latency_overhead to troubleshooting sidebar
2026-02-19 12:34:23 -08:00
Ishaan Jaff cd95e54c10 Add OpenAPI-to-MCP support via API and UI (#21575)
* add spec_path column to LiteLLM_MCPServerTable schema

* add spec_path to MCP request types and table model

* wire spec_path through build_mcp_server_from_table

* add openapi transport type constant

* add OpenAPI Spec as first-class transport option in create form

* add OpenAPI transport support to edit form with auto-detection

* support spec_path in connection status component

* support spec_path in tool configuration component

* support OpenAPI transport in test connection hook

* register OpenAPI tools on server add/update/reload

* preview OpenAPI tools in test/tools/list endpoint
2026-02-19 12:23:24 -08:00
Ishaan Jaff e9a07347dc fix: reduce proxy overhead for large base64 payloads (#21594)
* fix aviation safety topic filter: remove overly broad exceptions, add cockpit access block words

* fix airline brand protection filter: add identifier words, competitor/ops block words, tighten exceptions

* add constants for large payload handling and detailed timing

* add base64 truncation for logging payloads

* use shallow copy for messages, track copy and callback timing

* add callback duration and detailed timing to response metadata

* add callback duration header, size-gate debug logging, detailed timing headers

* add tests for callback timing, base64 truncation, and detailed timing

* fix code quality: extract helpers, fix regex, clean up imports

* rewrite _truncate_base64_in_value iteratively to satisfy recursive detector
2026-02-19 12:10:52 -08:00
Ishaan Jaff b209b11522 feat: AI policy template suggestions (#21589)
* fix aviation safety topic filter: remove overly broad exceptions, add cockpit access block words

* fix airline brand protection filter: add identifier words, competitor/ops block words, tighten exceptions

* add example_sentences to all policy templates + topic-filtering and prompt-injection templates

* add policy_endpoints package with AI policy suggester

* update test patch targets for policy_endpoints package move

* add unit tests for AI policy suggester

* add suggestPolicyTemplates networking function

* add AI suggestion modal component

* add Use AI button and template loading callback to PolicyTemplates

* wire up AI suggestion modal in policies page

* fix policy_templates_backup.json path after package move

* add estimated_latency field to all policy templates

* use llm_router and accept model parameter in ai_policy_suggester

* add model param to suggest templates endpoint

* pass model param in suggestPolicyTemplates

* polish ai suggestion modal: model selector, auto-growing textareas, latency badges

* add template queue for processing multiple AI-suggested templates

* show template progress badge in guardrail selection modal
2026-02-19 12:00:26 -08:00
michelligabriele 16cfdccc7b fix(bedrock): add Accept header for AgentCore MCP server requests (#21551)
AgentCore MCP server endpoints require the Accept header to contain
both application/json and text/event-stream per the MCP specification
(Streamable HTTP transport). Without this header, requests are rejected
with a 406 Not Acceptable error (JSON-RPC code -32011).

Sets the Accept header at the top of sign_request() so both JWT/Bearer
and SigV4 authentication paths include it.
v1.81.13.dev1
2026-02-19 11:35:14 -08:00
milan-berri 506d1dff43 fix: handle deprovisioning operations without path field (#21571)
* fix(scim): handle deprovisioning operations without path field

When SCIM providers send deprovisioning requests without a path field
(e.g., {"op": "replace", "value": {"active": false}}), the code was
storing the value under an empty string key in metadata.

This fix:
- Detects operations with no path where value is a dict
- Extracts and handles known fields like 'active' correctly
- Sets metadata["scim_active"] = false instead of metadata[""] = {"active": false}

Fixes: SCIM deprovisioning creating empty string keys in user metadata

* fix(scim): handle all known fields in operations without path

Extended the fix to handle all SCIM fields (not just active) when
operations have no path field:
- active -> scim_active
- displayName -> user_alias
- externalId -> user_id
- name.givenName/familyName -> scim_metadata

Added comprehensive test for multiple fields without path.

Addresses Greptile review feedback on RFC 7644 compliance.

* trigger PR update
2026-02-19 11:09:04 -08:00
Sameer Kankute ddc1371cea Merge pull request #21588 from BerriAI/geminii_blog
Fix release
2026-02-20 00:31:01 +05:30
Sameer Kankute 4d392cacb8 Fix release 2026-02-20 00:27:12 +05:30
yuneng-jiang aa4a95c889 Merge pull request #21587 from BerriAI/litellm_fix_key_delete_feb19
[Infra] Add project_id to DeletedVerificationTable
2026-02-19 10:51:28 -08:00
yuneng-jiang 6c0cc4fb4f adding build 2026-02-19 10:50:47 -08:00
yuneng-jiang 2eded1dda6 bump: version 0.4.43 → 0.4.44 2026-02-19 10:50:23 -08:00
yuneng-jiang a5fba84ae3 Merge pull request #21586 from BerriAI/infra_feb19
[Infra] Fixing Merge Artifacts
2026-02-19 10:47:39 -08:00
yuneng-jiang 2d928f8c54 fixing merge 2026-02-19 10:46:58 -08:00
yuneng-jiang bac1b6b2e0 Merge pull request #21545 from BerriAI/litellm_key_last_active_tracking
[Feature] Key Last Active Tracking
2026-02-19 10:29:23 -08:00
yuneng-jiang caa931b167 adding build 2026-02-19 10:29:01 -08:00
yuneng-jiang 9eaaa9740b bump: version 0.4.42 → 0.4.43 2026-02-19 10:28:35 -08:00
yuneng-jiang c911cfbabf Merge remote-tracking branch 'origin' into litellm_key_last_active_tracking 2026-02-19 10:27:48 -08:00
yuneng-jiang 2df7d1770a Merge pull request #21580 from BerriAI/proxy_extras_feb19
[Infra] bump proxy extras
2026-02-19 10:12:33 -08:00
yuneng-jiang c3317ea2b3 build files 2026-02-19 10:11:47 -08:00