Commit Graph
1559 Commits
Author SHA1 Message Date
tanjiroandGitHub df2a2fac43 Prevent navigation reset after team member operations (#12424)
* stay on member page when you delete or add a member

* update member fix
2025-07-08 15:07:13 -07:00
Jorge Piedrahita OrtizandGitHub 7fdecffc9f style: update sambanova logos (#12431) 2025-07-08 13:56:50 -07:00
tanjiroandGitHub 3cb45ccb6a Improve Chart Readability for Tags (#12378)
* Enhance chart readability with short-form notation for large numbers (#11571)

* format y-axis value for total tokens

* format y-axis for the rest of the charts on model-activity

* revert changes for requests per day

* labels modified to plain text

* added plain text label for api_requests and spend

* minor

* improve keyname display (#11573)

* fix tags overlap

- no need to fix decimal points for valueFormatterSpend() bcz we're only going to use it for values on the x and y axis of a chart
- show only top 5 values of tags
- format the values on the x-axis

* format spend values to short form

* format spend to short form

* showing top 5 tags data more perceptively

* remove mock data

* remove console.log

* prettier

* prettier + remove unused functions
2025-07-07 23:02:44 -07:00
Ishaan Jaff 779791f7b3 ui new build 2025-07-07 21:13:53 -07:00
Ishaan JaffandGitHub 5cad0dd94b [Feat] Add MCP Cost Tracking (#12385)
* fix MCP_TOOL_NAME_PREFIX

* test_mcp_cost_tracking

* init MCPCostCalculator

* add call_mcp_tool

* calculate_mcp_tool_call_cost

* add MCPServerCostInfo

* add mcp_server_cost_info

* add mcp_server_cost_info

* pass through litellm_logging_obj

* logged_standard_logging_payload

* fix logging MCP tool call

* test_mcp_cost_tracking_per_tool

* fix NewMCPServerRequest

* fix add_update_server

* add MCP info to schema.prisma

* fix create_mcp_server

* working custom cost per call

* fix mcp server cost

* fix MCPCostCalculator

* TestMCPCostCalculator
2025-07-07 21:08:10 -07:00
tanjiroandGitHub 32f3887a01 improve keyname display (#12371) 2025-07-07 12:58:06 -07:00
tanjiroandGitHub 8bb9ea8568 sticky session for test key (#12365) 2025-07-07 10:12:39 -07:00
Krrish Dholakia 0cd4d4f76d build(ui/): new ui build 2025-07-05 20:04:42 -07:00
Krish DholakiaandGitHub dbe37b542d Litellm dev 07 05 2025 p4 (#12350)
* fix(key_management_endpoints.py): add new `/key/service_account/generate` endpoint

enables controlling team member permissions for creating service account keys

* refactor(ui/): use new /key/service-account/generate endpoint when creating keys on UI

enables team member permissions for service accounts

* fix(permission_definitions.tsx): add permission for creating service accounts on UI

* fix(key_management_endpoints.py): ignore user id for service account keys

* fix(key_management_endpoints.py): improve docstring

* docs(service_accounts.md): update docs
2025-07-05 19:38:42 -07:00
Krish DholakiaandGitHub bda9eecd45 Litellm dev 07 05 2025 p3 (#12349)
* refactor(aim.py): refactor to support adding aim guardrails on UI

* fix(base.py): add ui_friendly_name to config model

* feat(ui/): support loading new guardrails from backend api call

removes need to onboard each guardrail to ui

* fix: don't show optional params if not set and don't show ui_friendly_name (internal param0

* fix(ui/add_guardrail_form.tsx): ensure dynamic provider value is used

* fix(ui/): just one-time update the provider map dictionary

* fix(ui/): show masked api base / api key on guardrail update

* refactor(aporia_ai/): refactor to show on UI

* feat(aporia_ai/): add aporia ai guardrail to UI

* refactor(guardrails_ai/): refactor to add via UI

* refactor(lasso.py): refactor to enable adding lasso guardrails via UI

* feat(pangea.py): add pangea guardrail on UI

* feat(panw): add panw prisma airs through UI

* test: update tests

* fix: fix ruff linting error

* test: update tests

* fix: add missing docs

* fix: fix guardrail init

* fix: suppress linting errors

* fix(proxy_server.py): fix linting error
2025-07-05 18:44:00 -07:00
Ishaan Jaff 2812ffc0c8 mcp - fix specific MCP server 2025-07-05 15:51:26 -07:00
Ishaan JaffandGitHub ca4d886cd0 [UI QA] 1.74.0.rc (#12348)
* fix alignment

* fix msg

* ui qa  - use correct input type

* fix logo

* fix

* fix preview

* add PremiumLoggingSettingsProps

* fix duration

* fix img

* fix img

* ui new build
2025-07-05 15:47:20 -07:00
Krish DholakiaandGitHub e7f1fa26ab UI - Azure Content Guardrails (#12341)
* build(model_prices_and_context_window.json): remove 'supports_tool_choice' for specific mistral models

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

* feat: initial commit adding cleaner ui for azure text moderation guardrails

* feat(guardrail_endpoints.py): add discoverable guardrail configs and improve converting base model to dict with types

* fix(guardrail_provider_fields.tsx): render from api endpoint correctly

* fix(guardrail_provider_fields.tsx): cleanup

* refactor(guardrail_endpoints.py): refactor to handle dictionaries with literal - allows multiselect

* feat(ui/): render dictionary with known keys correctly

* feat(ui/): render optional params on separate page

* style(ui/): style improvements to rendering optional params on the UI

* feat(azure/prompt_shield.py): add azure prompt shield back on UI

* fix(add_guardrail_form.tsx): fix form to handle updated api

* fix(guardrail_optional_params.tsx): ensure values are nested correctly for writing to api

* fix: fix linting error

* feat(text_moderation.py): handle str to int conversion

* fix(guardrail_info.tsx): only render pii settings if guardrail is presidio

* fix(guardrail_info.tsx): add guardrail specific fields to update settings

allows updating guardrail fields (e.g. severity threshold) post-create

* fix(guardrail_endpoints.py): set guardrail_id in guardrail object

ensures duplicate objects not created on guardrail update

* fix(guardrail_endpoints.py): allow provider specific fields to be updated on patch update

* refactor(guardrail_endpoints.py): remove duplicate info endpoint

* fix(guardrail_endpoints.py): mask sensitive keys on returning via guardrail `/info`

Prevent leaking keys

* fix(guardrail_optional_params.tsx): return numerical input when numerical component used

fixes issue where output was a str

* fix(guardrail_optional_params.tsx): render dict keys correctly

* fix(text_moderation.py): fix severity by category check

* fix(proxy/utils.py): check if guardrail should run for post call streaming hook

Prevents invalid guardrails from running if not requested

* test: fix import

* fix: fix linting error

* test: update test

* fix: fix tests

* fix: fix code qa errors

* fix(guardrail_endpoints.py): set max depth for function

* test: update recursive_detector.py

* test: update list

* build: merge main

* fix: fix ruff check errors
2025-07-05 10:19:29 -07:00
+1 df47008818 UI - Add Azure Content Safety Guardrails (improved UX) (#12330)
* build(model_prices_and_context_window.json): remove 'supports_tool_choice' for specific mistral models

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

* feat: initial commit adding cleaner ui for azure text moderation guardrails

* feat(guardrail_endpoints.py): add discoverable guardrail configs and improve converting base model to dict with types

* fix(guardrail_provider_fields.tsx): render from api endpoint correctly

* fix(guardrail_provider_fields.tsx): cleanup

* refactor(guardrail_endpoints.py): refactor to handle dictionaries with literal - allows multiselect

* feat(ui/): render dictionary with known keys correctly

* feat(ui/): render optional params on separate page

* style(ui/): style improvements to rendering optional params on the UI

* feat(azure/prompt_shield.py): add azure prompt shield back on UI

* fix(add_guardrail_form.tsx): fix form to handle updated api

* fix(guardrail_optional_params.tsx): ensure values are nested correctly for writing to api

* fix: fix linting error

* test: update tests

* fix mapped tests (#12320)

* fix - use flush llm client cache

* faster mapped tests

* test_async_multiple_response_ids_routing

* fix tests

* test_ateam_member_update_admin_requires_premium

* regular mapped tests

* Revert "Fix: Initialize JSON logging for all loggers when JSON_LOGS=True (#12206)"

This reverts commit 2c60c316ec.

* reset num workers

* check_for_litellm_module_deletion

* add test

* add code_qa_check_tests

* ci/cd new release

* docs(opentelemetry_integration.md): add otel debug flag to docs

help people debug their traces easily

* [Feat] Add failure logging support for s3 logger (#12299)

* add async_log_failure_event

* test_basic_s3_v2_logging_failure

* Comma separated spend and budget (#12317)

* all_keys_table, key_info_view, organizations

* teams

* the whole usage page

* teams page

* users table

* user info

* more commas

* some more commas

* Segregate MCP tools on connections using headers (#12296)

* Add get tools segregation

* add ui changes (#12302)

* resolve comments

* add mapped tests

* remove advanced settings (#12323)

* [Bug Fix] /generateContent API - Only pass supported params when using OpenAI models (#12297)

* fix - only pass GenericLiteLLMParams

* test_google_generate_content_with_openai

* Fix: Fix custom ca bundle support in aiohttp transport (#12281)

* Unify usage of get_ssl_configuration

* Fix doc

* [Feat] Add github co-pilot as a new LLM API provider (#12325)

* Litellm dev 03 05 2025 contributor prs (#9079)

* feat: add support for copilot provider

* test: add tests for github copilot

* chore: clean up github copilot authenticator

* test: add test for github copilot authenticator

* test: add test for github copilot for sonnet 3.7 thought model

* Fix #7629 - Add tzdata package to Dockerfile (#8915)

* Add tzdata package to Dockerfile

* Move tzdata to python requirement.txt

* feat: add support for copilot provider (#8577)

* feat: add support for copilot provider

* test: add tests for github copilot

* chore: clean up github copilot authenticator

* test: add test for github copilot authenticator

* test: add test for github copilot for sonnet 3.7 thought model

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>

* feat: add model information for copilot models

* fix: fix linting errors

* test: remove integration test for github_copilot + fix misisng mock

* fix: use print to make sure the logger message shown

* test: remove debug print

* fix lint (#11112)

* Add init files to make test directories Python packages and update import paths in test_token_counter.py (#11119)

* Update litellm/model_prices_and_context_window_backup.json

Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>

---------

Co-authored-by: Son H. Nguyen <nhs.000.dev@gmail.com>
Co-authored-by: subnet.dev <50828879+subnet-dev@users.noreply.github.com>
Co-authored-by: Son H. Nguyen <33925625+nhs000@users.noreply.github.com>
Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>

* refactor github copilot

* test_github_copilot_transformation.py

* test_github_copilot_authenticator.py

* add GitHub Copilot

* fix order

* doc fix

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Son H. Nguyen <nhs.000.dev@gmail.com>
Co-authored-by: subnet.dev <50828879+subnet-dev@users.noreply.github.com>
Co-authored-by: Son H. Nguyen <33925625+nhs000@users.noreply.github.com>
Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>

* add new env vars to docs

* ssl_cert_error (#12327)

* feat - add new banner on startup (#12328)

* [Security Bug Fix] Ensure only LLM API route fails get logged on Langfuse (and other loggers) (#12308)

* _is_proxy_only_llm_api_error

* test_proxy_only_error_true_for_llm_route

* add not on change

* Update tests/test_litellm/proxy/test_proxy_utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add test_post_call_failure_hook_auth_error_key_info_route

* test fix _is_proxy_only_llm_api_error

* test_chat_completion_request_with_redaction

* test_post_call_failure_hook_auth_error_llm_api_route

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Ensure message redaction works for responses API logging (#12291)

* add fixes to choice implementation redaction

* add isInstance check on responses API

* change datadog to revert back

* change datadog to revert back

* fix type errors

* Redaction test changes

* Redaction test changes

* Redaction test changes - remove changes

* [Feat] UI - Allow Viewing/Editing Team Based Callbacks (#12329)

* add logging settings view on UI

* fix change ordering

* fix type error

* test fix - import loc

* [Feat] QA -  Arize Team based logging (#12331)

* add _get_tracer_with_dynamic_headers

* fix construct_dynamic_arize_headers

* [Feat] UI - Allow Viewing/Editing Team Based Callbacks (#12329)

* add logging settings view on UI

* fix change ordering

* add construct_dynamic_otel_headers for arize

* refactor common code

* test_construct_dynamic_arize_headers

* otel unit tests

* test_arize_dynamic_params

* test_arize_dynamic_headers_in_grpc_requests

* [Feat] UI - Allow setting Logging Callback Setting per Key (#12333)

* allow adding logging settings on a key

* add ability to edit key logging settings

* dont leak api keys on ui

* fix order

* add langsmith settings

* ui new build

* test_default_api_base

* fix new utils tests

* bump: version 1.73.7 → 1.74.0

* Add mcp server segregation comma separated support (#12326)

* add mcp comma separated support

* dont support legacy json array

* lint

* add live tail state to session storage (#12335)

* add aiml

* fix: fix unused imports

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: tanjiro <56165694+NANDINI-star@users.noreply.github.com>
Co-authored-by: Jugal D. Bhatt <55304795+jugaldb@users.noreply.github.com>
Co-authored-by: Joost van Doorn <joost.van.doorn@gmail.com>
Co-authored-by: Son H. Nguyen <nhs.000.dev@gmail.com>
Co-authored-by: subnet.dev <50828879+subnet-dev@users.noreply.github.com>
Co-authored-by: Son H. Nguyen <33925625+nhs000@users.noreply.github.com>
Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-05 09:24:54 -07:00
tanjiroandGitHub d5a1785f0a add live tail state to session storage (#12335) 2025-07-05 00:41:08 -07:00
Jugal D. BhattandGitHub 529f67f544 Add mcp server segregation comma separated support (#12326)
* add mcp comma separated support

* dont support legacy json array

* lint
2025-07-05 00:08:43 -07:00
Ishaan Jaff c615b60121 ui new build 2025-07-04 18:24:42 -07:00
Ishaan JaffandGitHub 31198e0ab9 [Feat] UI - Allow setting Logging Callback Setting per Key (#12333)
* allow adding logging settings on a key

* add ability to edit key logging settings

* dont leak api keys on ui

* fix order

* add langsmith settings
2025-07-04 18:19:22 -07:00
Ishaan JaffandGitHub 78ee153545 [Feat] UI - Allow Viewing/Editing Team Based Callbacks (#12329)
* add logging settings view on UI

* fix change ordering
2025-07-04 16:14:46 -07:00
Jugal D. BhattandGitHub 62946e58d2 Segregate MCP tools on connections using headers (#12296)
* Add get tools segregation

* add ui changes (#12302)

* resolve comments

* add mapped tests

* remove advanced settings (#12323)
2025-07-04 11:45:51 -07:00
tanjiroandGitHub 8bf94b9090 Comma separated spend and budget (#12317)
* all_keys_table, key_info_view, organizations

* teams

* the whole usage page

* teams page

* users table

* user info

* more commas

* some more commas
2025-07-04 11:14:39 -07:00
Krish DholakiaandGitHub 3362503927 fix(guardrails): add azure content safety guardrails to the UI (#12309) 2025-07-03 21:35:20 -07:00
tanjiroandGitHub 6bf1073e1c Correctly display 'Internal Viewer' user role (#12284)
* add "internal_user_viewer" as a user role value type

* cleanup console.log

* remove unused imports

* prettier

* comment
2025-07-03 09:57:49 -07:00
Ishaan Jaff f1777dbe3d ui new build 2025-07-02 20:50:08 -07:00
Ishaan Jaff 03790cfc2d fix lint 2025-07-02 20:42:10 -07:00
Ishaan JaffandGitHub 98d535deaa qa - ui (#12265) 2025-07-02 20:30:14 -07:00
Ishaan JaffandGitHub 77741b7684 [Feat] UI - Allow adding team specific logging callbacks (#12261)
* add arize logo

* use correct struct

* define dynamic params

* add arize_space_id

* update ui

* ui - team logging
2025-07-02 16:35:22 -07:00
Jugal D. BhattandGitHub d55712b783 Add MCP url masking on frontend (#12247)
* add url masking on frontend

* fix test

* add signature
2025-07-02 16:32:26 -07:00
tanjiroandGitHub bbc1467d23 Add logos to callback list (#12244)
* add logos to callback list

* added logos

* minor

* cleanup console.log + remove unused functions + prettier

* more cleanup

* fix braintrust logo

* minor
2025-07-02 09:55:55 -07:00
Jugal Bhatt 27e6ef5f39 added error handling for MCP tools not found 2025-07-01 17:12:01 -07:00
Jugal Bhatt e2cb701fd9 added changes to mcp url wrapping
add mcp server url wrapping

Add mcp url wrapping
2025-07-01 11:10:45 -07:00
Krish DholakiaandGitHub cec7e4941a UI QA Fixes - prevent team model reset on model add + return team-only models on /v2/model/info + render team member budget correctly (#12144)
* fix(team_endpoints.py): prevent overwriting current list of team models on new model add

* fix(networking.tsx): fix default proxy base url

* fix(proxy_server.py): include team only models when retrieving all deployments on `/v2/model/info` helper util

ensures team only models are shown to user

* fix(router.py): check model name by team public model name when team id given

Fixes issue where team member could not see team only models when clicking into that team on `Models + Endpoints`

* fix(team_member_view.tsx): fix rendering team member budget, when budget is set

* test: update tests

* test: update unit test
2025-06-28 22:04:49 -07:00
tanjiroandGitHub edc84b6b6d Update conditional_public_model_name.tsx (#11713) 2025-06-28 08:06:01 -07:00
tanjiroandGitHub 0ba4dde659 create a set for unique options (#12074) 2025-06-27 21:31:05 -07:00
tanjiroandGitHub db2a55a3d2 Add "Get Code" Feature (#11629)
* added get code

* modify template

* fixed code template

* put the codesnippets in a different file

* minor
2025-06-27 18:18:56 -07:00
Ishaan Jaff c76f9be729 ui - new build 2025-06-27 18:00:59 -07:00
Ishaan JaffandGitHub ebf6395bc1 [Feat] Add Eleven Labs - Speech To Text Support on LiteLLM (#12119)
* add ELEVENLABS as a provider

* add deepgram to main.py

* add ElevenLabsException

* add ElevenLabsAudioTranscriptionConfig

* add transform_audio_transcription_response

* TestElevenLabsAudioTranscription

* add elevenlabs/scribe_v1 to model cost map

* add ElevenLabsAudioTranscriptionConfig

* add AudioTranscriptionRequestData

* add ElevenLabs transform

* use AudioTranscriptionRequestData

* refactoring fixes

* add ProcessedAudioFile util for reading audio files

* test_elevenlabs_diarize_parameter_passthrough

* docs eleven labs

* docs fixes

* fix code qa checks

* fixes - audio transcription

* ui - add ElevenLabs logo

* add elevenlabs logo

* docs - ElevenLabs

* test fix elevenlabs
2025-06-27 17:50:49 -07:00
Cole McIntosh 8f376a60fa fix(ui): fix Today filter not showing usage data in dashboard
- Fix date formatting in API calls from ISO format to YYYY-MM-DD
- Update userDailyActivityCall, teamDailyActivityCall, and tagDailyActivityCall
- Prevent date mutation by creating new Date objects before API calls
- Set proper time boundaries (00:00:00 to 23:59:59) for same-day selections

The API expects dates in YYYY-MM-DD format but the UI was sending
full ISO timestamps, causing the Today filter to return empty results.
2025-06-26 13:59:40 -06:00
Cole McIntoshandGitHub 92948b33b1 Merge branch 'BerriAI:main' into fix-today-selector-date-mutation-bug 2025-06-26 12:29:44 -06:00
Cole McIntosh cdf95f5f2c Enhance UsageDatePicker component by adding time range display and improving timezone handling for date selections. Default time range visibility is set to true, ensuring better user experience in usage dashboards. 2025-06-25 11:28:35 -06:00
Cole McIntosh 102680d0ed Refactor date handling in ModelDashboard to use startTime and endTime directly, improving clarity and consistency in metric data retrieval. 2025-06-25 11:28:24 -06:00
Cole McIntosh 3f644602fb Refactor date range selection in dashboards to use UsageDatePicker component, simplifying date handling logic and improving consistency across components. 2025-06-25 11:16:01 -06:00
Cole McIntosh 52e51ead03 Add UsageDatePicker component for usage dashboards 2025-06-25 11:14:48 -06:00
tanjiroandGitHub 2a6dab0d23 aggregate the data across all pages (#12033) 2025-06-25 09:54:41 -07:00
Cole McIntoshandGitHub 445227371a Merge branch 'BerriAI:main' into fix-today-selector-date-mutation-bug 2025-06-25 10:51:53 -06:00
Krish DholakiaandGitHub ac15ca3014 Teams - Support default key expiry + UI - support enforcing access for members of specific SSO Group (#12023)
* fix(team_endpoints.py): support setting default key expiry

allows admin to set key expiry on all team member keys

makes it easier to setup default team for experimentation

* feat(key_management_endpoints.py): allows admin to set duration for keys created by team members

* feat(team_endpoints.py): support team_member_key_duration on `/team/update`

allows setting max time team member keys are valid for

* fix(team_info.tsx): ui component to update team member key duration

* fix(team_info.tsx): support updating team member key duration, if set

* feat(teams.tsx): add team member key duration param ui component

allow admin to set this on UI

* feat(ui_sso.py): support restricting ui access by sso group

allows controlling who can/can't access the UI

* feat(ssomodals.tsx): add initial commit adding sso group access to admin ui

* feat(proxy_server.py): support reading + writing ui_access_mode from db

allows admin to configure allowed sso groups from UI

* feat(ui_sso.py): support enforcing all teams on sso jwt handler

if ui access mode set via ui, support reading the value and enforcing it

* feat(ui/): ui component for controlling sso access group

allow admin to only allow users within specific sso group to log into UI

* fix(uiaccesscontrolform.tsx): fix field names

* feat(ui_sso.py): return received sso response in the clientside error message - enables easier debugging

* test: add unit tests

* fix: minor fixes
2025-06-24 21:58:07 -07:00
Cole McIntosh ca96e39229 Update package-lock.json to include @anthropic-ai/sdk version 0.54.0 2025-06-24 14:29:14 -06:00
Cole McIntosh c42a876735 Fix date mutation bug causing 'Today' selector to return no data
- Create new Date objects instead of mutating original DateRangePicker dates
- Fixes issue where first API call would mutate dateValue.from/to causing
  subsequent calls to use corrupted date ranges
- Updated usage.tsx, cache_dashboard.tsx, and model_dashboard.tsx
- Minimal change preserving original timezone logic
2025-06-24 14:28:52 -06:00
Ishaan Jaff 321fc09b3e ui fix linting errors 2025-06-23 18:43:56 -07:00
Ishaan Jaff 77813ebdf8 ui - fix linting error 2025-06-23 18:18:36 -07:00