* 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
- Update tool call index logic to assign sequential indices when missing
- Replace default index=0 behavior with proper sequential assignment
- Maintain OpenAI API compatibility with correct tool call indexing
- Preserve existing behavior for tool calls with explicit indices
- Universal fix benefiting all providers using Delta class
- Test multiple tool calls without explicit indices receive sequential indices
- Verify Delta class assigns indices 0, 1, 2... instead of defaulting all to 0
- Add comprehensive assertions for tool call details preservation
- Cover provider-agnostic streaming response scenarios
- 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.
- 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
- Replace naive model.split('.')[0] with ARN-aware provider detection
- Use existing get_bedrock_invoke_provider() method for inference profile ARNs
- Filter model_id parameter to prevent 'extraneous key' API errors
- Support ARN format: arn:aws:bedrock:region:account:application-inference-profile/id
- Support cross-region format: us.amazon.nova-canvas-v1:0
- Maintain backward compatibility with regular amazon.nova-canvas-v1:0 format
- Test ARN format inference profile model detection
- Test model_id parameter filtering to prevent API errors
- Test cross-region inference profile format support
- Ensure backward compatibility with regular Nova Canvas models
- Cover both request body generation and parameter transformation
- 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
- 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.