Commit Graph
1068 Commits
Author SHA1 Message Date
Javier de la TorreandClaude df232a71f1 feat(snowflake): add function calling support for Snowflake Cortex REST API
Add support for function calling (tools) with Snowflake Cortex models that support it (e.g., Claude 3.5 Sonnet).

Changes:
- Add 'tools' and 'tool_choice' to supported OpenAI parameters
- Implement request transformation: OpenAI function format → Snowflake tool_spec format
- Implement response transformation: Snowflake content_list with tool_use → OpenAI tool_calls
- Add tool_choice transformation: OpenAI nested format → Snowflake array format

Request transformation:
- Transform tools from nested {"type": "function", "function": {...}} to Snowflake's {"tool_spec": {"type": "generic", "name": "...", "input_schema": {...}}}
- Transform tool_choice from {"type": "function", "function": {"name": "..."}} to {"type": "tool", "name": ["..."]}

Response transformation:
- Parse Snowflake's content_list array containing tool_use objects
- Extract tool calls with tool_use_id, name, and input
- Convert to OpenAI's tool_calls format with proper JSON serialization

Testing:
- Add 7 unit tests covering request/response transformations
- Add integration test for Responses API with tool calling
- All tests passing

Fixes issue #15218

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-05 13:08:33 +02:00
Krrish Dholakia 63cb2764fe test: fix raise 2025-10-04 16:11:22 -07:00
Krrish Dholakia 2d1000c461 test: update tests 2025-10-04 15:31:25 -07:00
Krish DholakiaandGitHub a9037ab61f Merge branch 'main' into litellm_dev_10_03_2025_p1 2025-10-04 15:23:31 -07:00
Krish DholakiaandGitHub 75e3f4e10d Merge pull request #15120 from BerriAI/litellm_dev_10_01_2025_p2
(feat) Support 'guaranteed_throughput' when setting limits on keys belonging to a team
2025-10-04 15:22:47 -07:00
Krrish Dholakia 814e49df06 test: update tests 2025-10-04 14:39:50 -07:00
Ishaan JaffandGitHub ec9cdf783a Revert "Add streamGenerateContent cost tracking in passthrough (#15199)" (#15202)
This reverts commit 8095de506a.
2025-10-04 14:37:02 -07:00
Sameer KankuteandGitHub 8095de506a Add streamGenerateContent cost tracking in passthrough (#15199)
* Add streamgenerate cost tracking for gemini provider

* add cost tracking test
2025-10-04 12:31:25 -07:00
Ishaan Jaffer 3d6342f852 test_twelvelabs_missing_input_type_error 2025-10-04 12:28:09 -07:00
Ishaan Jaffer c38c5d20cc test dynamic rate limiter 3 2025-10-04 12:06:13 -07:00
Ishaan JaffandGitHub f78608082c [Feat] Dynamic Rate Limiter v3 - fixes for detecting saturation + fixes for post saturation behavior (#15192)
* fix: test case 1, model hits saturation

* fix: _check_rate_limits test case 2

* fix: _get_priority_allocation

* test_default_priority_shared_pool

* fix: No Rate Limiting when low saturatation

* fix: correctly use  model_saturation_check

* fixes priority_descriptors

* fix: tune default PriorityReservationSettings
2025-10-04 10:45:17 -07:00
Krish DholakiaandGitHub 206f67a11e Merge pull request #15183 from uc4w6c/fix/test_mcp_server
test: fix test_mcp_server.py
2025-10-03 21:44:52 -07:00
Krrish Dholakia 3816d3b36f test: add unit testing 2025-10-03 17:27:49 -07:00
Krrish Dholakia c043ad6c2b fix: replace list in for set in
faster
2025-10-03 17:17:20 -07:00
Krrish Dholakia 69edc546c0 fix(mcp_server_manager.py): don't return an invalid server id on list servers
Prevents user from hitting 'server not found' error, even when they see it being listed on litellm ui
2025-10-03 17:15:15 -07:00
Yuta Saito 359aaa947f test: fix test_mcp_server.py 2025-10-04 08:18:15 +09:00
Ishaan JaffandGitHub 10d6d72ae3 [Feat] VertexAI - Support googlemap grounding in vertex ai (#15179)
* add VertexToolName

* test_vertex_tool_params

* fix: working maps grounding

* test_gemini_google_maps_tool_simple

* test_vertex_ai_map_google_maps_tool_with_location

* fix  # noqa: PLR0915

* _extract_google_maps_retrieval_config

* fixes for linting

* docs: **Google Maps**
2025-10-03 16:07:51 -07:00
Krish DholakiaandGitHub 3095f43e92 Merge pull request #15007 from TobiMayr/feature/add-max-requests-env-var
feature/add max requests env var
2025-10-03 15:30:15 -07:00
rishiganesh2002andGitHub d36c8d6bbe [Feat] MCP Gateway Fine-grained Tools Addition (#15153)
* feat: UI to add specific tools under creating MCP connection

* chore: pydantic + prisma changes

* feat: adding specific MCP tools now works

* fix: allowed tools filtering

* chore: filtered list to mcp server cost config

* chore: update Readme

* chore: refactor the filtering

* test: Added tests

When the allowed_tests is null, empty list or populated

* chore: resolve the proxy issue

* feat: updating MCP tool filtering
2025-10-03 10:16:29 -07:00
Sameer KankuteandGitHub 544db8d140 (feat)Litellm x twelvelabs bedrock[Async Invoke Support] (#14871)
* Add async invoke support

* Add docs and correct embedding response

* fix cicd erros

* fix cicd erros

* fix mypy error

* Add litellm param input_type

* Update the docs
2025-10-02 18:52:33 -07:00
Krish DholakiaandGitHub 54095a256a Merge pull request #15015 from anthony-liner/fix/langfuse-total-tokens
fix: set usage_details.total in langfuse integration
2025-10-02 17:33:43 -07:00
Krish DholakiaandGitHub f6b67fd9bd Merge pull request #14799 from tyler-liner/chore/generation-name-opentelemetry
fix (opentelemetry): use generation_name for span naming in logging method
2025-10-01 21:39:38 -07:00
Ishaan JaffandGitHub d538cf489a [Feat] Fixes to dynamic rate limiter v3 - add saturatation detection (#15119)
* test cases dynamic rate limits

* fix _handle_generous_mode

* docs add readme

* use configs for vars

* fix debug

* add comment

* test_dynamic_rate_limiter_v3.py

* test_concurrent_pre_call_hooks_stress
2025-10-01 18:35:34 -07:00
68adca04c8 Gitlab based Prompt manager (#14988)
* add prompt

* add prompt

* add prompt

* add prompt

* add prompt management via gitlab

* gitlab client

* gitlab client

* gitlab client

* fix lint issues

* fix lint issues

* remove router changes

---------

Co-authored-by: deepanshu <deepanshu.lulla@hq.bill.com>
2025-10-01 18:13:11 -07:00
Krrish Dholakia 757436f302 test: add unit test 2025-10-01 17:51:10 -07:00
Krrish Dholakia a83238a2db test: add unit tests 2025-10-01 17:02:05 -07:00
Ishaan JaffandGitHub 388761f52d [Fix] LiteLLM UI - Ensure OTEL settings are saved in DB after set on UI (#15118)
* fix: fix _add_callback_from_db_to_in_memory_litellm_callbacks

* test_add_callback_from_db_to_in_memory_litellm_callbacks

* fix otel

* fix: fix _add_callback_from_db_to_in_memory_litellm_callbacks
2025-10-01 15:33:22 -07:00
Ishaan JaffandGitHub e73d053de3 [Fix] Proxy Auth - Ensure LLM_API_KEYs can access pass through routes (#15115)
* test_virtual_key_llm_api_routes_allows_registered_pass_through_endpoints

* fix: is_registered_pass_through_route

* docs fix
2025-10-01 14:09:01 -07:00
Sameer KankuteandGitHub 7ec7e5332c Add generateContent cost tracking (#15014) 2025-10-01 09:03:45 -07:00
Krish DholakiaandGitHub 1503435d91 Merge pull request #15029 from henryhwang/gemini-adapter-fixes
feat(gemini): Add full support for native Gemini API translation
2025-09-30 21:19:18 -07:00
Ishaan JaffandGitHub 73bfef1a1f Revert "[Feature]: Replace HTTPException with ParallelRequestLimitError in pa…" (#15095)
This reverts commit 71b9b58fa9.
2025-09-30 21:17:04 -07:00
Henry Wang acc23b9757 fix issue from pr review 2025-10-01 11:57:10 +08:00
Henry H WangandGitHub 7c4439ba0a Merge branch 'BerriAI:main' into gemini-adapter-fixes 2025-10-01 09:53:51 +08:00
Uzair AliandGitHub fcfe856e10 Add support for GPT 5 codex models (#14841)
* Add support for GPT 5 codex models

* lint

* fixes
2025-09-30 18:44:35 -07:00
Henry Wang 4eee54b157 fix the test issue from the pr review 2025-10-01 09:08:25 +08:00
Ishaan Jaffer f205b2c0a5 test fixes 2025-09-30 17:08:49 -07:00
malagsandGitHub 68189d1c04 [Performance] Reduce complexity of InMemoryCache.evict_cache from O(n*log(n)) to O(log(n)) (#15000)
* Improved performance by reducing complexity

* Improved logic to prevent memory from increasing too much, added test

* Restore indent

* Restore indent

* Added type annotation

* Updated test to correctly initialize the expiration_heap
2025-09-30 16:49:35 -07:00
Krish DholakiaandGitHub c475723c67 Merge pull request #15044 from BerriAI/litellm_dev_09_29_2025_p1
MCP - enforce server permissions on call tools + Teams - add model specific tpm/rpm limits to teams on LiteLLM
2025-09-30 15:32:53 -07:00
Krish DholakiaandGitHub 5619d350b6 Merge pull request #15074 from Jetemple/custom-logo-fix
Make UI theme settings publicly accessible for custom branding
2025-09-30 15:26:00 -07:00
Ishaan JaffandGitHub 0476a33d9f [Bug Fix] Passthrough API Endpoints - Ensure query params are forwarded from origin url to downstream request (#15087)
* test_pass_through_request_query_params_forwarding

* fix: pass_through_request

* test_azure_openai_assistants_e2e_operations_stream

* test_azure_openai_assistants_e2e_operations_stream
2025-09-30 15:01:38 -07:00
Ishaan JaffandGitHub 69a464fc97 [Fix Security] Ensure OCI secret fields not shared on /models and /v1/models endpoints (#15085)
* fix: remove_sensitive_info_from_deployment

* fix: remove_sensitive_info_from_deployment

* test_model_info_v1_oci_secrets_not_leaked
2025-09-30 14:55:54 -07:00
CopilotGitHubcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>ishaan-jaff
71b9b58fa9 [Feature]: Replace HTTPException with ParallelRequestLimitError in parallel_request_limiter_v3 (#15033)
* Initial plan

* Implement ParallelRequestLimitError custom exception to replace HTTPException

Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>

* Add ParallelRequestLimitError to litellm main module exports

Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ishaan-jaff <29436595+ishaan-jaff@users.noreply.github.com>
2025-09-30 13:57:14 -07:00
Krrish Dholakia 0cd61a6a6a fix: simplify testing 2025-09-30 12:37:25 -07:00
Eddie Richter 929510ef5d Adding unit tests and documentation 2025-09-30 12:12:24 -06:00
Jack Temple 7212116d8c test: add UI theme settings retrieval and update tests 2025-09-30 10:01:44 -05:00
Henry Wang fcd539af33 fix the issue from the tests for pr review 2025-09-30 18:15:25 +08:00
Henry Wang cce05ac2b4 fix test issues from pr review 2025-09-30 16:44:15 +08:00
Henry Wang d838c96ffb fix test issues from pr review 2025-09-30 16:05:17 +08:00
Krish DholakiaandGitHub fd1a986596 Merge pull request #15013 from serializer/patch-1
[bug]: Update request handling for original exceptions
2025-09-29 21:59:26 -07:00
Krish DholakiaandGitHub 79d071c25c Merge pull request #15022 from BerriAI/litellm_gemini_tool_search
Ignore type param for gemini tools
2025-09-29 21:57:50 -07:00