* 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
* 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.
Allow passing aiohttp.ClientSession to acompletion() calls for better
performance and resource management. Includes debug logging, tests,
and documentation. Backward compatible.
- 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
- 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
- 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
- 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
- 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
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)
- 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