litellm/enterprise/litellm_enterprise/proxy
Sameer Kankute 1d9095f914
fix(bedrock): support tool search results + chat annotations (#29120)
* Fix overiding of fastapi_response headers

* fix(bedrock): support tool search results and surface citations as annotations

Add an optional tool-message search_results path that maps directly to Bedrock toolResult.searchResult blocks, and convert Converse citationsContent into chat completion annotations for user-facing citation metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(format): align bedrock prompt factory with black

Reformat the updated bedrock prompt template conversion file so CI black --check passes.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(bedrock): harden citations, search_results mapping, and token counting

Resolve mypy issues in citation parsing, only attach url_citation annotations when citation text is stitched into content, fall back to tool content when search_results is empty, and count search_results text in token/TPM preflight paths.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(bedrock): extract tool result helpers to satisfy PLR0915

Refactor _convert_to_bedrock_tool_call_result into smaller helpers so lint passes without changing Bedrock tool result behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(bedrock): count all forwarded search_results fields in token estimates

Include source, title, content text, and citations when estimating tokens so large metadata cannot bypass TPM preflight checks. Reformat factory.py with black.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(managed-files): skip content blocks without a type key in get_file_ids_from_messages

* fix(bedrock): stitch citations for any punctuation-only text block

* fix(bedrock): map null citation source/title to empty annotation strings

* fix(bedrock): advance citation offset for text-only citationsContent blocks

* fix(bedrock): complete citation TypedDicts for grounding annotations

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-05-29 20:48:36 -07:00
..
auth chore(auth): require trusted proxy for header identity auth 2026-04-29 21:20:21 -07:00
common_utils fix(managed_batches): convert raw output_file_id to managed ID in CheckBatchCost poller (#27984) 2026-05-15 04:41:38 -07:00
hooks fix(bedrock): support tool search results + chat annotations (#29120) 2026-05-29 20:48:36 -07:00
management_endpoints Merge pull request #27011 from stuxf/fix/project-update-cross-team-hijack 2026-05-01 18:01:06 -07:00
ui_crud_endpoints [Refactor] Proxy: tighten UI settings extras registry 2026-04-13 21:58:02 -07:00
vector_stores litellm_fix(mypy): fix remaining type errors (#20164) 2026-01-31 10:25:23 -08:00
__init__.py Normalize OpenAI SDK BaseModel choices/messages to avoid Pydantic serializer warnings (#18972) 2026-01-14 03:40:11 +05:30
audit_logging_endpoints.py fix(audit): AND semantics for combined JSON filters; remove unused allTeams prop 2026-03-03 14:24:55 -08:00
enterprise_routes.py [Refactor] Proxy: move projects management to enterprise package 2026-04-13 21:41:12 -07:00
proxy_server.py build(ui/): UI - Public Model Hub v2 (#12532) 2025-07-11 22:24:31 -07:00
readme.md Expose /list and /info endpoints for Audit Log events (#11102) 2025-05-23 22:54:59 -07:00
utils.py [Refactor] Move enterprise_routes within litellm_enterprise (#10860) 2025-05-15 10:34:26 -07:00

LiteLLM Proxy Enterprise Features - Readme

Overview

This directory contains enterprise features used on the LiteLLM proxy.

Format

Create a file for every group of endpoints (e.g. key_management_endpoints.py, user_management_endpoints.py, etc.)

If there is a broader semantic group of endpoints, create a folder for that group (e.g. management_endpoints, auth_endpoints, etc.)