* fix: ensure /responses/cancel works for non admins
* test: cancel endpoint
* fix responses API cancel endpoint
* test fix
* TestGoogleAIStudioResponsesAPITest
- 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
* 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
- 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
- Keep CompactifAI provider detection logic
- Include new OVHCloud provider from main branch
- Both providers now work correctly with model prefix detection
- Update all model references from llama-2-7b-compressed to cai-llama-3-1-8b-slim
- Move CompactifAI tests from tests/llm_translation to tests/test_litellm/llms/compactifai/
- Update documentation examples to use the new model name
- Remove integration test inheritance to make tests pure mock tests
This addresses review feedback to use mock tests and updated model naming.
- Test basic and streaming completions with proper mocking
- Cover authentication, parameter handling, and error scenarios
- Test provider detection and async functionality
- Verify request headers and response transformation
- Follow LiteLLM testing patterns with respx/httpx mocking
- Ensure full compatibility with OpenAI-style responses
* Use _PROXY_MaxParallelRequestsHandler_v3 by default (#14352)
(cherry picked from commit f3fa45cf8fbd5f5cce2f45a7312776d5005fb08e)
(cherry picked from commit 5b680bb4a3)
* Use random api_key for parallel requests test
* Fix off-by-one error in parallel request rate limit
The rate limiter was incorrectly rejecting requests when the limit was met, but not exceeded. The check in `is_cache_list_over_limit` was `int(counter_value) + 1 > current_limit`, which caused the first request to be rejected if the limit was 1.
This commit removes the `+ 1`, changing the logic to `int(counter_value) > current_limit`. The check now correctly allows requests up to the specified parallel limit.
* Test actual parallel requests
* Ensure rate limiting works correctly for multiple users
* Add sequential rate-limit test
* Revert random key usage
- Change default API key from space ' ' to 'fake-api-key'
- Fixes httpcore.LocalProtocolError: Illegal header value b'Bearer '
- Maintains compatibility with explicit API keys and environment variables
- Add comprehensive tests for provider info retrieval
Fixes#14502
* Draft commit.
* user header mapping feature with backward compatibility with user_header_name field.
* user header mapping feature with backward compatibility with user_header_name field optimizations.
* Added unit tests.