Commit graph

51482 commits

Author SHA1 Message Date
Yuneng Jiang
e7fd89fc02
fix(ui): narrow the web search settings response instead of asserting its shape 2026-09-19 14:27:10 -07:00
Yuneng Jiang
8dab23f6ac
test: cover the no-database and failed-reinit paths of the web search settings endpoints 2026-09-19 13:10:43 -07:00
Yuneng Jiang
d5ae810ea9
fix: let operators allowlist web search interception settings
Peer pods gate the settings poll on general_settings.supported_db_objects,
which validates against SupportedDBObjectType. Without a member for this
name an operator could not opt in, so a configured allowlist left every
pod but the one that served the write on stale settings.

Also types the dashboard's settings payload off the generated schema
instead of Record<string, any>.
2026-09-19 13:02:29 -07:00
Yuneng Jiang
d15ceab174
fix(proxy): declare the web search settings auth dependency with Annotated 2026-09-19 12:30:39 -07:00
Yuneng Jiang
8622c93a11
Merge remote-tracking branch 'origin/main' into litellm_/web-search-autoship-scope-01a237 2026-09-19 12:22:49 -07:00
Yuneng Jiang
0243d268bc
fix(ui): report interception as the proxy is actually running it
A second review pass found two more ways a write through the generic
config endpoint, which validates nothing, could strand the feature.

Dropping the enabled flag from a settings block the proxy had already
applied stopped the poller from reconciling it ever again, so the
callback served the old search tool forever. The poller now yields to
litellm_settings.callbacks only while it has applied nothing itself;
once it owns the callback it keeps reconciling.

A provider list written as a bare string was iterated one character at a
time, so interception matched no real provider - the same failure the
empty list already had. Anything that is not a non-empty list is now
dropped so the handler default applies.

The page also derives its toggle from whether the callback is registered
rather than from a stored flag, because a block can be live with no flag
in it at all, and the toggle is what an admin saves back.
2026-09-19 12:22:44 -07:00
kerry-berri
b946d12ffd
Merge pull request #41996 from BerriAI/litellm-providers/price-sync-openrouter
chore(prices): sync OpenRouter prices: 2 models
2026-09-19 12:13:09 -07:00
Yuneng Jiang
014f5cbf68
fix(ui): stop the interception panel from disabling a config-driven proxy
Self-review found four ways the new settings page could take web search
interception down instead of configuring it.

A proxy that activates interception through litellm_settings.callbacks
stores no enabled flag, so the page reported it as off while it was
serving, and saving anything on that page persisted that answer and the
next poll removed the running callback. Reads now resolve the flag from
the callbacks list, and a stored block without an explicit flag no longer
touches the callback list at all.

An empty provider list is the page's own default, but the handler reads
it as "match no provider" rather than falling back to Bedrock, so
enabling the feature without naming a provider switched it on and
intercepted nothing. The empty list is now dropped so the handler default
applies.

