Commit graph

47404 commits

Author SHA1 Message Date
devin-ai-integration[bot]
c2265b0ef3
fix(proxy): return persisted team memberships from /user/new so first CLI login gets the default team (#39545)
* fix(proxy): return persisted team memberships from /user/new

new_user attached default teams after building its response from the
pre-membership snapshot, so NewUserResponse.teams was always empty for
users created with default_internal_user_params.teams. The CLI SSO flow
reads that response on a user's first login and minted a teamless JWT,
which skipped the default team's model allowlist.

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

* fix(proxy): return team ids as a tuple to satisfy LIT001

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

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 11:55:59 -07:00
Mateo Wang
f87b9097ea test(bedrock): drop EOL cohere.command-r-plus-v1:0 from local_testing
Bedrock retired cohere.command-r-plus-v1:0 on 2026-08-19 and lists no
Cohere command chat model anymore, so the three local_testing cases that
pinned it fail with a 404 end-of-life error on every pipeline. Drop the
case from test_completion_bedrock_httpx_models and move the
parallel-streaming Bedrock entry to mistral.mistral-7b-instruct-v0:2,
which still takes the invoke route and is ACTIVE in the CI account.
2026-09-03 11:50:51 -07:00
ryan
4d2ffe2e8e test(ui): hoist inherited-grant fixture out of the inline createMockTeamData arg
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 18:38:22 +00:00
Mateo Wang
4b1e24eae9
Merge pull request #39525 from BerriAI/litellm_fix_gpt_image_background_dropped
fix(images): forward gpt-image supported params like background to OpenAI and Azure
2026-09-03 11:32:05 -07:00
ryan
3b13a5fda9 test(ui): query the tokens cell by role instead of walking the DOM
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 18:31:43 +00:00
mateo-berri
501f47ba2f fix(proxy): run the failure hook when a pass-through stream dies mid-body 2026-09-03 11:31:35 -07:00
ryan-crabbe-berri
07c5908b18 fix(ui): let the Internal Users search box match user_id as well as email
GET /user/list gains an optional search query param that ORs a case-insensitive contains match over user_id and user_email. The Users page search box now sends that param and reads "Search by email or ID…", the way the Teams page already searches by name or ID. Every existing /user/list param keeps its meaning and the Filters drawer is untouched

Claude-Session: https://claude.ai/code/session_018yW93iDaEMhoQUXcYjus7D
2026-09-03 11:27:56 -07:00
ryan-crabbe-berri
b3325750ae fix(ui): aggregate session token usage in the logs table
The logs table already rolled up cost per session but the Tokens column only showed the representative call's usage. The per-session aggregate query now also sums prompt, completion and total tokens, and the Tokens cell switches to those sums for multi-call sessions the same way the Cost cell does.

Claude-Session: https://claude.ai/code/session_01CNasFqyjnLN3Rqman25vde
2026-09-03 11:09:44 -07:00
mateo-berri
aaef5d219a fix(proxy): drop anthropic-beta on the Vertex passthrough count-tokens route 2026-09-03 11:07:29 -07:00
mateo-berri
ec2e35b679 fix(image_gen): keep the provider's echoed size, quality, and output_format on gpt-image responses 2026-09-03 11:07:08 -07:00
yuneng-jiang
fa533f709b
Merge pull request #39595 from BerriAI/litellm_/release-version-bump-be1c60
chore: bump litellm-enterprise 0.1.63 -> 0.1.64, litellm-proxy-extras 0.4.92 -> 0.4.93
2026-09-03 11:03:31 -07:00
mateo-berri
9f806be6e8 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_mistral_voxtral_tts_speech
# Conflicts:
#	tests/test_litellm/test_router.py
2026-09-03 11:00:31 -07:00
Yuneng Jiang
ba9bb75298
bump: litellm-enterprise 0.1.63 -> 0.1.64, litellm-proxy-extras 0.4.92 -> 0.4.93 2026-09-03 10:53:50 -07:00
mateo-berri
4d3c1998af fix(image_gen): report the requested output_format on gpt-image responses 2026-09-03 10:50:23 -07:00
mateo-berri
1b42b81f4e fix(router): log the hashed affinity key so JWT callers stay distinguishable 2026-09-03 10:50:21 -07:00
Mateo Wang
7d6781fe6a
Merge pull request #35987 from BerriAI/litellm_bedrock_mantle_web_search
fix(bedrock_mantle): stop dropping the web_search tool on /v1/responses
2026-09-03 10:45:28 -07:00
mateo-berri
68ffa1db23 fix(router): pin JWT-authenticated callers by user id in deployment_affinity 2026-09-03 10:43:41 -07:00
mateo-berri
b9e030ddd6 fix(cost): apply off_peak_pricing in the dashscope cost calculator 2026-09-03 10:38:25 -07:00
yujonglee
bb7d787425
Merge pull request #39571 from BerriAI/codex/team-id-empty-field
fix(team): generate team IDs for blank input
2026-09-03 10:35:01 -07:00
tin-berri
7256bd307a
fix(mcp): scope allow-all servers to virtual keys (#39531) 2026-09-03 10:32:03 -07:00
Mateo Wang
27274f65e4
Merge pull request #39554 from BerriAI/litellm_fix_flaky_model_hub_e2e
fix(agents): keep the published agent in public_agent_groups
2026-09-03 10:29:41 -07:00
devin-ai-integration[bot]
a0f44af838
fix(proxy/db): translate libpq sslrootcert and verify-* into Prisma's strict TLS params (#39563)
* fix(proxy/db): translate libpq sslrootcert and verify-* into Prisma's strict TLS params

Prisma silently drops sslrootcert and treats sslmode=verify-ca/verify-full as
prefer, so a DATABASE_URL copied from the RDS docs connected over TLS without
checking the server certificate. The URL handed to Prisma (writer, DIRECT_URL,
read replica, componentized entrypoints) now carries sslmode=require,
sslcert=<bundle> and sslaccept=strict instead.

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

* style(proxy/db): ruff format translate_libpq_ssl_params

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

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 10:27:46 -07:00
devin-ai-integration[bot]
29c37141c3
feat(ui): keyset-paginate request logs by session trace (#38794)
* feat(ui): keyset-paginate request logs by session trace

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

* fix(proxy): keep session grouping within type discipline budget

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

* style(proxy): ruff format session grouping helpers

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

* fix(proxy): only group sessions when group_by_session is an explicit true

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

* fix(ui): reset session cursor on custom range and live tail toggles

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

* test(ui): cover cursor reset on custom range toggle

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

* fix(ui): ignore next page clicks while the grouped page is still fetching

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

* fix(ui): only block next page while grouped placeholder data is shown

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

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: yassin <yassin@berri.ai>
2026-09-03 17:27:05 +00:00
yujonglee
6f5bf0dab8
Merge pull request #39425 from BerriAI/litellm_ocr_fixture_generation
test(ocr): record provider fixtures in the migration harness
2026-09-03 10:26:39 -07:00
mateo-berri
cf7abf8136 fix(proxy): log mid-stream /v1/messages failures as failures with partial usage
A provider read timeout after the 200 was already committed on a streamed
/v1/messages request used to run the success logging path, so the failure
callbacks never fired and the failure metrics stayed flat. The pass-through
stream handler and the Bedrock relay iterator now dispatch the failure
handlers instead, with the usage and cost of the chunks already delivered
stashed on the logging object so the failure row still bills them.
2026-09-03 10:25:19 -07:00
Mateo Wang
3fd74dfbb4
Merge pull request #39409 from BerriAI/litellm_databricks_strip_thinking_blocks
fix(databricks): strip thinking_blocks and reasoning_content from outbound messages
2026-09-03 10:22:48 -07:00
ryan-crabbe-berri
2fd6e19051 fix(ui): name the granting access group on hover instead of an Inherited tag
`/team/info` access_group_details now carries mcp_server_ids and agent_ids per
group next to models, so the dashboard can say which group granted a server or
agent. The Object Permissions rows drop the Inherited badge and the row tooltip
reads "Granted via access group <name>. Full ID: <id>", listing every group
when more than one grants the same id and falling back to "an access group"
when the proxy did not say.

Claude-Session: https://claude.ai/code/session_01QvQzYztinxj8ZuD5YxbVdL
2026-09-03 10:20:10 -07:00
Yujong Lee
8c180afd4b test(ocr): record provider fixtures in the migration harness 2026-09-03 10:16:40 -07:00
yujonglee
2c30fe16b0
Merge pull request #38765 from BerriAI/litellm_ocr_sdk_parity_tests
test(harness): add OCR parity with migration strategy runners
2026-09-03 10:16:35 -07:00
mateo-berri
8713ba8a52 test(bedrock_mantle): capture the drop warning with caplog instead of patching the logger 2026-09-03 10:07:52 -07:00
mateo-berri
7a5e4b9ba4 fix(openai): bridge gpt-5.4+ tool calls to /v1/responses on every api.openai.com host
The auto-bridge that moves gpt-5.4+ requests carrying function tools and no
reasoning_effort onto /v1/responses only fired when the resolved api_base was
the literal https://api.openai.com/v1, so a deployment pointed at an OpenAI
PrivateLink hostname (<region>.privatelink.api.openai.com) or a port-qualified
or trailing-slash default stayed on Chat Completions and got OpenAI's 400 back.
Gate on the resolved URL's hostname instead: api.openai.com or any subdomain of
it bridges, every other custom base still stays on chat
2026-09-03 10:04:18 -07:00
yuneng-jiang
bd9de39349
Merge pull request #39583 from BerriAI/litellm_deterministic_timeout_tests
test(timeout): time out against the local fake endpoint instead of api.openai.com
2026-09-03 10:04:02 -07:00
Yuneng Jiang
c70e4857fa
test(timeout): time out against the local fake endpoint instead of api.openai.com
test_router_timeout, test_timeout_streaming and test_openai_embedding_timeouts
asked api.openai.com for a response in 10 to 100 microseconds and asserted the
resulting exception was a timeout. No connect can finish in that window, so
socket.create_connection always walked the whole address list, and because it
re-raises only the LAST address's error, the assertion was decided by the order
getaddrinfo happened to return.

api.openai.com is dual-stack and the CI container has no usable IPv6, so a
trailing AAAA record made the last attempt fail with an OSError. httpcore maps
socket.timeout to ConnectTimeout but OSError to ConnectError, so the expected
APITimeoutError arrived as APIConnectionError and the job went red. The three
tests were really measuring DNS ordering, not litellm.

Point them at the fake OpenAI endpoint the suite already runs, ask for the
slow-endpoint model it already delays on, and give them a timeout comfortably
under that delay. The embeddings route did not honour slow-endpoint yet, so it
now delays the same way chat and text completions already do.

Each test also gained a failure on the success path. Without it a request that
returned instead of timing out fell out of the try block and the test passed on
a result it was written to reject.
2026-09-03 09:53:30 -07:00
mateo-berri
a1e58aabe7 Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_bedrock_mantle_web_search 2026-09-03 09:50:42 -07:00
yuneng-jiang
342e4470c4
fix(ui): replace the key detail URL entry when a virtual key is rotated (#39471)
Regenerating a key repointed ?key= at the rotated hash with a pushed history
entry, so pressing the browser Back button landed on the hash that had just
been revoked. /key/info answers 404 for it and the page shows "Key not found
in database".

The rotated hash now replaces the current entry instead of pushing a new one,
so Back from a just-regenerated key returns to the key list. Opening a key
from the table still pushes, so Back from a normally opened key is unchanged.
2026-09-03 09:47:45 -07:00
moe-berri
4990f06acc
feat(auto-router): support classifier reasoning effort (#39372)
* feat(auto-router): support classifier reasoning effort

* fix(auto-router): harden classifier reasoning effort

* fix(ui): satisfy classifier config lint limits

* refactor(auto-router): simplify classifier effort support

* fix(auto-router): clear frontend-lint and type-discipline gates, trim LOC

---------

Co-authored-by: Tin Chi Lo <tin@berri.ai>
2026-09-03 08:59:04 -07:00
Mateo Wang
34d4f7f8ae
fix: 1.99.0-rc2 UI bug batch (empty org on key create, session pagination, access group rename/delete) (#39436)
* fix(ui): clearing the organization picker no longer sends organization_id="" on key create

* fix(proxy): paginate Request Logs by conversation and aggregate session type counts and models server-side

* fix(proxy): keep access groups in sync when a model is renamed or deleted

* fix(proxy): cap the Request Logs conversation total like the row total

* fix(proxy): judge access group backing by the database for db models

A worker whose router has not polled the database yet still lists a sibling under its old
name, so a delete or rename handled there kept the stale name in every access group. Only
config-sourced deployments count as router backing now; db models are counted in the table.

* fix(ui): keep the conversation badge when an MCP call represents a conversation

A conversation that straddles the bounded page window can be represented by one of its MCP
rows, which showed a plain MCP badge and hid the session counts. The badge now reads the
server aggregates whenever the conversation has more than one call.

* fix(proxy): list every model of a conversation in Request Logs and keep the conversation badge for MCP representatives

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

* fix(proxy): type session spend aggregates

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

* fix(ui): satisfy request logs lint budget

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

* fix(proxy): cap per-session model aggregation in request logs

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

* chore: ratchet type-discipline budget after staging merge

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

* fix(ui): send an explicit null when the key edit form clears the organization

Clearing the Organization picker in the key edit form wrote undefined into
the form value, and JSON.stringify drops undefined-valued keys, so
/key/update never saw the field and the key kept its old organization.
Writing null instead survives serialization, and the backend's
model_dump(exclude_unset=True) preserves it, so the column is set to NULL.

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 08:58:48 -07:00
Rakesh
1de960bce7
fix(docker): bump nginx runtime to 1.31.5-alpine3.24 and pin digest to resolve critical CVEs (#39561) 2026-09-03 08:46:07 -07:00
Cursor Agent
d426b99f56
fix(spend): page reverse-hash recovery past the first 10k keys
Historical dirty spend on large installs was still unlabeled when the
matching token sat past the first page. Keep scanning until the digest
matches or the table ends.

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 15:44:18 +00:00
Devin AI
35c6a768c0 fix(spend-tracking): keep internal service-account key names readable in spend logs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 15:42:55 +00:00
devin-ai-integration[bot]
e80e78d3ef
feat(cli): enable Claude Code gateway model discovery by default in lite claude (#39445)
* feat(cli): enable Claude Code gateway model discovery by default in lite claude

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

* refactor(cli): build agent env declaratively and document discovery key for lite up

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

* fix(cli): keep build_agent_env within LIT002 type-discipline budget

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

---------

Co-authored-by: yassin <yassin@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-03 08:38:25 -07:00
Mateo Wang
45495e1ab5
Merge pull request #39506 from BerriAI/litellm_fix_v2_migration_resolver_attempt_accounting
fix(proxy-extras): only spend a migrate-deploy attempt when a pass made no progress
2026-09-03 08:36:31 -07:00
Cursor Agent
4db370e851
style(spend): format CloudZero and Focus recovery row coercion
Required lint failed ruff format on the ternary that unwraps a polars DataFrame or list before alias recovery

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 15:25:46 +00:00
Cursor Agent
d3c839147e
fix(spend): keep CloudZero export and spend-log snapshots compatible with email recovery
Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 15:21:35 +00:00
Cursor Agent
7e4032cfcc
chore(openapi): sync lazy snapshot with KeyMetadata.user_email
Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 15:16:37 +00:00
Cursor Agent
e109d89c20
fix(usage): include user_email on daily activity key breakdowns
Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 15:11:45 +00:00
Cursor Agent
eeb8b4f7f3
test(spend): assert batch spend metadata keeps user email
Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 15:00:31 +00:00
Cursor Agent
6f4ea2d296
fix(usage): label key activity tables with email when alias is missing
Key Activity charts already fell back to user_email. The top-keys tables
and usage export still printed '-' or a truncated hash. They now use the
same alias-then-email label.

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 14:58:05 +00:00
Cursor Agent
e76a18ca32
fix(usage): return user_email on key activity metadata
Recovery already resolved the owner email for double-hashed spend keys,
then Key Activity dropped it. The Usage payload now carries user_email
and the key label falls back to that email before key-hash-...

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 14:56:26 +00:00
Cursor Agent
f610d20543
fix(spend): keep key recovery import-safe and LIT-clean
The Python 3.10 smoke check imports the proxy without prisma, so PrismaError
is loaded only inside the DB helper. Recovery now returns frozen mappings
and ReadOnly TypedDict fields so the type-discipline budget stays put.

Co-authored-by: Mateo Wang <mateo-berri@users.noreply.github.com>
2026-09-03 14:52:01 +00:00