Commit graph

1851 commits

Author SHA1 Message Date
Sameer Kankute
8d7f39798c
Removed stop param from unsupported azure models (#15229)
* Removed stop param from unsupported model

* Use better handling for stop method

* Use better handling for stop method
2025-10-06 19:56:18 -07:00
Sameer Kankute
cd25782359
fix passing headers for gemini (#15231) 2025-10-06 12:59:19 -07:00
Otavio Brito
b2a734c1f8 fix ttl tests 2025-10-06 09:30:23 -03:00
Otavio Brito
251d56ba5e update docs 2025-10-05 23:47:24 -03:00
Javier de la Torre
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
Ishaan Jaffer
3d6342f852 test_twelvelabs_missing_input_type_error 2025-10-04 12:28:09 -07:00
Ishaan Jaff
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
Sameer Kankute
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
Uzair Ali
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
Eddie Richter
929510ef5d Adding unit tests and documentation 2025-09-30 12:12:24 -06:00
Sameerlite
58955a0348 Ignore type param for gemini tools 2025-09-29 16:32:21 +05:30
Krrish Dholakia
0560cb5cfe fix(openai/image_edit/transformation.py): fix passing multiple images to openai 2025-09-27 16:03:17 -07:00
Krrish Dholakia
cf1ed225d7 fix: fix vllm test 2025-09-27 10:01:48 -07:00
Maximgitman
f2d7c1c14d Fix Anthropic streaming IDs 2025-09-26 18:31:10 -04:00
Krish Dholakia
f2f75bf911
Merge pull request #14893 from vertexcover-io/fix/openai-image-edit-support-images
🐛 Fix a bug where openai image edit siltently ignores multiple images
2025-09-25 23:37:52 -07:00
Ritesh Kadmawala
af0cb7c277 🐛 Fix a bug where openai image edit siltently ignores multiple images 2025-09-26 10:56:06 +05:30
Alexsander Hamir
eaa04cd8ce
fix: use fastuuid helper (#14903)
* fix: use fastuuid helper across the codebase

First batch of changes, simple drop in replacement.

* second batch of changes

* fixed: script mistake on helper file
2025-09-25 15:47:01 -07:00
Sameer Kankute
e132ad63f1
Merge pull request #14164 from TomeHirata/citation-supported-text-3
Add supported text field to anthropic citation response
2025-09-24 10:30:44 +05:30
Ishaan Jaffer
e1b342604d test vertex test_get_token_url 2025-09-23 19:34:50 -07:00
Dharamendra Kumar
34f51a20eb Merge branch 'main' into reuse-aiohttp-session-http-handler 2025-09-23 10:36:35 -07:00
Dharamendra Kumar
04acd4b739 Update var name for consistency 2025-09-23 10:28:40 -07:00
Krish Dholakia
66f7e4a832
Merge pull request #14790 from eycjur/support_flux_image_edit
[Feat] Support flux image edit
2025-09-22 22:38:45 -07:00
eycjur
00b36554b3 add unit test 2025-09-23 01:57:50 +00:00
Anubhav Singh
fde4dcb0b8
Merge branch 'main' into wandb-inference 2025-09-23 00:14:11 +05:30
Krish Dholakia
9096d9cb25
Merge branch 'main' into feat/issue-14562-bedrock-converse-request-metadata 2025-09-21 21:26:37 -07:00
Felipe Garé
a696ffe4a6
Litellm gemini batch (#14733)
* feat: add Vertex AI support for file content retrieval

- Extended `custom_llm_provider` to include "vertex_ai" in `afile_content` function.
- Implemented file content retrieval logic for Vertex AI in `VertexAIFilesHandler`.
- Added helper method to extract bucket and object from URL-encoded file_id.
- Created comprehensive unit and integration tests for Vertex AI file handling.
- Updated transformation logic to ensure compatibility with Vertex AI file responses.

* fix: update Vertex AI file transformation logic

- Modified the transformation logic in `VertexAIFilesConfig` to return a newline-separated JSON string for batch JSONL files instead of a array if JSON strings.

* fix: enhance Vertex AI output handling in transformation logic

- Updated the transformation logic in `VertexAIBatchTransformation` to utilize the new `OutputInfo` TypedDict for retrieving the GCS output directory.
- Added `OutputInfo` class to type definitions for better structure and clarity in Vertex AI responses.
2025-09-19 15:22:52 -07:00
Dharamendra Kumar
77a39e7ca9 feat: Add shared_session parameter for aiohttp ClientSession reuse
Allow passing aiohttp.ClientSession to acompletion() calls for better
performance and resource management. Includes debug logging, tests,
and documentation. Backward compatible.
2025-09-19 01:46:53 -07:00
Krish Dholakia
63c26d7a4f
Merge branch 'litellm_contributor_prs_09_18_2025_p2' into fix/issue-14685-bedrock-titan-v2-encoding-format 2025-09-18 17:54:33 -07:00
Tim Elfrink
b100328435 Add test coverage for Bedrock Titan V2 encoding_format parameter
- Test encoding_format='float' parameter mapping and response handling
- Test encoding_format='base64' parameter mapping to binary format
- Verify parameter transformation and response processing
- Mock AWS API responses for both float and binary formats
- Ensure OpenAI compatibility with new encoding_format support
2025-09-18 20:24:41 +02:00
Sameer Kankute
36bedc69ff
Add TwelveLabs marengo model (#14674) 2025-09-18 11:21:35 -07:00
Sameer Kankute
d213a2e066
correct the gaurdcontent name (#14684)
* correct the gaurdcontent name

* correct the gaurdcontent name

* fix model required error in test

* Add correct model
2025-09-18 11:00:19 -07:00
Tim Elfrink
27a37ce57e Use requestMetadata parameter name for consistency with other Bedrock params
- Change parameter from request_metadata to requestMetadata to match camelCase convention
- Consistent with guardrailConfig and performanceConfig naming pattern
- Update all references in transformation code and error messages
- Update tests and documentation to use correct parameter name
- Fix type checking for parameter validation
2025-09-18 09:21:45 +02:00
Tim Elfrink
1d85623b66 Add comprehensive tests for Bedrock Converse requestMetadata support
- Test requestMetadata parameter support in get_supported_openai_params
- Test transformation to top-level field in Bedrock API request
- Test validation of AWS constraints: max 16 items, key/value length limits
- Test character set validation for keys and values
- Cover edge cases including empty values and special characters
- Ensure compatibility with existing test patterns
2025-09-18 09:21:45 +02:00
Krish Dholakia
bfaab8ad7e
Merge pull request #14557 from timelfrink/fix/issue-14478-bedrock-count-tokens-endpoint
Implement AWS Bedrock CountTokens API support
2025-09-17 23:51:06 -07:00
Krish Dholakia
e7bc700b20
Merge pull request #14640 from Sameerlite/litellm_gardrail_default_latest_message
[Feat]Add last message as default in gaurdrail
2025-09-17 23:42:40 -07:00
Tim Elfrink
c234b13275 Apply code formatting and linting fixes
- Apply Black formatting to all Bedrock CountTokens files
- Clean up imports and remove unused variables in tests
- Fix indentation and simplify test structure
- Fix pyright type error with type ignore annotation
- All tests continue to pass after cleanup
2025-09-18 08:28:17 +02:00
Tim Elfrink
e74ac35b5d Add comprehensive tests for Bedrock CountTokens functionality
- Add endpoint integration test in test_proxy_token_counter.py
- Add unit tests for transformation logic in bedrock/count_tokens/
- Test model extraction from request body vs endpoint path
- Test input format detection (converse vs invokeModel)
- Test request transformation from Anthropic to Bedrock format
- All tests follow existing codebase patterns and pass successfully
2025-09-18 08:16:56 +02:00
Sameerlite
edf95966c9 Handle consecutive user messages 2025-09-18 10:35:25 +05:30
Krish Dholakia
895c41efa3
Merge pull request #14619 from BerriAI/litellm_dev_09_16_2025_p1
UI - allow team member to view service account keys they create + Anthropic - include cache creation tokens in prompt token total (separate out during cost tracking)
2025-09-17 15:43:04 -07:00
Sameer Kankute
69c01488bd
remove not needed names (#14641) 2025-09-17 14:26:48 -07:00
Sameerlite
1371abf880 add last message as default in gaurdrail 2025-09-17 21:08:19 +05:30
Krish Dholakia
635dc72211
Merge pull request #14604 from Sameerlite/litellm_gemini_api_base_update
Litellm gemini api base update
2025-09-16 22:38:44 -07:00
Krrish Dholakia
8273630e08 test: update tests 2025-09-16 22:30:40 -07:00
Sameer Kankute
ab1fb2b2e7
Add Support for Bedrock Guardrails to supportive selective Guarding (#14575)
* Add Support for Bedrock Guardrails to supportive selective Guarding

* Add method for better handling

* Add guarded_text content type

* Add guarded_text content type

* Update Dockerfile

* Update Dockerfile
2025-09-16 16:43:34 -07:00
Anubhav Singh
a9667e5930
Merge branch 'BerriAI:main' into wandb-inference 2025-09-16 16:46:58 +05:30
Sameerlite
f08fc45a0f add base url support for gemini 2025-09-16 15:15:24 +05:30
Krish Dholakia
f34bbd1f35
Merge pull request #14569 from talesofai/volcengine-fix-thinking-parameters-missing-if-not-set
fix volcengine thinking parameters missing when it set disable
2025-09-15 21:33:31 -07:00
Krish Dholakia
f4e2870490
Merge pull request #14532 from timelfrink/feat/issue-14476-compactifai-provider
Add CompactifAI provider support
2025-09-15 21:15:00 -07:00
LingXuanYin
f8c9009fe5 add more test 2025-09-16 12:11:10 +08:00
Krish Dholakia
e1a6b9f858
Merge pull request #14582 from timelfrink/fix/issue-14573-aws-external-id-support
Add AWS external ID parameter support for Bedrock authentication
2025-09-15 17:32:00 -07:00