* add: generic object pool & tests
Introduced a reusable object pool that can be applied across the codebase.
Note: memory growth is managed via eviction settings—using a hard cap could
reduce performance, so eviction is the preferred safeguard.
* fix: simpler tests
* fix: avoid redundant __init__ calls on hot path
Previously, imports on the request hot path caused __init__ to run
excessively for every request. This change ensures initialization
happens once, reducing cpu overhead.
* fix: remove redundant __init__ import
The current implementation no longer requires an import at the top of the function.
* fix: placed on core utils for future reuse
* test: add coverage & remove inline import
A general import-checking tool across all endpoints would be a large PR.
This commit focuses on a smaller, targeted fix for the discussed case.
* added import check to CI
- Add encoding_format parameter to supported parameters table
- Document float and base64 encoding format options
- Add usage examples for both encoding formats
- Update parameter documentation for amazon.titan-embed-text-v2:0
- 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
- Add encoding_format to supported OpenAI parameters list
- Implement encoding_format to embeddingTypes parameter mapping
- Map 'float' to ['float'] and 'base64' to ['binary'] formats
- Handle response with proper fallback: binary > float > embedding field
- Support both float and binary response formats per AWS documentation
Fixes#14685 - UnsupportedParamsError when using encoding_format with Titan V2
- Add embeddingTypes parameter to AmazonTitanV2EmbeddingRequest
- Add embeddingsByType response field for binary format support
- Update type hints for enhanced embedding response handling