Commit graph

37835 commits

Author SHA1 Message Date
Ishaan Jaffer
b6692ef754
schema: add LiteLLM_TeamMemberModelSpend table for atomic per-model spend tracking 2026-04-24 18:56:02 -07:00
Ishaan Jaffer
2d11231737
feat: replace raw JSON TextInput with ModelBudgetEditor in CreateTeamModal 2026-04-24 18:37:35 -07:00
Ishaan Jaffer
a8bfd352a8
docs: remove budget_duration from team_member_model_max_budget comment (not yet enforced) 2026-04-24 18:37:31 -07:00
Ishaan Jaffer
1a9edf3a6c
fix: check all models in list against per-model budget, not just model[0] 2026-04-24 18:37:28 -07:00
Ishaan Jaffer
138e182459
fix: add team_member_model_list_transactions to DBSpendUpdateTransactions init in redis buffer 2026-04-24 18:25:40 -07:00
Ishaan Jaffer
5f2b88ea5b
schema: add model_spend to root schema.prisma (source of truth for sync check) 2026-04-24 18:25:36 -07:00
Ishaan Jaffer
9cdd4789da
feat: seed per-model spend counter from DB on cache miss to prevent budget bypass after restart 2026-04-24 18:19:44 -07:00
Ishaan Jaffer
5c02d62710
feat: persist per-model team member spend to DB via _commit_team_member_model_spend_to_db 2026-04-24 18:19:40 -07:00
Ishaan Jaffer
aeb0b7cad6
feat: handle TEAM_MEMBER_MODEL entity type in spend update queue aggregation 2026-04-24 18:19:37 -07:00
Ishaan Jaffer
890652e27e
feat: add TEAM_MEMBER_MODEL entity type and team_member_model_list_transactions to spend types 2026-04-24 18:19:35 -07:00
Ishaan Jaffer
da1c05b116
migration: add model_spend JSONB column to LiteLLM_TeamMembership 2026-04-24 18:19:32 -07:00
Ishaan Jaffer
a04ecf221b
schema: add model_spend to LiteLLM_TeamMembership in proxy-extras schema 2026-04-24 18:19:29 -07:00
Ishaan Jaffer
6d9e3e0e8d
schema: add model_spend Json column to LiteLLM_TeamMembership for per-model spend tracking 2026-04-24 18:19:26 -07:00
Ishaan Jaffer
8f1f7eb157
fix: use inspect.signature instead of broad TypeError to detect use_v2_resolver support 2026-04-24 18:19:23 -07:00
Ishaan Jaffer
fe7ca53950
fix: skip model budget rows with null max_budget to avoid silently blocking all traffic 2026-04-24 17:47:41 -07:00
Ishaan Jaffer
39207405d7
docs: add team_member_model_max_budget to new_team and update_team docstrings 2026-04-24 17:47:38 -07:00
Ishaan Jaffer
6725fb957e
fix: black formatting on _types.py 2026-04-24 17:47:35 -07:00
Ishaan Jaffer
17b8749e1a
fix: remove budget_duration from ModelBudgetEditor (not yet enforced) 2026-04-24 17:19:05 -07:00
Ishaan Jaffer
ee3e4f00a3
fix: use model_group not resolved model name for per-model spend counter key 2026-04-24 17:19:05 -07:00
Ishaan Jaffer
f844ff664e
feat: replace JSON textarea with model dropdown editor for team_member_model_max_budget 2026-04-24 17:11:24 -07:00
Ishaan Jaffer
e5c33ca695
feat: show team_member_model_max_budget field in Create Team modal UI
Add 'Default Member Model Budget' input field to the Create Team form in OldTeams.tsx
so admins can set per-model spend limits for team members without expanding the
Additional Settings accordion. Field accepts JSON format and is parsed before submission.
2026-04-24 17:11:24 -07:00
Ishaan Jaffer
4aa097e645
fix: handle older proxy-extras that don't support use_v2_resolver kwarg 2026-04-24 17:11:24 -07:00
Ishaan Jaffer
871786c32c
feat: pass model to increment_spend_counters in cost callback 2026-04-24 17:11:24 -07:00
Ishaan Jaffer
af31004761
feat: track per-model spend in increment_spend_counters 2026-04-24 17:11:24 -07:00
Ishaan Jaffer
000d819620
feat: add _check_team_member_model_budget to common_checks 2026-04-24 17:11:24 -07:00
Ishaan Jaffer
41a9bfc94f
feat: add team_member_model_max_budget field to NewTeamRequest and UpdateTeamRequest 2026-04-24 17:11:24 -07:00
yuneng-jiang
70a986e689
Merge pull request #26457 from BerriAI/litellm_enterpriseLicenseMetadata
[Infra] Declare proprietary license in litellm-enterprise metadata
2026-04-24 16:10:32 -07:00
ryan-crabbe-berri
c91a22a001
Merge pull request #26438 from BerriAI/litellm_fix-jwt-admin-bypass
fix(jwt-auth): apply team TPM/RPM + attribution for admins using x-litellm-team-id
2026-04-24 16:07:50 -07:00
ishaan-berri
7cf6a95b62
fix(vertex passthrough): log :embedContent and :batchEmbedContents responses (#26146)
* fix(vertex passthrough): log :embedContent and :batchEmbedContents responses

* test(vertex passthrough): add unit tests for :embedContent and :batchEmbedContents logging

* fix(vertex passthrough): extract input text from request body for embedContent token counting

* fix(vertex passthrough): add embedContent and batchEmbedContents to TRACKED_VERTEX_ROUTES

* fix(vertex passthrough): detect Google AI Studio URLs in embedContent handler

* test(vertex passthrough): add unit test for Google AI Studio URL embedContent provider detection

* style: black format vertex_passthrough_logging_handler
2026-04-24 16:07:11 -07:00
Yuneng Jiang
5d8ef97fa1
chore(packaging): declare proprietary license in litellm-enterprise metadata
The enterprise package ships under the BerriAI Enterprise License defined
in enterprise/LICENSE.md, which is not an SPDX-listed license. Declare it
via PEP 639's LicenseRef-Proprietary expression so metadata-reading tools
(PyPI classifiers, Nexus IQ, pip-licenses) resolve it instead of reporting
License-None. The existing license-files entry already ships the full terms.
2026-04-24 14:56:28 -07:00
shin-berri
082a8faf46
Merge pull request #26454 from BerriAI/litellm_remove_docs_repo_moved
[Infra] Remove docs/my-website, point contributors to litellm-docs repo
2026-04-24 14:54:35 -07:00
Ryan Crabbe
a0bba43cea
fix(jwt-auth): soft-fail unresolvable x-litellm-team-id for admins
Previously, an admin JWT sending a stale/typo'd/missing x-litellm-team-id
on an LLM API route received a hard 404 from get_team_object, blocking the
request. Restore pre-PR admin behavior: if the header can't be resolved,
skip team attribution and proceed with admin access, logging a warning
with the header value and route so the misconfigured caller is diagnosable.
2026-04-24 14:31:36 -07:00
Yuneng Jiang
d42281338e ci: check out litellm-docs directly into docs/my-website
Replaces the rm-and-symlink hack with a plain actions/checkout
using path: docs/my-website. The previous approach failed on this
branch because docs/my-website no longer exists in the repo (its
parent docs/ directory was also removed), so ln -s had nowhere
to create the symlink.

Also adds the same checkout step to test-unit-documentation.yml,
which was silently relying on docs/my-website existing in-tree
for test_env_keys.py and test_router_settings.py.
2026-04-24 14:21:18 -07:00
Yuneng Jiang
c35f3a50ae docs: remove docs/my-website, point contributors to litellm-docs
The documentation source has moved to a separate repository,
BerriAI/litellm-docs, served at docs.litellm.ai. This PR removes
docs/my-website/ from this repo and updates README.md, AGENTS.md,
and CLAUDE.md to direct doc contributions to the new repo.

Also fixes a broken relative link in
litellm/integrations/levo/README.md.

The existing CI symlink in .github/workflows/test-code-quality.yml
(which clones litellm-docs and symlinks docs/my-website to it for
tests/documentation_tests/*) continues to work without change.
2026-04-24 14:17:46 -07:00
Ryan Crabbe
e1bb542556
chore: fix linting (ruff PLR0915, black) on admin team-header fix
Extract the admin team-header attachment into a helper so
auth_builder stays under the 50-statement lint threshold; apply
black formatting to the two files flagged on the prior commit.
No behavior change.
2026-04-24 13:38:28 -07:00
shin-berri
ca443a957c
Merge pull request #24374 from BerriAI/litellm_staging_03_22_2026
Litellm staging 03 22 2026
2026-04-24 12:38:47 -07:00
yuneng-jiang
9dd7e37530
Merge pull request #25359 from BerriAI/litellm_Sameerlite/openai-chat-to-responses
feat(openai): add route_all_chat_openai_to_responses global flag
2026-04-24 12:06:19 -07:00
yuneng-jiang
09f0a3380f
Merge pull request #26362 from BerriAI/litellm_fix_proxy_test_master_key_leak
[Fix] Tests - Proxy: Isolate master_key/prisma_client module globals between tests
2026-04-24 10:04:09 -07:00
Sameer Kankute
a0c52cda6e
docs(proxy): clarify x-litellm-model-group vs provider model id (#25497)
Made-with: Cursor
2026-04-24 16:59:03 +00:00
yuneng-jiang
8dda834cf9
Merge pull request #25842 from BerriAI/litellm_docs-gemini3-thinking-defaults
docs(gemini): Gemini 3 thinking_level defaults and release note
2026-04-24 09:45:24 -07:00
yuneng-jiang
023dad5bde
Merge pull request #25932 from BerriAI/litellm_docs-code-block-padding-parity
feat(docs): align fenced code block padding on blog and doc pages
2026-04-24 09:45:08 -07:00
yuneng-jiang
61ad127a75
Merge pull request #25935 from BerriAI/litellm_anthropic-stream-strip-gemini-thought-tool-id
fix(anthropic): strip Gemini thought suffix from streaming tool_use id
2026-04-24 09:43:27 -07:00
yuneng-jiang
4e3feda952
Merge pull request #26221 from BerriAI/litellm_responses_strip_custom_tool_call_namespace
feat(responses): strip custom_tool_call namespace for all providers
2026-04-24 09:42:55 -07:00
yuneng-jiang
d73b790cae
Merge pull request #26248 from BerriAI/litellm_anthropic_messages_call_type_fix
fix(proxy): preserve anthropic_messages call type for /v1/messages logging
2026-04-24 09:42:36 -07:00
Ryan Crabbe
6ea95a6379
fix(jwt-auth): apply team TPM/RPM + attribution for admins using x-litellm-team-id
Scope the header-driven team fetch to LLM API routes so admin
management routes keep the pre-existing bypass behavior (no
phantom teams, no 404s on mgmt calls). Team context is threaded
onto UserAPIKeyAuth so spend logs, rate limits, and team_models
attribution are correctly applied when admins act on behalf of
a team via x-litellm-team-id.
2026-04-24 09:40:59 -07:00
Yuneng Jiang
4d5c3476a4
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_docs-gemini3-thinking-defaults 2026-04-24 09:40:04 -07:00
Yuneng Jiang
b2afc70080
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_docs-code-block-padding-parity 2026-04-24 09:39:06 -07:00
yuneng-jiang
78d171b2b9
Merge pull request #26115 from BerriAI/litellm_gpt54_mini_nano_versioned_models
feat(models): add versioned GPT-5.4 mini/nano snapshots
2026-04-24 09:34:55 -07:00
Sameer Kankute
4dbea4e957
fix(responses): enforce spec object on completion bridge (#26327)
Ensure Chat Completions -> Responses bridge always emits object="response" so non-native providers return the same top-level schema as native OpenAI Responses.

Made-with: Cursor
2026-04-24 09:29:06 -07:00
Yuneng Jiang
55ea431c05
Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_gpt54_mini_nano_versioned_models 2026-04-24 09:28:54 -07:00