Commit Graph
23230 Commits
Author SHA1 Message Date
Ryan CastnerandGitHub ac11bfabcb Responses API - Add reasoning content support for non-OpenAI providers (#12055)
Add reasoning content support when Responses API falls
back to completions API, enabling reasoning content for
all LLM providers (Anthropic, Vertex AI, etc.) since
OpenAI is currently the only native Responses API
provider.

* Add ReasoningSummaryTextDeltaEvent for streaming
  reasoning deltas
* Update streaming iterator to detect and transform
  reasoning content
* Extract reasoning content as separate output items in
  transformations
* Support reasoning content alongside regular message
  content

Closes https://github.com/BerriAI/litellm/issues/11302
2025-06-26 14:21:49 -07:00
Cole McIntoshandGitHub 98ba5c8ffe Merge pull request #12042 from colesmcintosh/fix-today-selector-date-mutation-bug
Fix today selector date mutation bug in dashboard components
2025-06-26 14:43:02 -06:00
Ishaan Jaff e556071544 docs - Use LiteLLM with Gemini CLI 2025-06-26 13:35:33 -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
Krrish Dholakia 1de2e4ce28 fix(anthropic_endpoints.py): publicly expose anthropic v1/messages endpoint 2025-06-26 10:47:37 -07:00
Krrish Dholakia 0e96f412a1 build(model_prices_and_context_window.json): mark azure o3-pro as responses api model
Fixes https://github.com/BerriAI/litellm/issues/12059
2025-06-26 10:41:03 -07:00
Ishaan JaffandGitHub 3c43b0f8ad add _pretty_print_redis_config (#12073) 2025-06-26 10:26:57 -07:00
tanjiroandGitHub bd0a5f7387 Inkeep searchbar and chat added to the Docs (#12030)
* inkeep chat added

* add prod key
2025-06-26 10:13:42 -07:00
Cole McIntoshandGitHub 7efb2c0f3c Merge pull request #12041 from colesmcintosh/ci-artifact
Enhance CircleCI integration in LLM translation testing workflow
2025-06-26 11:12:04 -06:00
Cole McIntoshandGitHub bd77321c6d Merge branch 'BerriAI:main' into ci-artifact 2025-06-26 10:59:17 -06:00
Cole McIntoshandGitHub 7b7472d1f1 Merge pull request #12072 from colesmcintosh/fix/test-mock-create-audio-file
fix(proxy): Fix test_mock_create_audio_file by adding managed_files hook
2025-06-26 10:58:58 -06:00
Cole McIntosh e4bc213bfe fix(proxy): Add managed_files hook to test_mock_create_audio_file
The test was failing because the managed_files hook was not configured.
This fix adds a DummyManagedFiles class and mocks the create_file
function as an AsyncMock to ensure proper test execution.
2025-06-26 10:42:25 -06:00
Cole McIntosh c4f3cc6de2 Enhance CircleCI integration in LLM translation testing workflow. Updated commit SHA retrieval method, improved pipeline search logic, and refined artifact downloading process. Added checks for test workflows and job statuses, with placeholder results creation if no artifacts are found. Updated artifact upload step for clarity. 2025-06-26 10:06:30 -06:00
Cole McIntosh d5d0dfc26f Add GitHub Actions workflow for LLM translation testing artifacts 2025-06-26 10:05:33 -06:00
Ishaan JaffandGitHub 22ff3da3cf [Fix] Allow using HTTP_ Proxy settings with trust_env (#12066)
* allow using trust_env

* add docs on how to use HTTP_PROXY

* docs AIOHTTP_TRUST_ENV

* test_aiohttp_transport_trust_env_setting

* docs fix
v1.73.2-nightly
2025-06-26 08:37:22 -07:00
Cole McIntoshandGitHub 327405ffae Merge pull request #12050 from colesmcintosh/docs/elasticsearch-logging-tutorial
Fix Elasticsearch tutorial image rendering
2025-06-26 09:00:00 -06:00
Krrish Dholakia 23018bd0a2 build(pyproject.toml): bump version 2025-06-26 07:58:29 -07:00
Ishaan Jaff f8f9e2299b docs latency headers 2025-06-26 07:58:23 -07:00
Ishaan Jaff bb86619605 Revert "Revert "add google generate content to call types""
This reverts commit b2d4462ab5.
2025-06-25 22:43:07 -07:00
Krrish Dholakia c3857e60f2 Store batch output file id in DB + Store batch file status in DB + (experimental) BATCH API COST TRACKING 2025-06-25 22:41:22 -07:00
Ishaan Jaff 329f8ec7a6 docs gemini cli 2025-06-25 22:39:50 -07:00
Ishaan Jaff bca94535da docs gemini cli 2025-06-25 22:31:47 -07:00
Ishaan Jaff 5ebdb58115 bump: version 1.73.2 → 1.73.3 2025-06-25 22:26:59 -07:00
Ishaan Jaff b2d4462ab5 Revert "add google generate content to call types"
This reverts commit 6f57dde293e50674c8fca0feac6e01c27d9e1c96.
2025-06-25 22:26:34 -07:00
Ishaan JaffandGitHub 5b8e300150 [Feat] gemini-cli integration - Add Logging + Cost tracking for stream + non-stream Vertex / Google AI Studio routes (#12058)
* add google generate content to call types

* Revert "add google generate content to call types"

This reverts commit 6f57dde293e50674c8fca0feac6e01c27d9e1c96.

* add CallTypesLiteral for gemini

* allow passing model to vertexpass through logging handler

* update logging handler

* fix checking if stream

* add async streaming logging for vtx

* refactor _transform_google_generate_content_to_openai_model_response

* fix logging_obj

* fixes _handle_non_streaming_google_genai_generate_content_response_logging

* logging callback tests

* ruff check fixes

* test _is_streaming_request

* test_ensure_initialize_azure_sdk_client_always_used

* fix BaseGoogleGenAIGenerateContentStreamingIterator

* fix - linting errors

* req - add google-genai
2025-06-25 22:26:20 -07:00
Krish DholakiaandGitHub 1a7fd1d1c7 Litellm dev 06 25 2025 p2 (#12049)
* test(test_router.py): initial unit test confirming router.afile_content uses dynamic api key / api base

* fix(managed_files.py): filter deployments for only those within file id mapping

ensure call works - only route to models where the file was written

* fix(proxy_server.py): fix loading in model ids from config, if config id is int

* fix(router.py): return all model file id mappings on create_file

if multiple deployments - this ensures all the file id mappings are bubbled up

Fixes issue when trying to use loadbalanced deployments - only 1 file id mapping was being stored

* feat(router_utils/common_utils.py): filter models by team id when selecting for routing

Prevents team only models from being used by other teams

* fix(common_utils.py): additional fixes around filtering team-based models

* fix(batches_endpoints/endpoints): support list batches with target model names specified

* fix(common_utils.py): more testing for team deployment filters
2025-06-25 21:54:13 -07:00
Krish DholakiaandGitHub e2f6fb2d7c Managed Files + Batches - filter deployments to only those where file was written + save all model file id mappings in DB (prev just 1st one) (#12048)
* test(test_router.py): initial unit test confirming router.afile_content uses dynamic api key / api base

* fix(managed_files.py): filter deployments for only those within file id mapping

ensure call works - only route to models where the file was written

* fix(proxy_server.py): fix loading in model ids from config, if config id is int

* fix(router.py): return all model file id mappings on create_file

if multiple deployments - this ensures all the file id mappings are bubbled up

Fixes issue when trying to use loadbalanced deployments - only 1 file id mapping was being stored
2025-06-25 21:27:06 -07:00
Ishaan Jaff de86246e14 test fixes 2025-06-25 18:42:06 -07:00
Ishaan JaffandGitHub 14d05fe422 [Feat] Add gemini-cli support - call VertexAI models through LiteLLM Native gemini routes (#12053)
* init litellm google gen ai methods

* feat init structure of functions for generate content

* add init

* add BaseGoogleGenAIGenerateContentConfig

* add generate_content_handler

* add get_provider_google_genai_generate_content_config

* fixes for generate content

* add get_vertex_ai_project etc to base

* use VertexBase

* fixes for BaseGoogleGenAIGenerateContentConfig

* working validate env for google gemini

* feat - add transform google response

* fixes for transform_generate_content_request

* fix get_supported_generate_content_optional_params

* add BaseGoogleGenAITest

* working e2e test

* fixes init config

* use correct types

* fix test for google gen ai

* fix types

* add sync_get_auth_token_and_url

* fixes for transform

* add llm http handler for google

* working non-streaming google endpoints

* add BaseGoogleGenAIGenerateContentStreamingIterator

* add GoogleGenAIGenerateContentStreamingIterator

* fix working sync stream

* fixes for litellm logging obj

* working async streaming

* add google gen ai types

* fix - required imports

* fix readme

* fix deps

* fix deps

* fix ruff code QA checks

* fix linting

* fixes TYPE_CHECKING

* fixes for typing

* add google gemini methods to litellm router

* [Feat] Add initial endpoints for using Gemini SDK (gemini-cli) with LiteLLM (#12040)

* init with google endpoints

* add Depends

* feat - add gemini endpoints

* google_generate_content

* fix init

* fixes import

* fixes for streaming

* fixes for sync/async

* working streaming with google gemini cli

* add google endpoints to llm api routes

* add VertexAIGoogleGenAIConfig

* use aiter_bytes

* use common request for streaming data

* re-use logic for anthropic streaming

* add GoogleAIStudioDataGenerator
2025-06-25 18:39:25 -07:00
Ishaan JaffandGitHub 35e46784d3 [Feat] Add Support for calling Gemini/Vertex models in their native format (#12046)
* init litellm google gen ai methods

* feat init structure of functions for generate content

* add init

* add BaseGoogleGenAIGenerateContentConfig

* add generate_content_handler

* add get_provider_google_genai_generate_content_config

* fixes for generate content

* add get_vertex_ai_project etc to base

* use VertexBase

* fixes for BaseGoogleGenAIGenerateContentConfig

* working validate env for google gemini

* feat - add transform google response

* fixes for transform_generate_content_request

* fix get_supported_generate_content_optional_params

* add BaseGoogleGenAITest

* working e2e test

* fixes init config

* use correct types

* fix test for google gen ai

* fix types

* add sync_get_auth_token_and_url

* fixes for transform

* add llm http handler for google

* working non-streaming google endpoints

* add BaseGoogleGenAIGenerateContentStreamingIterator

* add GoogleGenAIGenerateContentStreamingIterator

* fix working sync stream

* fixes for litellm logging obj

* working async streaming

* add google gen ai types

* fix - required imports

* fix readme

* fix deps

* fix deps

* fix ruff code QA checks

* fix linting

* fixes TYPE_CHECKING

* fixes for typing
2025-06-25 18:37:03 -07:00
Cole McIntosh f9ef45474b Fix Elasticsearch tutorial image rendering
- Replace markdown image syntax with React Image component
- Import @theme/IdealImage for proper image rendering in Docusaurus
- Addresses PR feedback to fix image display issues
2025-06-25 16:27:14 -06:00
Cole McIntoshandGitHub 7809b07dd6 Merge branch 'BerriAI:main' into docs/elasticsearch-logging-tutorial 2025-06-25 16:20:05 -06:00
Cole McIntoshandGitHub 51c1c7bd36 Add Elasticsearch Logging Tutorial (#11761)
* docs: add Elasticsearch logging tutorial and update sidebar

* docs: update Elasticsearch logging tutorial to include OpenTelemetry setup and configuration

* docs: remove sections from Elasticsearch logging tutorial

* docs: remove analytics examples from Elasticsearch logging tutorial

* Update Elasticsearch version and logging exporter configuration in the Elasticsearch logging tutorial

* Add visualization instructions for LLM telemetry data in Kibana to Elasticsearch logging tutorial

* Add Elasticsearch demo image to documentation

* Move demo image for Elasticsearch logging tutorial
2025-06-25 15:17:37 -07:00
Cole McIntosh 9111b67950 Move demo image for Elasticsearch logging tutorial 2025-06-25 16:14:27 -06:00
Ishaan JaffandGitHub 8d78519adb [Feat] Add initial endpoints for using Gemini SDK (gemini-cli) with LiteLLM (#12040)
* init with google endpoints

* add Depends
2025-06-25 15:12:25 -07:00
Cole McIntosh b3aa8c980e Add Elasticsearch demo image to documentation 2025-06-25 16:11:41 -06:00
Cole McIntosh c218b62822 Add visualization instructions for LLM telemetry data in Kibana to Elasticsearch logging tutorial 2025-06-25 16:11:32 -06:00
Cole McIntoshandGitHub d7568a37f0 Merge branch 'BerriAI:main' into docs/elasticsearch-logging-tutorial 2025-06-25 15:42:18 -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
Ishaan JaffandGitHub d98a9ae424 [Fix] Router - cooldown time, allow using dynamic cooldown time for a specific deployment (#12037)
* fixes header_cooldown

* test_deployment_callback_respects_cooldown_time
2025-06-25 08:46:27 -07:00
Cole McIntosh f8e162a084 docs(GEMINI.md): add development guidelines and architecture overview for Gemini project 2025-06-25 08:22:15 -06:00
Krish DholakiaandGitHub 1a4ad8bf18 Update mistral 'supports_response_schema' field + Fix ollama embedding (#12024)
* build(model_prices_and_context_window.json): update all mistral models (besides codestral-mamba) to indicate support for response schema

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

* fix(route_llm_request.py): if llm router is not initialized, go straight through to litellm sdk

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

* test: add unit test

* fix(ollama_embeddings): fix unecessary await

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

* test: update ollama embedding tests
2025-06-25 07:20:13 -07:00
Krish DholakiaandGitHub 24c2cd1bd9 Anthropic /v1/messages - Custom LLM Server support (#12016)
* fix(handler.py): support routing custom llm's to chat completion handler

Adds custom llm support for anthropic

* test(test_anthropic_experimental_pass_through_messages_handler.py): add unit test confirming custom llm respected

* docs(custom_llm_server.md): document anthropic custom llm translation

* test(volcengine.py): map thinking in extra body

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

* feat(main.py): support `azure/responses/<deployment-name>` model string

this allows us to route the model correctly

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

* docs(azure_responses.md): document calling azure responses api models via chat completions bridge

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

* fix: fix custom provider check

* test: update tests
2025-06-24 22:00:44 -07: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