Commit graph

42377 commits

Author SHA1 Message Date
mubashir1osmani
77fef603b5 style(ui): size chat suggestions to match the composer width
Use a full-width 3-column grid above the textarea with slightly larger
chip padding and type so prompts stay readable
2026-08-06 16:03:46 -07:00
mubashir1osmani
1d6e42b425 style(ui): tighten playground chat suggestion chips into a 3-col grid
Keep the three prompts on one row with a narrower max width and smaller
padding/type so they sit cleanly above the composer
2026-08-06 16:02:53 -07:00
mubashir1osmani
50c66ab99d test(ui): cover interactions MCP tool block serialization
Assert the playground interactions client forwards buildMcpToolBlocks
when servers are selected and omits tools otherwise
2026-08-06 15:51:28 -07:00
mubashir1osmani
e99ef9d5dd fix(ui): make playground MCP work on all tool-capable endpoints
Route chat, responses, anthropic, and interactions through the shared
buildMcpToolBlocks helper so MCP server_url/label resolution is correct
for any model. Chat was labeling every server as "litellm" and preferring
aliases; responses used absolute /mcp URLs that broke the all-servers path
2026-08-06 15:51:28 -07:00
mubashir1osmani
609f7beddf fix(ui): show MCP servers in playground multi-select
Anchor MultiSelect popup to chips, forward refs on ComboboxChips, harden
MCP list response parsing, and load servers with the active key so
existing MCP servers appear in the dropdown
2026-08-06 15:51:28 -07:00
mubashir1osmani
ba339cac0c fix(ui): restore minimal realtime playground client
Drop the custom cancel/queue/dual-buffer state machine and the duplicate
OPEN_AI_REALTIME_VOICES list. Reuse OPEN_AI_VOICE_SELECT_OPTIONS and the
original thin WebSocket event handler (append deltas, response.done
fallback) with the shared ChatComposer shell
2026-08-06 15:51:28 -07:00
mubashir1osmani
ca6de79a8d fix(ui): stop realtime responses from stalling or splitting bubbles
Text turns use text-only modalities with VAD off, and voice re-enables
audio+VAD only while recording so residual VAD cannot race a second
response. Stream text and transcript into one draft, always update the
last assistant bubble (even past status lines), and unlock with a cancel
timeout so the UI cannot stick mid-response forever
2026-08-06 15:42:04 -07:00
mubashir1osmani
d4ac065b26 fix(ui): queue realtime pending messages and drop new comments
Keep every text submission while a response is cancelled, not only the
latest. Remove newly added source comments called out in review
2026-08-06 15:36:03 -07:00
mubashir1osmani
0fe2b137a2 fix(ui): prevent concurrent realtime responses and garbled transcripts
Track in-progress responses so text/mic turns cannot race response.create,
prefer a single transcript stream per turn, and queue sends until the active
response finishes or is cancelled
2026-08-06 15:35:27 -07:00
mubashir1osmani
6f2555441c feat(ui): restyle realtime playground with shared chat composer
Move RealtimePlayground off Ant Design onto shadcn controls and the
shared ChatComposer, use the realtime-safe voice list, and reuse the
same composer for Compare message input
2026-08-06 15:35:27 -07:00
mubashir1osmani
48de145fd5 fix(ui): surface model load failures and align request key with models
Throw when both model endpoints fail so ChatUI can show an error instead of
an empty list. Use the same resolved key for model listing and chat requests,
and drop the fetch_models JSDoc
2026-08-06 15:35:24 -07:00
mubashir1osmani
34c18ca2b2 fix(ui): show human labels on playground SDK type select
Match the SelectValue children pattern so OpenAI SDK / Azure SDK
render instead of the raw openai/azure values
2026-08-06 15:35:03 -07:00
mubashir1osmani
7ff6f26b93 fix(ui): show human labels on playground virtual key source select
Base UI SelectValue renders the raw value unless children supply the
label, so map session/custom to Current UI Session and Virtual Key
2026-08-06 15:35:03 -07:00
mubashir1osmani
65203b2920 fix(ui): load playground models for virtual keys via /v1/models
Prefer the key-scoped OpenAI models list when the Virtual Key source is
selected, enrich with mode from model_group/info, and debounce custom key
input so models appear for the key's access set
2026-08-06 15:35:02 -07:00
mubashir1osmani
3018fb7dc1 fix(ui): size chat composer textarea with CSS field-sizing
Drop direct el.style.height mutation in favor of field-sizing:content
2026-08-06 15:34:42 -07:00
mubashir1osmani
d050060cd4 style(ui): strengthen playground chat composer border and shadow
Make the shared chat input stand out with a fuller border, layered
shadow, and a slightly stronger focus ring
2026-08-06 15:34:22 -07:00
mubashir1osmani
74b400d5be feat(ui): adopt vercel-style chat composer for playground
Replace the compact single-line input with a PromptInput-style composer:
taller auto-growing textarea, rounded card shell, footer tools, and
stop button while a request is in flight
2026-08-06 15:34:22 -07:00
mubashir1osmani
d635f44683 fix(ui): exclude unknown model modes from playground endpoint filters
Modes outside ModelMode (batch, rerank, ocr, etc.) must not collapse to
chat-compatible, or conversational endpoints surface unusable models
2026-08-06 15:34:13 -07:00
mubashir1osmani
4b2781ccb3 fix(ui): restore playground model filtering by endpoint
Bring back the prior Chat model dropdown filter (including chat models
on responses/anthropic/interactions and image models on image_edits), and
map mode realtime so the realtime endpoint only lists compatible models
2026-08-06 15:33:58 -07:00
mubashir1osmani
5102b9c0d8 fix(ui): ignore stale playground model loads on key switch
Cancel in-flight model fetches when the key or source changes so an older
response cannot overwrite modelInfo. Drop the inverted endpoint-filter
assertion; filtering coverage lands in the next stack PR
2026-08-06 15:33:30 -07:00
mubashir1osmani
bb5d9a199a feat(ui): migrate ChatUI off Ant Design and Tremor
Replace ChatUI cards, inputs, dialogs, popovers, MCP selects, uploads,
tooltips, and icons with shadcn/Base UI and Lucide. Update ChatUI tests
to drive searchable combobox controls instead of Ant Design selectors
2026-08-06 14:33:39 -07:00
mubashir1osmani
ea654d11a5 feat(ui): migrate playground tabs and message icons to shadcn
Replace Tremor playground page tabs with Base UI tabs and swap remaining
message bubble and attachment renderer icons to Lucide
2026-08-06 14:26:15 -07:00
mubashir1osmani
f5d98c0b8c feat(ui): migrate playground chat controls toward shadcn
Continue the Playground Chat Ant Design/Tremor migration: shared MultiSelect,
upload validation with semantic file inputs, collapsible message widgets, and
AdditionalModelSettings on Base UI controls
2026-08-06 14:25:11 -07:00
Mateo Wang
f6587faef5
Merge pull request #36076 from BerriAI/litellm_blame_ignore_mechanical_refactors 2026-08-06 12:46:11 -07:00
Mateo Wang
0c3017e1de
Merge pull request #35371 from rimysore/fix-managed-batch-cross-provider-fallback
fix(batches): prevent managed file fallbacks
2026-08-06 11:40:38 -07:00
Mateo Wang
c1fa15132b
Merge pull request #35811 from dkindlund/fix/anthropic-output-format-additional-properties
fix(anthropic): coerce explicit additionalProperties to false in output_format schema
2026-08-06 11:05:57 -07:00
yuneng-jiang
63c639f18b
Merge pull request #36062 from BerriAI/litellm_/lucid-pike-b1ee0e
fix(proxy): allow non-admins to reach /user/daily/activity/aggregated
2026-08-06 10:54:20 -07:00
Mateo Wang
0c32fc54b2
Merge pull request #36034 from BerriAI/litellm_batch_cancel_registers_output_files
fix(batches): register managed output files on batch cancel
2026-08-06 10:41:36 -07:00
Mateo Wang
73ea5e5602
Merge pull request #36048 from BerriAI/litellm_cancelled_batch_unified_output_ids
fix(batches): persist managed file ids for cancelled/failed/expired batches
2026-08-06 10:40:07 -07:00
yuneng-jiang
48cb89dba7
Merge pull request #36061 from BerriAI/litellm_/blissful-elion-1e2003
fix(proxy): stop resolving the UI session sentinel team on /search_tools/list
2026-08-06 10:04:44 -07:00
Mateo Wang
9e7b05731d
Merge pull request #36054 from BerriAI/litellm_reduce_any_types
refactor(types): cut 653 implicit and explicit Any diagnostics across 11 modules
2026-08-06 09:54:12 -07:00
Mateo Wang
66e6d53931
Merge pull request #36039 from BerriAI/litellm_reload_ledger_test_isolation
test: roll back runtime model registrations between tests
2026-08-06 09:50:39 -07:00
Mateo Wang
41d8cddfd7
Merge pull request #36072 from BerriAI/litellm_ruff_strict_mappingproxy
chore(lint): name MappingProxyType in the mutable-collection fix messages
2026-08-06 09:47:25 -07:00
Mateo Wang
686473b1ab
Merge pull request #36059 from BerriAI/litellm_claude_md_word_budgets
docs: cap all GitHub comments at 15-25 words, curb semicolon splices
2026-08-06 09:47:12 -07:00
Mateo Wang
aae06a5fd1
Merge pull request #36050 from BerriAI/litellm_gate_owned_typecheck_venv
fix(lint): measure the basedpyright budget gate in a gate-owned venv
2026-08-06 09:45:52 -07:00
Praveena Mundolimoole
2d2994c9e9
fix(proxy): yaml store_prompts_in_spend_logs should take precedence over DB cached value (#35769)
When store_model_in_db is true, general_settings are persisted to the
LiteLLM_Config DB table. On subsequent startups and periodic reloads,
_add_general_settings_from_db_config() unconditionally overwrites the
in-memory general_settings with DB-cached values, including
store_prompts_in_spend_logs.

This means a YAML config change (e.g. store_prompts_in_spend_logs: false)
deployed via CI/CD has no effect because the stale DB value (true) always
wins. The admin must manually update via /config/update API after every
deploy, defeating config-as-code.

Fix: track which general_settings keys were explicitly set in YAML at
startup (_yaml_general_settings_keys). During DB config merge, prefer the
YAML value for tracked keys. The DB value is only used as fallback when
YAML does not set the key, preserving the admin UI's ability to change
settings at runtime.

Steps to reproduce:
1. Start proxy with store_model_in_db: true, store_prompts_in_spend_logs: true
2. Change YAML to store_prompts_in_spend_logs: false, restart
3. Send a request, query LiteLLM_SpendLogs - prompts still stored
4. Check LiteLLM_Config table - DB still has true, overriding YAML

Slack thread: https://dataset-jsonhackathon.slack.com/archives/C0ACUS7LM29/p1785835131860139
2026-08-06 09:32:44 -07:00
mateo-berri
ca7453bc69
chore(lint): recompute budget ceilings after merging base
The base branch ratcheted the same limits in 28a277e9, so the conflicting
files were reset to base and the ratchet re-run against the new merge-base
rather than resolved by hand. Each limit is now the base value minus this
branch's own delta, so both ratchets survive: basedpyright -653 across 48
rules, strict ruff -80, LIT -85.
2026-08-06 12:04:38 +00:00
mateo-berri
f9d48bd47c
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_reduce_any_types
# Conflicts:
#	basedpyright-code-budget.json
#	type-discipline-budget.json
2026-08-06 11:48:17 +00:00
mateo-berri
2c91166d32
chore: ignore the mechanical lint and typing sweeps in git blame
Seven wide-reaching but semantically neutral commits landed since the
last entry, together rewriting roughly 162k lines across ~4,700 file
touches. Blame on any line they reflowed points at the sweep instead of
the commit that wrote the logic.

They cover the safe ruff autofix pass, the collections.abc import move,
the f-string !s cleanup, lazy log message construction, the LIT010 and
LIT011 Final and frozen-parameter rollout, ruff coverage for
litellm/types, and the inert type: ignore strip.

Smaller ratchet commits are left out on purpose: each touches a few
hundred lines at most, so listing them would grow the file faster than
it buys back blame accuracy
2026-08-06 11:39:34 +00:00
mateo-berri
20a94a9100 chore(lint): move MappingProxyType to the dynamic tail of the LIT002 freeze menu
Revert the LIT001 build-clause inserts, phrase the LIT002 menu as
'or (if it really must be dynamic) a MappingProxyType wrapping a dict
literal or comprehension', and fold the two freezing-wrapper exemption
sentences into one that names MappingProxyType beside tuple/frozenset.
2026-08-06 03:58:07 -07:00
Mateo Wang
818e319b53
chore: make it more concise 2026-08-06 03:38:28 -07:00
Mateo Wang
d0712e1a5e
chore: make CLAUDE.md more concise 2026-08-06 03:37:46 -07:00
mateo-berri
d7ca4dc77f chore(lint): say annotate Mapping[...] instead of Mapping alias in typing.Dict ban 2026-08-06 03:34:34 -07:00
mateo-berri
0c1a4b127d chore(lint): name MappingProxyType in the mutable-collection fix messages
LIT001/LIT002 and the typing.Dict ban all steered dict-shaped values to
frozen dataclasses or suppression even though the checker already accepts
MappingProxyType as a freezing wrapper; the messages now name it so the
dict-shaped freeze path is actually discoverable at fix time.
2026-08-06 03:31:40 -07:00
Mateo Wang
b66d4e6965
Merge pull request #35137 from BerriAI/litellm_fix_responses_cost_router_35131
fix(proxy): fetch background responses through the router in CheckResponsesCost
2026-08-06 03:26:36 -07:00
Mateo Wang
972c0d0b04
Merge pull request #35140 from BerriAI/litellm_fix_file_content_placeholder_cost
fix(cost): stop token-pricing the placeholder input on file content calls
2026-08-06 03:04:36 -07:00
Mateo Wang
920e05c484
chore: fix typo 2026-08-06 02:45:44 -07:00
mateo-berri
470ebc2089 test(batches): cover caller-supplied db row skipping the cancel-path lookup 2026-08-06 02:27:59 -07:00
mateo-berri
526f6d793e fix(lint): retire the single-slot base-counts cache
Storing a baseline used to prune every other cache entry, so gate runs in
concurrent worktrees kept evicting each other's baselines and forcing full
recomputes: this bit six times across two nights of benchmarking. The store
now writes alongside existing entries and evicts only the oldest beyond
eight, keyed as before by merge-base and environment fingerprint, so
parallel worktrees' baselines simply coexist
2026-08-06 02:23:52 -07:00
Mateo Wang
729bec69f5
Merge pull request #36014 from BerriAI/litellm_scan_only_tool_results
feat(guardrails): add scan_only_tool_results to scope unified guardrails to tool results
2026-08-06 02:17:29 -07:00