Commit graph

1266 commits

Author SHA1 Message Date
Krish Dholakia
c8aa876785
fix(proxy_server.py): fix get model info when litellm_model_id is set + move model analytics to free (#7886)
* fix(proxy_server.py): fix get model info when litellm_model_id is set

Fixes https://github.com/BerriAI/litellm/issues/7873

* test(test_models.py): add test to ensure get model info on specific deployment has same value as all model info

Fixes https://github.com/BerriAI/litellm/issues/7873

* fix(usage.tsx): make model analytics free

Fixes @iqballx's feedback

* fix(fix(invoke_handler.py):-fix-bedrock-error-chunk-parsing): return correct bedrock status code and error message if chunk in stream

Improves bedrock stream error handling

* fix(proxy_server.py): fix linting errors

* test(test_auth_checks.py): remove redundant test

* fix(proxy_server.py): fix linting errors

* test: fix flaky test

* test: fix test
2025-01-21 08:19:07 -08:00
Krish Dholakia
dca6904937
JWT Auth - enforce_rbac support + UI team view, spend calc fix (#7863)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 12s
* fix(user_dashboard.tsx): fix spend calculation when team selected

sum all team keys, not user keys

* docs(admin_ui_sso.md): fix docs tabbing

* feat(user_api_key_auth.py): introduce new 'enforce_rbac' param on jwt auth

allows proxy admin to prevent any unmapped yet authenticated jwt tokens from calling proxy

Fixes https://github.com/BerriAI/litellm/issues/6793

* test: more unit testing + refactoring

* fix: fix returning id when obj not found in db

* fix(user_api_key_auth.py): add end user id tracking from jwt auth

* docs(token_auth.md): add doc on rbac with JWTs

* fix: fix unused params

* test: remove old test
2025-01-19 21:28:55 -08:00
Ishaan Jaff
7b8fb990db ui new build 2025-01-18 12:56:31 -08:00
Ishaan Jaff
fd5cd422f0
Revert "Remove UI build output" (#7861) 2025-01-18 12:54:25 -08:00
Ishaan Jaff
f6a0bc8bdb
(UI Logs) - add pagination + filtering by key name/team name (#7860)
* fix remove emoji on logs page

* fix title of page

* ui - get countryIP

* ui lookup

* ui - get country from ip address

* show team and key alias on root

* working team / key filter

* working filters

* ui filtering by key / team alias

* simple search

* fix add pagination on view logs page

* add start / end time filters

* add custom time filter
2025-01-18 12:47:01 -08:00
Ishaan Jaff
f60756c815
(UI - View Logs Table) - Show country of origin for logs (#7856)
* fix remove emoji on logs page

* fix title of page

* ui - get countryIP

* ui lookup

* ui - get country from ip address
2025-01-18 12:44:26 -08:00
Krish Dholakia
5d065c2c35
fix(admins.tsx): fix logic for getting base url and create common get base url component (#7854)
Resolves https://github.com/BerriAI/litellm/issues/7761
2025-01-18 08:07:39 -08:00
yujonglee
f4803f63dc
refactor (#7851) 2025-01-18 07:25:41 -08:00
yujonglee
0aa8e4a703 fix 2025-01-18 22:13:07 +09:00
yujonglee
eb91ceb8d5 remore ui build 2025-01-18 16:55:45 +09:00
Ishaan Jaff
2f6829fd2a ui - new build 2025-01-17 20:07:06 -08:00
Ishaan Jaff
b701fe1f5e view logs 2025-01-17 20:05:25 -08:00
Ishaan Jaff
69d876f4c7 ui new build 2025-01-17 19:23:41 -08:00
Ishaan Jaff
f54e662c57 rename ui tab to ExperimentOutlined 2025-01-17 19:22:32 -08:00
Ishaan Jaff
6d1a5a0e5d ui new build 2025-01-17 19:14:44 -08:00
Ishaan Jaff
d3c2f4331a
(UI - View SpendLogs Table) (#7842)
* litellm log messages / responses

* add messages/response to schema.prisma

* add support for logging messages / responses in DB

* test_spend_logs_payload_with_prompts_enabled

* _get_messages_for_spend_logs_payload

* ui_view_spend_logs endpoint

* add tanstack and moment

* add uiSpendLogsCall

* ui view logs table

* ui view spendLogs table

* ui_view_spend_logs

* fix code quality

* test_spend_logs_payload_with_prompts_enabled

* _get_messages_for_spend_logs_payload

* test_spend_logs_payload_with_prompts_enabled

* test_spend_logs_payload_with_prompts_enabled

* ui view spend logs

* minor ui fix

* ui - update leftnav

* ui - clean up ui

* fix leftnav

* ui fix navbar

* ui fix moving chat ui tab
2025-01-17 18:53:45 -08:00
yujonglee
503b38e609
Fix wrong URL for internal user invitation (#7762)
* format

* done
2025-01-15 15:10:32 -08:00
yujonglee
01357add4d
fix confusing save button label (#7778) 2025-01-15 13:51:07 -08:00
yujonglee
293bb4c522
fix (#7769) 2025-01-14 14:31:44 -08:00
Krish Dholakia
5e537fbdb1
fix(model_hub.tsx): clarify cost in model hub is per 1m tokens (#7687)
* fix(model_hub.tsx): clarify cost in model hub is per 1m tokens

* docs: test blog

* docs: improve release note docs

* docs(docs/): new stable release doc

* docs(docs/): specify date in all posts

* docs(docs/): add git diff to stable release docs
2025-01-11 09:57:09 -08:00
Krish Dholakia
599730960a
build: new ui build (#7685) 2025-01-10 22:12:17 -08:00
Krish Dholakia
c4780479a9
Litellm dev 01 10 2025 p2 (#7679)
* test(test_basic_python_version.py): assert all optional dependencies are marked as extras on poetry

Fixes https://github.com/BerriAI/litellm/issues/7677

* docs(secret.md): clarify 'read_and_write' secret manager usage on aws

* docs(secret.md): fix doc

* build(ui/teams.tsx): add edit/delete button for updating user / team membership on ui

allows updating user role to admin on ui

* build(ui/teams.tsx): display edit member component on ui, when edit button on member clicked

* feat(team_endpoints.py): support updating team member role to admin via api endpoints

allows team member to become admin post-add

* build(ui/user_dashboard.tsx): if team admin - show all team keys

Fixes https://github.com/BerriAI/litellm/issues/7650

* test(config.yml): add tomli to ci/cd

* test: don't call python_basic_testing in local testing (covered by python 3.13 testing)
2025-01-10 21:50:53 -08:00
Krrish Dholakia
3e3c78a200 build(ui/): update ui build 2025-01-09 22:44:05 -08:00
Krish Dholakia
63926f484c
feat(ui_sso.py): Allows users to use test key pane, and have team budget limits be enforced for their use-case (#7666) 2025-01-09 22:12:45 -08:00
Krish Dholakia
907bcd3a62
Litellm dev 01 08 2025 p1 (#7640)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 36s
* feat(ui_sso.py): support reading team ids from sso token

* feat(ui_sso.py): working upsert sso user teams membership in litellm - if team exists

Adds user to relevant teams, if user is part of teams and team exists on litellm

* fix(ui_sso.py): safely handle add team member task

* build(ui/): support setting team id when creating team on UI

* build(ui/): teams.tsx

allow setting team id on ui

* build(circle_ci/requirements.txt): add fastapi-sso to ci/cd testing

* fix: fix linting errors
2025-01-08 22:08:20 -08:00
Krish Dholakia
1e3370f3cb
LiteLLM Minor Fixes & Improvements (01/08/2025) - p2 (#7643)
* fix(streaming_chunk_builder_utils.py): add test for groq tool calling + streaming + combine chunks

Addresses https://github.com/BerriAI/litellm/issues/7621

* fix(streaming_utils.py): fix modelresponseiterator for openai like chunk parser

ensures chunk parser uses the correct tool call id when translating the chunk

 Fixes https://github.com/BerriAI/litellm/issues/7621

* build(model_hub.tsx): display cost pricing on model hub

* build(model_hub.tsx): show cost per token pricing + complete model information

* fix(types/utils.py): fix usage object handling
2025-01-08 19:45:19 -08:00
Krish Dholakia
4af23353d6
Allow assigning teams to org on UI + OpenAI omni-moderation cost model tracking (#7566)
* feat(cost_calculator.py): add cost tracking ($0) for openai moderations endpoint

removes sentry cost tracking errors caused by this

* build(teams.tsx): allow assigning teams to orgs
2025-01-08 16:58:21 -08:00
Krish Dholakia
0ffc5379ea
Litellm dev 01 07 2025 p2 (#7622)
* build(ui/): update ui

* fix: drop unsupported non-whitespace characters for real when calling… (#7484)

* fix: drop unsupported non-whitespace characters for real when calling anthropic with stop sequences

* test: add parameterized test for _map_stop_sequences method in AnthropicConfig

---------

Co-authored-by: Wolfram Ravenwolf <52386626+WolframRavenwolf@users.noreply.github.com>
2025-01-08 16:56:39 -08:00
Krrish Dholakia
0d366c58a1 build(ui/): build new ui 2025-01-04 20:03:57 -08:00
Krish Dholakia
f1540ceeab
Create and view organizations + assign org admins on the Proxy UI (#7557)
* feat: initial commit for new 'organizations' tab on ui

* build(ui/): create generic card for rendering complete org data table

can be reused in teams as well

simplifies things

* build(ui/): display created orgs on ui

* build(ui/): support adding orgs via UI

* build(ui/): add org in selection dropdown

* build(organizations.tsx): allow assigning org admins

* build(ui/): show org members on ui

* build(ui/): cleanup + show actual models on org dropdown

* build(ui/): explain user roles within organization
2025-01-04 17:31:24 -08:00
Ishaan Jaff
5c1e8b60d4 ui new build 2024-12-28 18:14:36 -08:00
Ishaan Jaff
978fc0e7a8
(Admin UI - 2) UI chat should render the output in markdown (#7460)
* chat ui improvement

* ui - handle md text
2024-12-28 16:47:08 -08:00
Ishaan Jaff
65bf83b163
chat ui improvement (#7459) 2024-12-28 16:39:31 -08:00
Krish Dholakia
0924df4971
Litellm dev 12 27 2024 p2 1 (#7449)
* fix(azure_ai/transformation.py): route ai.services.azure calls to the azure provider route

requires token to be passed in as 'api-key'

Closes https://github.com/BerriAI/litellm/issues/7275

* fix(key_management_endpoints.py): enforce user is member of team, if team_id set and team_id exists in team table

* fix(key_management_endpoints.py): handle assigned_user_id = none

* feat(create_key_button.tsx): allow assigning keys to other users

allows proxy admin to easily assign other people keys

* build(create_key_button.tsx): fix error message display

don't swallow the error message for key creation failure

* build(create_key_button.tsx): allow proxy admin to edit team id

* build(create_key_button.tsx): allow proxy admin to assign keys to other users

* build(edit_user.tsx): clarify how 'user budgets' are applied

* test: remove dup test

* fix(key_management_endpoints.py): don't raise error if team not in db

'

* test: fix test
2024-12-27 20:02:32 -08:00
Krish Dholakia
d88de268dd
Litellm dev 12 26 2024 p4 (#7439)
* fix(model_dashboard.tsx): support setting model_info params - e.g. mode on ui

Closes https://github.com/BerriAI/litellm/issues/5270

* fix(lowest_tpm_rpm_v2.py): deployment rpm over limit check

fixes selection error when getting potential deployments below known tpm/rpm limit

 Fixes https://github.com/BerriAI/litellm/issues/7395

* fix(test_tpm_rpm_routing_v2.py): add unit test for https://github.com/BerriAI/litellm/issues/7395

* fix(lowest_tpm_rpm_v2.py): fix tpm key name in dict post rpm update

* test: rename test to run earlier

* test: skip flaky test
2024-12-27 12:01:42 -08:00
Ishaan Jaff
fbe7ba4ce6
ui - bump sec issues (#7418)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 1m16s
2024-12-25 16:12:58 -08:00
Ishaan Jaff
d883241b36
cleanup ui folder (#7363)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
2024-12-23 15:18:41 -08:00
Ishaan Jaff
2545e84c77 ui - new build 2024-12-21 15:01:17 -08:00
Ishaan Jaff
237b6ba635
(Admin UI) - maintain history on chat UI (#7351)
* ui fix - allow searching model list + fix bug on filtering

* qa fix - use correct provider name for azure_text

* ui wrap content onto next line

* ui fix - allow selecting current UI session when logging in

* ui session budgets

* ui show provider models on wildcard models

* test provider name appears in model list

* ui fix auto scroll on chat ui tab

* ui - maintain chat history
2024-12-21 14:25:35 -08:00
Ishaan Jaff
56d9427fdb
(Admin UI) correctly render provider name in /models with wildcard routing (#7349)
* ui fix - allow searching model list + fix bug on filtering

* qa fix - use correct provider name for azure_text

* ui wrap content onto next line

* ui fix - allow selecting current UI session when logging in

* ui session budgets

* ui show provider models on wildcard models

* test provider name appears in model list

* ui fix auto scroll on chat ui tab
2024-12-21 14:19:12 -08:00
Ishaan Jaff
ce41cd977c
(Admin UI) - Test Key Tab - Allow using UI Session instead of manually creating a virtual key (#7348)
* ui fix - allow searching model list + fix bug on filtering

* qa fix - use correct provider name for azure_text

* ui wrap content onto next line

* ui fix - allow selecting current UI session when logging in

* ui session budgets
2024-12-21 13:14:15 -08:00
Ishaan Jaff
b52783445e
(Admin UI) - Test Key Tab - Allow typing in model name + Add wrapping for text response (#7347)
* ui fix - allow searching model list + fix bug on filtering

* qa fix - use correct provider name for azure_text

* ui wrap content onto next line
2024-12-21 13:14:01 -08:00
Ishaan Jaff
c7f14e936a
(code quality) run ruff rule to ban unused imports (#7313)
* remove unused imports

* fix AmazonConverseConfig

* fix test

* fix import

* ruff check fixes

* test fixes

* fix testing

* fix imports
2024-12-19 12:33:42 -08:00
Ishaan Jaff
7b7023789d ui new build 2024-12-14 17:15:31 -08:00
Ishaan Jaff
222dad27d7
ui fix tags getting proxy settings (#7234) 2024-12-14 15:33:03 -08:00
Ishaan Jaff
52cad4b3f2 ui new build 2024-12-14 14:16:15 -08:00
Ishaan Jaff
63556b9061
(UI) Fix Usage Tab - Don't make expensive UI queries after SpendLogs crosses 1M Rows (#7229)
* ui - fix viewing usage tab when 1M rows

* fix don't fetch tagSpend data if DISABLE_EXPENSIVE_DB_QUERIES is True
2024-12-14 14:14:34 -08:00
Ishaan Jaff
981efffa3b ui fix key table 2024-12-14 14:12:39 -08:00
Ishaan Jaff
145aa8854f ui - new build 2024-12-14 12:13:49 -08:00
dependabot[bot]
9004bd4635
build(deps): bump nanoid from 3.3.7 to 3.3.8 in /ui/litellm-dashboard (#7216)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-13 19:16:05 -08:00