Commit Graph

23176 Commits

Author SHA1 Message Date
tanjiro 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
Jugal D. Bhatt debea99414 change correct separator (#12430) 2025-07-08 14:27:24 -07:00
Jorge Piedrahita Ortiz 7fdecffc9f style: update sambanova logos (#12431) 2025-07-08 13:56:50 -07:00
Krrish Dholakia 9fa9d547c0 docs(index.md): document known issues 2025-07-08 10:39:51 -07:00
Juan Carlos Moreno 1f869f073d [fix] Error handling MCP request: Task group is not initialized (#12411)
```bash
LiteLLM:ERROR: server.py:370 - Error handling MCP request: Task group is not initialized. Make sure to use run().
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/litellm/proxy/_experimental/mcp_server/server.py", line 368, in handle_streamable_http_mcp
    await session_manager.handle_request(scope, receive, send)
  File "/usr/lib/python3.13/site-packages/mcp/server/streamable_http_manager.py", line 137, in handle_request
    raise RuntimeError("Task group is not initialized. Make sure to use run().")
RuntimeError: Task group is not initialized. Make sure to use run().
```

The use of asyncio.create_task with an infinite loop is not ideal for integration with FastAPI's lifespan events. Now correctly handles this by manually invoking the __aenter__ and __aexit__ methods of the session managers' async context managers within the application's lifespan.
2025-07-08 09:08:37 -07:00
Joel Martin 559d06a55c Fix API base url for Github Copilot provider (#12418) 2025-07-08 09:07:08 -07:00
tanjiro 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 028461a84d bump proxy extras 2025-07-07 21:48:11 -07:00
Krish Dholakia b08ea835c4 fix(model_management_endpoints.py): add audit logs on model update (#12396)
ensure model updates are tracked
2025-07-07 21:43:34 -07:00
Krish Dholakia 76c9df1f91 Add 'thinking blocks' to stream chunk builder + remove experimental 'by_tag' metrics on prometheus (fix cardinality issue) (#12395)
* feat(stream_chunk_builder_utils.py): combine thinking blocks in stream chunk builder

* fix(prometheus.py): remove experimental 'by_tag' metrics

Fixes LIT-225
2025-07-07 21:41:44 -07:00
Ishaan Jaff 9bbacf77e8 ci/cd new release 2025-07-07 21:26:19 -07:00
Ishaan Jaff 642038298a migration - add mcp_info 2025-07-07 21:25:47 -07:00
Ryan Castner 1ef077caa5 feat: add image support for Responses API to Chat Completion transformation (#12204)
* Add _transform_input_image_item_to_image_item() to handle image transformations
* Update content transformation to process input_image items from Responses API format to Chat Completions format
2025-07-07 21:17:54 -07:00
Ishaan Jaff 4de3cbe1f5 bump: version 1.74.0 → 1.74.1 2025-07-07 21:16:24 -07:00
Ishaan Jaff 779791f7b3 ui new build 2025-07-07 21:13:53 -07:00
Ishaan Jaff 312d3602a7 add litellm proxy extras 2025-07-07 21:13:45 -07:00
Ishaan Jaff 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
dependabot[bot] 85bc1065a0 Bump mcp from 1.9.3 to 1.10.0 (#12388)
Bumps [mcp](https://github.com/modelcontextprotocol/python-sdk) from 1.9.3 to 1.10.0.
- [Release notes](https://github.com/modelcontextprotocol/python-sdk/releases)
- [Changelog](https://github.com/modelcontextprotocol/python-sdk/blob/main/RELEASE.md)
- [Commits](https://github.com/modelcontextprotocol/python-sdk/compare/v1.9.3...v1.10.0)

---
updated-dependencies:
- dependency-name: mcp
  dependency-version: 1.10.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 18:33:23 -07:00
Adam Holmberg 38278d9583 fix: make TextCompletionStreamWrapper conversion retain reasoning_content (#12377)
ref: #12375
2025-07-07 17:25:12 -07:00
Ishaan Jaff a0a57687ca fix security - mcp (#12362) 2025-07-07 15:53:54 -07:00
Ishaan Jaff 08f3b06d82 [Feat] Bump langfuse python SDK version and LANGFUSE_TRACING_ENVIRONMENT (#12376)
* bump langfuse to 2.59.7

* _set_langfuse_specific_attributes

* fix files

* test_set_langfuse_environment_attribute
2025-07-07 15:53:43 -07:00
Ishaan Jaff 0a36f89009 [Bug Fix] s3 config.yaml file - ensure yaml safe load is used (#12373)
* use yaml safe load

* test_get_file_contents_from_s3_no_temp_file_creation
2025-07-07 14:42:33 -07:00
tanjiro 32f3887a01 improve keyname display (#12371) 2025-07-07 12:58:06 -07:00
tanjiro 8bb9ea8568 sticky session for test key (#12365) 2025-07-07 10:12:39 -07:00
Krrish Dholakia 88a7b40f86 docs(index.md): update note with all guardrails now on UI 2025-07-06 21:55:06 -07:00
Krrish Dholakia d50a28d424 docs(index.md): add to release note 2025-07-06 21:54:02 -07:00
Krrish Dholakia 4d718f97ef docs(azure_content_guardrails.md): add doc on azure content guardrails 2025-07-06 21:42:58 -07:00
Krrish Dholakia 55ecb543f2 docs(azure_content_guardrails.md): add azure content guardrails doc 2025-07-06 21:39:03 -07:00
Ishaan Jaff 10c704ccb9 docs release notes 2025-07-05 21:24:09 -07:00
Krrish Dholakia 0cd4d4f76d build(ui/): new ui build 2025-07-05 20:04:42 -07:00
Krish Dholakia 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 Dholakia 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 54eb00ddfb docs team / Key Based Logging on UI 2025-07-05 18:26:51 -07:00
Krrish Dholakia dd212daa10 fix: fix typing import 2025-07-05 18:20:58 -07:00
Ishaan Jaff eabe0c5e7f docs - team based logging 2025-07-05 17:55:18 -07:00
Ishaan Jaff 2fc6896b0a docs refactor 2025-07-05 16:40:37 -07:00
Ishaan Jaff 8637142fd5 new img 2025-07-05 16:27:46 -07:00
Krish Dholakia dcc8f04ca0 Remove stream options from streaming + fix guardrail start time on log duration (#12346)
* fix(streaming_handler.py): don't return stream options in clientside response

* test: add unit test

* fix(custom_guardrail.py): fix start time

don't start until function actually called

leading to incorrect high latency numbers

* fix(custom_guardrail.py): fix start time
2025-07-05 15:54:47 -07:00
Cole McIntosh bbc3f74833 fix: add proper type annotations for embedding() function (#12262)
Fixes #9526

The embedding() function can return either an EmbeddingResponse or a
Coroutine[Any, Any, EmbeddingResponse] depending on whether aembedding=True
is passed. This adds @overload decorators to properly indicate the return
type based on the aembedding parameter.

This resolves type checking errors when using embedding() with aembedding=True
where the type checker couldn't determine that a coroutine was being returned.
2025-07-05 15:54:22 -07:00
Ishaan Jaff 2812ffc0c8 mcp - fix specific MCP server 2025-07-05 15:51:26 -07:00
Ishaan Jaff 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
Ishaan Jaff 303c4bd628 docs - 1.74.0.rc (#12347)
* doc updates

* doc fixes

* doc fixes

* docs fix

* doc fix

* doc clean up

* doc fixes

* cleanup
2025-07-05 13:17:51 -07:00
Ishaan Jaff 912e5084e5 docs fix 2025-07-05 11:25:31 -07:00
Ishaan Jaff a3c88c5207 docs add rerank 2025-07-05 11:19:24 -07:00
Ishaan Jaff 6ce8f5692e [Docs] vertex deepseek (#12345)
* docs vertex

* Vertex AI - Anthropic (Claude)
2025-07-05 11:14:41 -07:00
Ishaan Jaff 9991a813e2 doc fix 2025-07-05 10:54:00 -07:00
Ishaan Jaff 92a3f263d4 doc update 2025-07-05 10:53:22 -07:00
Ishaan Jaff 0e62803c0e v1.74.0.rc docs (#12344)
* cleanup

* fixes

* doc fix

* doc fix

* fixes release note

* docs

* docs

* v1.74.0
2025-07-05 10:44:38 -07:00
Krish Dholakia 380eb31103 feat(vertex_ai/): add new deepseek-ai api service (#12312)
* feat(vertex_ai/): add new deepseek-ai api service

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

* test: cleanup test
2025-07-05 10:38:37 -07:00
Krish Dholakia 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