The replacement logger is also built before the old one is removed, so a
loop ceiling the handler refuses no longer leaves the proxy with none and
retrying every poll, and a stored "false" string now reads as off rather
than as a truthy string.
2026-09-19 12:07:51 -07:00
yucheng-berri
4301ac4940
Merge pull request #41986 from BerriAI/litellm_revert_post_call_guardrail_context
revert(guardrails): drop the scoped request conversation and tools from post-call scans (#41220)
2026-09-19 12:06:30 -07:00
berriai-litellm-provider-info-sync[bot]
38b310b751
chore(prices): sync OpenRouter prices: 2 models
openrouter/deepseek/deepseek-v4-flash: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/qwen/qwen-plus-2025-07-28: supports_prompt_caching
2026-09-19 19:00:52 +00:00
Yuneng Jiang
e12cbb4e13
feat(ui): configure web search interception from the Admin UI
Web search interception could only be switched on by editing config.yaml
and restarting the proxy, so an admin had no way to turn it on, choose
which providers it covers, or pick which configured search tool runs the
searches without a redeploy.

Adds GET/PATCH /get|update/websearch_interception_settings backed by a
WebSearchInterceptionSettings model, and an Admin Settings panel that
reads and writes them. Config/database precedence comes from the existing
settings store, so a key the config file declares is still refused here.

The stored settings apply to a running proxy: the DB poll rebuilds the
WebSearchInterceptionLogger, removing the old instance before adding the
new one, because two instances with different params hash differently in
the callback dedup key and the first to short-circuit would win. A proxy
that activates interception the existing way, through
litellm_settings.callbacks with no stored params, is left untouched.
2026-09-19 11:54:57 -07:00
joshua-berri
eda1faba14
Merge pull request #41718 from BerriAI/litellm_mcp_dependency_gate_7737
refactor(mcp): upgrade SDK2 while preserving legacy gateway behavior
2026-09-19 18:53:19 +00:00
kerry-berri
c3fa53be8d
Merge pull request #41993 from BerriAI/litellm_remove_auto_merge_price_sync
ci: remove auto-merge-price-sync workflow, the Devin sync automation merges price PRs
2026-09-19 11:44:36 -07:00
yujonglee
f081e447a4
Merge pull request #41992 from BerriAI/litellm_deepseek_ocr_defaults
fix(ocr): set DeepSeek OCR sampling defaults
2026-09-19 11:42:49 -07:00
kerry-berri
b89a6fba4c
Merge pull request #41833 from BerriAI/litellm-providers/price-sync-openrouter
chore(prices): sync OpenRouter prices: 172 models, 2 new
2026-09-19 11:42:34 -07:00
kerry
987af6c66c ci: remove auto-merge-price-sync workflow, the Devin sync automation merges price PRs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 18:33:06 +00:00
ryan-crabbe-berri
659cef0f57
Merge pull request #40729 from BerriAI/litellm_lit7572_top_keys_user_column
fix(ui): show user attribution in Top Virtual Keys usage tables
2026-09-19 11:32:35 -07:00
Yujong Lee
8c21a988b7 fix(ocr): set DeepSeek OCR sampling defaults
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 18:31:49 +00:00
berriai-litellm-provider-info-sync[bot]
a04ba30f7d
chore(prices): sync OpenRouter prices: 172 models, 2 new
openrouter/~anthropic/claude-fable-latest: supports_web_search
openrouter/~anthropic/claude-haiku-latest: supports_web_search
openrouter/~anthropic/claude-opus-latest: supports_web_search
openrouter/~anthropic/claude-sonnet-latest: supports_web_search
openrouter/~deepseek/deepseek-flash-latest: max_tokens, max_output_tokens, input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/~deepseek/deepseek-v4-flash-latest: max_tokens, max_output_tokens, input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/~google/gemini-flash-latest: supports_web_search
openrouter/~google/gemini-pro-latest: supports_web_search
openrouter/~moonshotai/kimi-latest: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/~openai/gpt-astra-latest: supports_web_search
openrouter/~openai/gpt-luna-latest: supports_web_search
openrouter/~openai/gpt-mini-latest: supports_web_search
openrouter/~openai/gpt-sol-latest: supports_web_search
openrouter/~openai/gpt-terra-latest: supports_web_search
openrouter/~x-ai/grok-latest: supports_web_search
openrouter/~z-ai/glm-latest: max_tokens, max_output_tokens, input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/anthropic/claude-3-haiku: supports_web_search
openrouter/anthropic/claude-fable-5: supports_web_search
openrouter/anthropic/claude-fable-5:batch: supports_web_search
openrouter/anthropic/claude-fable-5.1: supports_web_search
openrouter/anthropic/claude-fable-5.1:batch: supports_web_search
openrouter/anthropic/claude-haiku-4.5: supports_web_search
openrouter/anthropic/claude-haiku-4.5:batch: supports_web_search
openrouter/anthropic/claude-opus-4: supports_web_search
openrouter/anthropic/claude-opus-4.1: supports_web_search
openrouter/anthropic/claude-opus-4.1:batch: supports_web_search
openrouter/anthropic/claude-opus-4.5: supports_web_search
openrouter/anthropic/claude-opus-4.5:batch: supports_web_search
openrouter/anthropic/claude-opus-4.6: supports_web_search
openrouter/anthropic/claude-opus-4.6:batch: supports_web_search
openrouter/anthropic/claude-opus-4.7: supports_web_search
openrouter/anthropic/claude-opus-4.7:batch: supports_web_search
openrouter/anthropic/claude-opus-4.8: supports_web_search
openrouter/anthropic/claude-opus-4.8:batch: supports_web_search
openrouter/anthropic/claude-opus-5: supports_web_search
openrouter/anthropic/claude-opus-5:batch: supports_web_search
openrouter/anthropic/claude-sonnet-4: supports_web_search
openrouter/anthropic/claude-sonnet-4.5: supports_web_search
openrouter/anthropic/claude-sonnet-4.5:batch: supports_web_search
openrouter/anthropic/claude-sonnet-4.6: supports_web_search
openrouter/anthropic/claude-sonnet-4.6:batch: supports_web_search
openrouter/anthropic/claude-sonnet-5: supports_web_search
openrouter/anthropic/claude-sonnet-5:batch: supports_web_search
openrouter/deepseek/deepseek-v4-flash: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/deepseek/deepseek-v4-flash-0731: input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/deepseek/deepseek-v4-flash-vision-exp: max_tokens, max_output_tokens
openrouter/deepseek/deepseek-v4-pro: max_tokens, max_output_tokens, input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/deepseek/deepseek-v4.1-flash: off_peak_pricing, input_cost_per_token, output_cost_per_token, cache_read_input_token_cost
openrouter/google/gemini-2.5-flash: supports_web_search
openrouter/google/gemini-2.5-flash-image: supports_web_search
openrouter/google/gemini-2.5-flash-lite: supports_web_search
openrouter/google/gemini-2.5-flash-lite:batch: supports_web_search
openrouter/google/gemini-2.5-flash:batch: supports_web_search
openrouter/google/gemini-2.5-pro: supports_web_search
openrouter/google/gemini-2.5-pro-preview: supports_web_search
openrouter/google/gemini-2.5-pro:batch: supports_web_search
openrouter/google/gemini-3-flash-preview: supports_web_search
openrouter/google/gemini-3-flash-preview:batch: supports_web_search
openrouter/google/gemini-3-pro-image: supports_web_search
openrouter/google/gemini-3-pro-image-preview: supports_web_search
2026-09-19 18:31:02 +00:00
ryan-crabbe-berri
82fd632153 test(ui): share one chart bar lookup across Top Virtual Keys tests
The key_exists chart test added a second direct DOM lookup for the Recharts bars, which exposes no role or label, and pushed testing-library/no-node-access over its budget (709 > 707). Both chart tests now go through one helper
2026-09-19 11:22:01 -07:00
kerry-berri
fc5f6c4b50
Merge pull request #41964 from BerriAI/litellm_registry_audit_20260919
fix(model_prices): drop anthropic deprecation floors and correct azure gpt-4.1-nano retirement date
2026-09-19 11:18:32 -07:00
yucheng-berri
2542ea0320
Merge pull request #41787 from BerriAI/litellm_llm_guard_proxy_call_types
fix(llmguard): accept proxy async call types
2026-09-19 11:17:21 -07:00
ryan-crabbe-berri
89bf870225 fix(ui): stop Top Virtual Keys from opening keys that are not in the database
/user/daily/activity now reports key_exists on each api key's metadata, true
only when the key is in the active key table that /key/info reads. Top Virtual
Keys renders the Key ID as plain text with an explanatory tooltip and ignores
chart bar clicks when key_exists is false, so deleted keys and CLI/SSO session
keys no longer dead-end on a "Key not found in database" toast
2026-09-19 11:08:21 -07:00
Devin AI
107ec2706b style(ui): format Top Virtual Keys aggregation test
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 11:04:46 -07:00
Devin AI
88799f6f80 fix(ui): fall back to user id in Top Virtual Keys user column
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 11:04:46 -07:00
Devin AI
e93fe60512 fix(ui): hide Top Virtual Keys user column when rows carry no user
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 11:04:26 -07:00
Devin AI
3d805e5166 fix(ui): show user attribution in Top Virtual Keys usage tables
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 11:04:26 -07:00
yucheng-berri
2886b8ee27
Merge pull request #41939 from BerriAI/litellm_responses_missing_input_400
* fix(proxy): return 400 instead of 500 for /v1/responses without input

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

* fix(proxy): validate input before starting background responses polling

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

* fix(proxy): validate responses input after prompt template expansion

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

---------

Co-authored-by: yucheng <yucheng@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 11:02:30 -07:00
yucheng
c38dda2b2f fix(llmguard): drop call types the proxy never routes through moderation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 17:57:47 +00:00
tin-berri
77a4624f13
Merge pull request #41920 from BerriAI/litellm_claude_auto_cache_providers
fix(caching): scope automatic breakpoints to supported Claude transports
2026-09-19 12:54:30 -05:00
yucheng-berri
b6758159dd
Merge pull request #41982 from BerriAI/litellm_otel_v2_langfuse_embedding_output
* fix(otel v2): summarize embedding vectors as Langfuse observation output

The v2 LLM span built its output only from response choices, so /v1/embeddings
rendered a Langfuse generation with input, usage and cost but a blank output.
Embedding calls now carry an EmbeddingOutput(count, dimensions) summary that the
Langfuse mapper serializes as the observation output, and they are exported with
the embedding observation type instead of generation. Chat and Responses output
mapping is unchanged.

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

* fix(otel v2): keep embedding observations typed as generation in Langfuse

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

---------

Co-authored-by: yucheng <yucheng@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 10:53:13 -07:00
Joshua Valluru
78e1103bb8 fix(ci): preserve shared runner setup time allowance 2026-09-19 10:46:38 -07:00
yucheng
537cdaf487 Revert "Merge pull request #41220 from BerriAI/litellm_post_call_guardrail_context"
This reverts commit e40b90bbfa, reversing
changes made to d8d5437f55.
2026-09-19 17:45:15 +00:00
Joshua Valluru
8f3562ed9c ci(mcp): consolidate integration tests into shared workflow 2026-09-19 10:41:36 -07:00
yucheng
c4d6c3046e fix(otel v2): keep embedding observations typed as generation in Langfuse
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 17:38:20 +00:00
yuneng-jiang
d0f60fcdec
Merge pull request #41985 from BerriAI/litellm_config_shadows_db_warning
feat(proxy): say when a stored setting is ignored because the config file owns it
2026-09-19 10:36:01 -07:00
Yassin Kortam
4487a9915b
Merge pull request #41915 from BerriAI/litellm_distributed_tpm_shared_redis_check
fix(router): enforce model tpm limits against shared redis usage across replicas
2026-09-19 10:22:25 -07:00
Yuneng Jiang
7353b779c2
feat(proxy): say when a stored setting is ignored because the config file owns it
The config file winning over the database was silent. An admin who had set
a value through the UI and later pinned the same key in the file saw their
stored value quietly stop applying, with nothing said at boot and nothing
said when a later write was refused.

Startup now warns once per key whose stored value differs from the file's,
naming the key and what to do about it. The refusal raised on a write to a
config-owned key carries the same sentence, so the log and the 400 read
identically, and both call out that a stored value exists and will never be
applied. The /config/update refusal gained the same detail.

Keys the file does not declare are untouched: the database still owns them,
and a stored value equal to the file's is not worth a warning.
2026-09-19 10:20:31 -07:00
yujonglee
bd82d73ca1
Merge pull request #41981 from BerriAI/litellm_rust_typed_pyo3
refactor(rust): use typed pyo3 APIs instead of getattr/import strings
2026-09-19 10:09:34 -07:00
Tin Chi Lo
2b086dc7aa fix(caching): scope automatic breakpoints to supported Claude transports 2026-09-19 09:55:38 -07:00
yujonglee
209a780992
Merge pull request #41977 from BerriAI/litellm_rust_sealed_request_textract
feat(rust): add Amazon Textract to litellm.ocr and sign provider requests after host hooks
2026-09-19 09:53:07 -07:00
yucheng
c5181f6178 fix(otel v2): summarize embedding vectors as Langfuse observation output
The v2 LLM span built its output only from response choices, so /v1/embeddings
rendered a Langfuse generation with input, usage and cost but a blank output.
Embedding calls now carry an EmbeddingOutput(count, dimensions) summary that the
Langfuse mapper serializes as the observation output, and they are exported with
the embedding observation type instead of generation. Chat and Responses output
mapping is unchanged.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 16:52:25 +00:00
Yujong Lee
619a19b8a2 refactor(rust): use typed pyo3 APIs instead of getattr/import strings
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 16:46:34 +00:00
Joshua Valluru
fb56a14cd4 chore(mcp): merge main with unit test timeout safeguards 2026-09-19 09:42:08 -07:00
kerry-berri
5d28684016
Merge pull request #41966 from BerriAI/litellm-providers/price-sync-azure
chore(prices): sync Azure prices: 5 models, 5 deprecated
2026-09-19 09:41:53 -07:00
Devin AI
2f1c8669ec fix(model_prices): drop anthropic "not sooner than" floors from deprecation_date
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 16:40:05 +00:00
kerry-berri
6718fd67fb
Merge pull request #41328 from BerriAI/litellm_e2e_cost_calculation_scripted_provider
test(integration): literal request/response cost tracking suite on a test-owned cost map
2026-09-19 09:40:04 -07:00
Mateo Wang
f9d4979d21
Merge pull request #41946 from BerriAI/litellm_deflake_20260919 2026-09-19 09:38:25 -07:00
yucheng
13b05af06e fix(proxy): validate responses input after prompt template expansion
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-19 16:34:53 +00:00
Yujong Lee
eb502824f0 fix stuff 2026-09-19 09:32:46 -07:00