* fix(batches_endpoints/endpoints.py): support passing target model names for batch list as a query param
Fixes issue where cloud run fails calls because GET can't contain request body
* test(test_openai_batches_endpoints.py): add unit test
* docs(managed_batches.md): update docs
* feat(spend_tracking_utils.py): support STORE_PROMPTS_IN_SPEND_LOGS env var
ensures prompt is stored in spend logs
* fix(streaming_iterator.py): fix anthropic - completion streaming iterator to yield content block stop
ensures claude code renders messages
* test: skip local test
* fix(proxy_server.py): handle empty config yaml
Fixes https://github.com/BerriAI/litellm/issues/12163
* fix(gemini/common_utils.py): replace models/ as expected, instead of using 'strip'
Fixes https://github.com/BerriAI/litellm/issues/12160
* fix(anthropic/experimental_pass_through/messages/transformation.py): check for env var when selecting api key
* fix(anthropic/transformation.py): return tool_use content block start on anthropic bridge
Closes https://github.com/BerriAI/litellm/issues/12158
* fix(anthropic/streaming_iterator.py): fix setting index in block
ensure index is set just once and increments correctly when a new block is created
* fix(anthropic/adapters/handler.py): update logging obj with stream options value if set
* feat(anthropic/streaming_iterator.py): return usage from chat completion to messages bridge
enables usage tracking for non-anthropic models
Closes https://github.com/BerriAI/litellm/issues/12132
* fix(streaming_iterator.py): safely access usage chunk
* fix: suppress linting error
* test: update tests
* fix: fix streaming errors
* fix(proxy_server.py): handle empty config yaml
Fixes https://github.com/BerriAI/litellm/issues/12163
* fix(gemini/common_utils.py): replace models/ as expected, instead of using 'strip'
Fixes https://github.com/BerriAI/litellm/issues/12160
* fix(anthropic/experimental_pass_through/messages/transformation.py): check for env var when selecting api key
* docs(config_settings.md): add api key to docs
* refactor(passthrough_endpoints-success-handler): refactor llm passthrough logging logic
isolate the llm translation work to enable cost tracking on sdk
* feat: initial implementation of passthrough SDK cost calculation
enables bedrock passthrough cost tracking to work
* feat(cost_calculator.py): working cost calculation for bedrock passthrough
* feat(litellm_logging.py): consider allm_passthrough in cost tracking
allows async calls (e.g. via proxy) to work
* feat(bedrock/passthrough): working event stream decoding for bedrock passthrough calls + logging instrumentation for passthrough sdk calls (log on stream completion)
Enables bedrock streaming cost calculation
* feat(litellm_logging.py): support streaming passthrough cost tracking
* feat(passthrough/main.py): working async streaming cost calculation
Closes https://github.com/BerriAI/litellm/issues/11359
* feat(proxy_server.py): fix passthrough routing when llm router enabled
* feat: further fixes
* feat(bedrock/): working bedrock passthrough cost tracking (non-streaming)
* feat(litellm_logging.py): working usage tracking for bedrock passthrough calls
ensures tokens are logged
* feat(bedrock/passthrough): add converse passthrough cost tracking support
* feat(base_llm/passthrough): remove redundant function
* refactor(litellm_logging.py): refactor function to be below 50 LOC
* test: update test
* test: remove redundant test
* feat: initial commit adding bedrock support via the new sdk passthrough logic
ensures correct sequencing of tasks (pre call checks etc. can run before signing request)
* fix(route_llm_requests.py): passthrough to allm_passthrough_route if no model found
* feat(bedrock/passthrough): working bedrock passthrough via sdk support
* fix(passthrough/main.py): re-add data and json
* feat(passthrough/main): support async passthrough calls to bedrock
* feat(passthrough/main.py): async streaming + completion support
* feat(llm_passthrough_endpoints.py): migrate bedrock passthrough calls to to new bedrock passthrough sdk
Enables calls to work correctly
* fix: fix linting errors
* test: update test
* 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
* Enhance Mistral API: Add support for parallel tool calls and refine name handling in tool messages. Plus, introduce a new test for parallel tool calls in the Mistral model.
* tests
* make mypy happy
* Refine name handling in Mistral chat transformation: clarify conditions for removing the 'name' field based on message role and content.
* fix(spend_tracking_utils.py): add user agent tags from standard logging payload, in spend logs payload
* feat(litellm_logging.py): identify user agent tags as `User-Agent: ..` and allow admin to disable storing user agent as tag
* fix(azure_ai/): pass content type header in azure ai request
Fixes https://github.com/BerriAI/litellm/issues/11227
* test: add unit test
* fix(router.py): fix passing dynamic credentials to retrieve batch
Fixes batch retrieval when using router
* test: add more unit tests
* fix(anthropic/chat/transformation.py): append prefix to start of assistant response, if set
ensures assistant response contains complete response
* fix(anthropic/chat/transformation.py): add flag to allow user to opt out of enabling prefix in prompt
* fix(anthropic/chat/transformation.py): working e2e support for prefix prompt in assistant response
* feat(networking.tsx): always include model access groups on UI
show admin created access groups when giving key/user/team model permissions
* feat(add_model_tab.tsx): initial ui component for adding to an existing model access group
allows user to add model to an access group (simplify giving users/keys/teams model access)
* feat(proxy_server.py): add 'only_model_access_groups' flag support to `/v1/models`
simplifies listing available access groups on UI
* test: add e2e test for new only_model_access_groups param
* feat(add_model_tab.tsx): allow adding+viewing model access groups on models tab
make feature functional on UI
* feat(view_users.tsx): route edit user to user info page
more detailed user edit
* feat(columns.tsx): route edit user to user info page
more detailed user edit
* fix(columns.tsx): fix linting error
* build(ui/): fix linting errors
* fix(utils.py): convert stringified numbers to numbers
Closes https://github.com/BerriAI/litellm/issues/11266
* fix(convert_dict_to_model_response_object/): bubble up azure content_filter_results
* fix: fix linting error
* fix: fix linting errors
* fix(types/utils.py): ensure choices is correctly set
* fix: delete field if not set
* fix: expand scope of choicelogprobs value
* refactor(responses/): refactor to move responses_to_completion in separate folder
future work to support completion_to_responses bridge
allow calling codex mini via chat completions (and other endpoints)
* Revert "refactor(responses/): refactor to move responses_to_completion in separate folder"
This reverts commit ff87cb895812283d107f47e8e528bcebe93d8015.
* feat: initial responses api bridge
write it like a custom llm - requires lesser 'new' components
* style: add __init__'s and bubble up the responses api bridge
* feat(responses/transformation): working sync completion -> responses and back bridge (non-streaming)
* feat(responses/): working async (non-streaming) completion <-> responses bridge
Allows calling codex mini via proxy
* feat(responses/): working sync + async streaming for base model response iterator
* fix: reduce function size
maintain <50 LOC
* fix(main.py): safely handle responses api model check
* fix: fix linting errors
* fix(internal_user_endpoints.py): support user with `+` in email on user info
ensures user is correctly parsed from input
* fix(factory.py): support vertex function call args as None
handles empty string in args for vertex gemini calls
* docs(langfuse_integration.md): pin langfuse sdk version on docs
* fix(vertex_ai/): return empty dict, instead of none when empty string given
* refactor: reduce function size
* fix: fix linting errors
* fix: revert check
* fix(internal_user_endpoints.py): fix check
* test: update tests
* test: update tests
* fix(streaming_handler.py): maintain same 'created' across all chunks
Fixes https://github.com/BerriAI/litellm/issues/11437
* test: add unit test to ensure created is always the same across all chunks
* fix(types/utils.py): set a tool call id, if missing in delta tool call
Ensures stream chunk builder can reconstruct tool calls correctly
Fixes https://github.com/BerriAI/litellm/issues/11262
* fix(responses/transformation.py): support passing mcp server tool call to anthropic
allows switching between openai and anthropic for mcp tool calling
* fix(ollama/chat/transformation.py): set tool call id's when missing
* feat(anthropic/): initial commit adding working mcp tool call support
pass in mcp tool via `tools` and litellm will handle translating it to the right anthropic param
* feat(anthropic/): map openai mcp tool to anthropic mcp tool
allows usage within responses api
* fix(databricks/transformation.py): fix databricks linting error
* test(test_anthropic_chat_transformation.py): fix test
* test: update test
* fix(anthropic/chat/transformation.py): add dummy tool call
* fix(vertex_and_google_ai_studio_gemini.py): add web search request tracking
Enables cost calculation for google web search
* fix(vertex_and_gemini): use common processing logic across stream / non-stream calls
* fix(vertex_And_google_ai_studio_Gemini.py): fix initial choice
* fix: fix linting error
* fix: add initial support for google search cost tracking
* fix(tool_call_cost_tracking.py): working tool cost tracking for gemini
* fix(vertex_ai/gemini/cost_calculator.py): add google web search tool cost tracking for vertex ai
Closes LIT-210
* fix: fix check
* build(model_prices_and_context_window.json): fix amazon nova max output tokens
Closes https://github.com/BerriAI/litellm/issues/11441
* fix: fix ruff check
* fix(convert_dict_to_response.py): handle None values in usage field for gpt-image-1
* test: add tests for handling None and partial values in usage fields for gpt-image-1 responses
* fix(anthropic/): fix regression when passing file url's to the 'file_id' parameter
add test and ensure anthropic file url's are correctly sent as 'document' blocks
* fix(vertex_and_google_ai_studio.py): Use same usage calculation function as non-streaming
Closes https://github.com/BerriAI/litellm/issues/10667
* test(test_vertex_and_google_ai_studio_gemini.py): update test
- Updated model_prices_and_context_window.json to include embed-v4.0 with relevant pricing and metadata.
- Added embed-v4.0 to cohere_embedding_models in constants.py.
- Implemented comprehensive tests for Cohere Embed v4.0 in test_cohere.py, covering basic functionality, input types, error handling, and optional parameters.
* feat(parallel_request_limiter_v2.py): add sliding window logic
allows rate limiting to work across minutes
* fix(parallel_request_limiter_v2.py): decrement usage on rate limit error
* fix(base_routing_strategy.py): fix merge from redis - preserve values in in-memory cache during gap b/w push to redis and read from redis
* fix(base_routing_strategy.py): catch the delta change during redis sync
ensures values are kept in sync
* fix(parallel_request_limiter_v2.py): update tpm tracking to use slot key logic
* fix: fix linting error
* test: update testing
* test: update tests
* test: skip on rate limit or internal server errors
* test: use pytest fixture instead
* test: bump mistral model
* feat: Make gemini accept the openai parameter parallel_tool_calls
When mapping, allow the parameter: True because that is the
intrinsic behavior of Gemini. Allow False, but reject if there
are multiple tools because there's no actual equivalent in Gemini.
fixes#9686
ref: issues/9686
* chore: cleanup and move test_vertex.py down to tests/litellm
as suggested in https://github.com/BerriAI/litellm/pull/11125#discussion_r2105905871
* fix(main.py): use processed non-default-params as standard input params for langfuse
Fixes https://github.com/BerriAI/litellm/issues/11072
Fixes https://github.com/BerriAI/litellm/issues/11096
* fix(main.py): rename variable to be more accurate
* test(test_langfuse_e2e_test.py): add router unit test for langfuse e2e testing
Prevent https://github.com/BerriAI/litellm/issues/11072 from happening again
* build: update lock
* fix(utils.py): refactor optional params function
make it easier to get the standardized non default params
* fix(utils.py): improve process non default params function
* fix(main.py): include provider specific params in processed non default params used in logging
ensures user can see any provider specific params on langfuse
ensures user can see any provider specific params on langfus e