Commit graph

25119 commits

Author SHA1 Message Date
Krrish Dholakia
22d3e492f9 fix(test_utils.py): fix test 2025-09-16 19:17:44 -07:00
Krrish Dholakia
c1a33dcc5f fix(types/utils.py): add cache_creation_input_token_cost_above_1hr to modelinfobase 2025-09-16 19:15:26 -07:00
Krrish Dholakia
e735808614 test(test_utils.py): fix cache creation tokens 2025-09-16 19:03:16 -07:00
Krrish Dholakia
97cc5f55d6 build(model_prices_and_context_window.json): add claude-3-5 haiku, claude-3-5 sonnet, claude-opus 3, claude-haiku 3 "cache_creation_input_token_cost_above_1hr" pricing 2025-09-16 18:58:49 -07:00
Krrish Dholakia
3188ae9281 build(model_prices_and_context_window.json): add claude-opus-4, claude-3-7-sonnet, claude-sonnet-4 "cache_creation_input_token_cost_above_1hr" pricing 2025-09-16 18:56:24 -07:00
Krrish Dholakia
a2bfd3e476 build(model_prices_and_context_window.json): add claude-opus-4-1 "cache_creation_input_token_cost_above_1hr" pricing 2025-09-16 18:53:56 -07:00
Krrish Dholakia
0fa11c3c25 build(model_prices_and_context_window.json): add "cache_creation_input_token_cost_above_1hr" to all claude-3-5-sonnet models 2025-09-16 18:52:37 -07:00
Krrish Dholakia
1c855385c9 build(model_cost): add cache_creation_input_token_cost_above_1hr pricing 2025-09-16 18:43:57 -07:00
Krrish Dholakia
0341e7fc09 fix: fix test 2025-09-16 18:34:24 -07:00
Krrish Dholakia
e488312873 fix(utils.py): log cache_creation_tokens in prompt token details
Closes LIT-907
2025-09-16 18:24:10 -07:00
Krrish Dholakia
1162c52692 fix(anthropic/chat/transformation.py): include cache creation token count in final prompt token value
Closes LIT-907
2025-09-16 17:52:12 -07:00
Krrish Dholakia
32f634e305 test: add unit testing 2025-09-16 16:54:03 -07:00
Krrish Dholakia
e69d9fde8a fix(key_management_endpoints.py): include created by keys in /key/list
Allow user to see service account keys they've created

