Commit graph

8121 commits

Author SHA1 Message Date
Alexsander Hamir
8d96626044
fix: iscoroutine removed from hot path +50 RPS (#14649)
* fix: iscoroutine removed from hot path

* fix: replace all instances & separate concerns

1. Replaced all instances of iscoroutine with is_async_callable
2. Place the coroutine checker in its own file

* fix: PR comment changes

* fix: missing config setting declaration

* fix: revert non-performance related changes

* fix: revert to initial implementation

* fix: remove dead const
2025-09-17 19:01:43 -07:00
Krrish Dholakia
7a1f723751 test: update test 2025-09-17 18:00:59 -07:00
=
40fa415c89 added test for updating in memory guardrails 2025-09-17 18:00:59 -07:00
Krrish Dholakia
fc18f4decf test: add unit testing 2025-09-17 18:00:59 -07:00
Krrish Dholakia
4276d78169 test: fix test on ci/cd 2025-09-17 18:00:58 -07:00
Krrish Dholakia
00d8dedd16 test: update test 2025-09-17 17:44:14 -07:00
Krish Dholakia
44e0c730b9
Merge pull request #14653 from ARajan1084/in-memory-guardrail-fix
fix: In Memory Guardrail fails to update
2025-09-17 17:42:23 -07:00
Krrish Dholakia
adc71ad2e7 fix(langsmith.py): add langsmith_sampling_rate as a dynamic param
Closes LIT-879
2025-09-17 17:32:26 -07:00
=
268b984cb6 added test for updating in memory guardrails 2025-09-17 17:16:49 -07:00
Krish Dholakia
f51003538a
Merge pull request #14650 from BerriAI/litellm_dev_09_17_2025_p1
Bedrock Guardrails - support setting bedrock runtime endpoint + Protect `/health/test_connect` to prevent users without model creation permissions from calling it
2025-09-17 16:55:53 -07:00
Krrish Dholakia
1954bbffc0 test: fix test on ci/cd 2025-09-17 16:53:07 -07:00
Krrish Dholakia
2f45c7ffd3 feat(anthropic/chat/transformation.py): account for 1h vs. 5m cache creation token cost difference
Closes LIT-907
2025-09-17 16:16:20 -07:00
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
Krrish Dholakia
530662d735 test: add unit testing 2025-09-17 14:54:44 -07:00
Sameer Kankute
69c01488bd
remove not needed names (#14641) 2025-09-17 14:26:48 -07:00
Krrish Dholakia
08ba38adeb test: update unit test 2025-09-17 14:23:13 -07:00
Sameerlite
1371abf880 add last message as default in gaurdrail 2025-09-17 21:08:19 +05:30
Fabrício Ceschin
9fdbdaf846
Merge branch 'BerriAI:main' into LangfuseUsageDetails 2025-09-17 09:36:08 -04:00
Krish Dholakia
bf0dd4a284
Merge pull request #14418 from iabhi4/deep-copy-issue
fix: avoid deepcopy crash with non-pickleables in Gemini/Vertex
2025-09-16 22:55:31 -07:00
Krish Dholakia
2563c0ab2d
Merge pull request #14534 from hula-la/fix/response-api-bugfixes
fix: improve response api handling and cold storage configuration
2025-09-16 22:46:03 -07:00
Krish Dholakia
fcf84027e8
Merge pull request #14555 from mubashir1osmani/dd_spend_metric
DataDog shows spend metrics
2025-09-16 22:44:47 -07:00
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
Krish Dholakia
6bccdcd530
Merge pull request #14620 from BerriAI/litellm_dev_09_16_2025_p2
(feat) Anthropic - document pricing for cache creation tokens above 1hr
2025-09-16 22:33:11 -07:00
Krrish Dholakia
8273630e08 test: update tests 2025-09-16 22:30:40 -07:00
Mubashir Osmani
0fde408e35
added langfuse logging for responses api (#14597)
* added langfuse logging for responses api

* tests added
2025-09-16 21:43:19 -07:00
mubashir1osmani
e56b11cb54 added tests 2025-09-17 00:19:03 -04:00
Krrish Dholakia
22d3e492f9 fix(test_utils.py): fix test 2025-09-16 19:17:44 -07:00
Krrish Dholakia
e735808614 test(test_utils.py): fix cache creation tokens 2025-09-16 19:03:16 -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
32f634e305 test: add unit testing 2025-09-16 16:54:03 -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
Fabrício Ceschin
2a3d84e4be
Merge branch 'BerriAI:main' into LangfuseUsageDetails 2025-09-16 09:26:52 -04: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
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
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
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
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
Fabrício Ceschin
c5aa6f540f
Merge branch 'BerriAI:main' into LangfuseUsageDetails 2025-09-15 15:51:38 -04: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
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
Fabrício Ceschin
ca880f95f7
Merge branch 'BerriAI:main' into LangfuseUsageDetails 2025-09-15 10:53:03 -04: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