Fixes https://github.com/BerriAI/litellm/issues/14183
2025-09-16 16:47:25 -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
Ishaan Jaffer
7de8811c4c test 2025-09-16 16:33:10 -07:00
Alexsander Hamir
02db2e8ae8
[Performance] RPS Improvement +500 RPS when sending the user field (#14616)
* perf tool

* fix: cache type issue

* fix: exception hanging & cache setting

1. Removed unhandled exceptions
2. Set cache value to dict
2025-09-16 16:18:23 -07:00
Ishaan Jaffer
68105ce1a7 fix type 2025-09-16 15:41:52 -07:00
Ronald Pereira
0f5ab261df
Fix error message for missing OCI parameters 2025-09-16 16:37:22 -03:00
Sameerlite
5b896d2757 make model param optional 2025-09-16 15:47:23 +05:30
Sameerlite
573230348d fix lint error 2025-09-16 15:21:48 +05:30
Sameerlite
f08fc45a0f add base url support for gemini 2025-09-16 15:15:24 +05:30
mubashir1osmani
a2d5bde837 changed docs 2025-09-16 00:58:08 -04:00
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
3f90fe938d
Merge pull request #14514 from iabhi4/fix-13581
feat(proxy): Assign default budget to auto-generated JWT teams
2025-09-15 21:22:25 -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
mubashir1osmani
f5f00043ce fixed tests 2025-09-16 00:14:48 -04:00
Krish Dholakia
e368a0895f
Merge pull request #14542 from uc4w6c/fix/mcp-server-delete-refresh
fix: recompute filters after deleting an MCP Server
2025-09-15 21:12:55 -07:00
LingXuanYin
f8c9009fe5 add more test 2025-09-16 12:11:10 +08:00
Krish Dholakia
784eb18366
Merge pull request #14558 from iabhi4/fix-14536
fix(proxy): Correctly parse multi-part MCP server aliases from URL paths
2025-09-15 21:05:22 -07:00
Krish Dholakia
9d2cce43ba
Merge pull request #14583 from pazevedo-hyland/fix/bedrock_convert_layer
Fix: handle empty arguments in Bedrock tool call invocation
2025-09-15 20:57:45 -07:00
Ishaan Jaff
8e22cf5d65
[Fix] /responses API - add cancel endpoint + allow non-admins to use this as an llm api endpoint (#14594)
* fix: ensure /responses/cancel works for non admins

* test: cancel endpoint

* fix responses API  cancel endpoint

* test fix

* TestGoogleAIStudioResponsesAPITest
2025-09-15 18:49:54 -07: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
Ishaan Jaffer
eb3e159b7c docs update 2025-09-15 17:22:03 -07:00
Tim Elfrink
afd720a62f Fix CompactifAI provider tests and implementation
- Add missing provider_config parameter in main.py for proper HTTP handler integration
- Update tests to use correct respx mocking pattern with litellm.disable_aiohttp_transport
- Add get_error_class method to CompactifAI transformation for proper error handling
- Fix authentication error test to expect APIConnectionError instead of AuthenticationError
- All 8 CompactifAI tests now pass successfully
2025-09-15 22:03:42 +02:00
Tim Elfrink
9d7942eb35
Fix: Vertex AI Gemini labels field provider-aware filtering (#14563)
* Add comprehensive tests for Vertex AI Gemini labels provider filtering

- Test Google GenAI endpoints exclude labels even when explicitly provided
- Test Vertex AI endpoints include labels when provided
- Cover provider detection logic for different endpoint URLs
- Verify metadata-to-labels conversion only happens for Vertex AI
- Ensure edge cases are handled properly (null/empty api_base)

* Fix Vertex AI Gemini labels field provider-aware filtering

- Add _is_google_genai_endpoint() function to detect Google GenAI vs Vertex AI endpoints
- Update _transform_request_body() to accept api_base parameter
- Only include labels field for Vertex AI endpoints (not Google GenAI)
- Pass api_base through sync/async transform functions
- Maintain backward compatibility with existing usage
- Fixes issue where Google GenAI requests failed with unsupported labels field

* Refactor labels filtering to use custom_llm_provider instead of URL parsing

Replace URL-based endpoint detection with custom_llm_provider parameter
checking for cleaner, more reliable provider identification.

Changes:
- Remove _is_google_genai_endpoint() helper function
- Update labels condition to use custom_llm_provider != "gemini"
- Remove api_base parameter from _transform_request_body()
- Simplify sync/async transform function signatures
- Update tests to reflect new parameter structure
- Remove obsolete test_provider_detection test

This approach aligns with existing codebase patterns where
custom_llm_provider="gemini" identifies Google AI Studio endpoints
that don't support labels, while vertex_ai/vertex_ai_beta identify
Vertex AI endpoints that do support labels.

* Use LlmProviders.GEMINI constant instead of hardcoded string
2025-09-15 12:43:07 -07:00
Mubashir Osmani
321d5299b2
s3_endpoint_url returned 404 (#14559)
* added spend metrics

* feat: Add Spend metrics in datadog

* fix: lint errors

* fix: s3 endpoint url logging

* fixed lint errors

* remove from branch

This reverts commit e123cae06e.

* Remove from branch

This reverts commit e694cc102a.

* remove "added spend metrics"

This reverts commit 6156590190.
2025-09-15 12:08:18 -07:00
Ishaan Jaff
cebacd65cf
[Bug Fix] SCIM v2 - ensure group PUSH and PUT ops allow creating non-existent members (#14581)
* fix: scim handle non existent members

* test - scim v2

* test fix

* fix: NewUserResponse
2025-09-15 11:27:05 -07:00
pazevedo-hyland
6558156642 Fix: handle empty arguments in Bedrock tool call invocation 2025-09-15 19:23:39 +01:00
Tim Elfrink
5bd94cccb9 Add AWS external ID parameter support for Bedrock authentication
- Add aws_external_id to authentication parameters list
- Update get_credentials method to accept and propagate external ID
- Modify all STS assume_role calls to conditionally include ExternalId parameter
- Support both assume_role and assume_role_with_web_identity flows
- Handle IRSA cross-account and same-account role assumption scenarios
- Add external ID support to Bedrock Converse API authentication
- Maintain full backward compatibility with existing authentication flows
- Support AWS_EXTERNAL_ID environment variable

Fixes cross-account role assumption security requirements per AWS best practices.
2025-09-15 19:57:04 +02:00
Tim Elfrink
f6ff7042ba Add comprehensive tests for AWS external ID support
- Test external ID parameter propagation through authentication chain
- Cover both standard Bedrock and Converse API authentication flows
- Verify assume_role STS calls include ExternalId when provided
- Ensure backward compatibility when external ID not specified
- Add specific test for BedrockConverseLLM parameter extraction
- Extend existing dynamic parameter tests to include aws_external_id
2025-09-15 19:56:31 +02:00
Tim Elfrink
30c3e7b3d3
Fix: Bedrock cross-region inference profile cost calculation (#14566)
* Add tests for Bedrock cross-region inference profile mapping

- Test model mapping lookup works correctly
- Test proxy cost calculation scenario reproduces original issue
- Verify cost calculation returns expected values
- Ensure compatibility with existing test patterns

* Fix Bedrock cross-region inference profile cost calculation

- Add mapping for bedrock/us.anthropic.claude-3-5-haiku-20241022-v1:0
- Sync backup file for local testing consistency
- Resolve proxy spend tracking failures for cross-region profiles
- Maintain identical configuration with standalone profile

Fixes #14458
2025-09-15 07:10:20 -07:00
Sameer Kankute
110ce543c2
[Feat]Add cancel endpoint support for openai and azure (#14561)
* Add cancel endpoint support for openai
 and azure

* fix lint error

* fix cancel url contruction azure

* readd changes
2025-09-15 07:08:56 -07:00
Sameer Kankute
7fd6e62570
Fix unsupported stop param for grok-code models (#14565) 2025-09-15 07:00:54 -07:00
LingXuanYin
df5db48c3c fix bug 2025-09-15 17:20:30 +08:00
LingXuanYin
c9e1088fda update docs 2025-09-15 16:17:09 +08:00
LingXuanYin
3bbe09ceb9 update test volcengine 2025-09-15 14:03:15 +08:00
LingXuanYin
bf7868bb0e fix volcengine thinking parameters missing if set disable
update test volcengine
2025-09-15 13:15:05 +08:00
soojin
1585f5b920 fix: add exception handling for logger retrieval in cold storage object key generation
- Wrap get_active_custom_logger_for_callback_name call in try-except block
- Gracefully handle cases where logger instance cannot be retrieved
- Fall back to empty s3_path when logger lookup fails
- Prevents crashes when cold storage logger is misconfigured or unavailable
2025-09-15 09:12:27 +09:00
iabhi4
4ba3a21042 fix(proxy): Correctly parse multi-part MCP server aliases from URL paths 2025-09-14 15:17:08 -07:00
Tim Elfrink
9521414efa Resolve merge conflict by including both CompactifAI and OVHCloud providers
- Keep CompactifAI provider detection logic
- Include new OVHCloud provider from main branch
- Both providers now work correctly with model prefix detection
2025-09-14 23:03:18 +02:00