Add support for /embeddings endpoint via Vercel AI Gateway.
Closes#19658
Changes:
- Add VercelAIGatewayEmbeddingConfig in litellm/llms/vercel_ai_gateway/embedding/
- Register provider in utils.py and main.py
- Add unit tests for embedding transformation
- Update documentation with embeddings examples
Usage:
```python
from litellm import embedding
response = embedding(
model="vercel_ai_gateway/openai/text-embedding-3-small",
input="Hello world",
api_key="your-api-key"
)
```
* Fix: SSO user roles are not updated for existing users
Fixes#19620
* Refactor: Remove redundant user_info retrieval in SSOAuthenticationHandler
* Test: add new tests for user creation and updates in get_user_info_from_db
Fixes#19508
The cost calculation for gpt-image-1.5 was not including image tokens
from output_tokens_details, causing costs to be underreported
(e.g., $0.046 instead of $0.14).
Root cause: The OpenAI image generation API uses Responses API naming
(input_tokens, output_tokens, output_tokens_details) but the cost
calculator expected Chat Completions API naming (prompt_tokens,
completion_tokens, completion_tokens_details).
Changes:
- convert_dict_to_response.py: Map Responses API fields to Chat
Completions API fields and convert dicts to wrapper objects
- cost_calculator.py: Use usage directly if already transformed,
avoiding double transformation that lost the wrapper objects
- Added test for gpt-image-1.5 output image token cost calculation
* Enhance error handling for num_retries in Router class to support string values. Add test case to verify conversion from string to int for deployment num_retries.
* Refactor Router class for improved readability by formatting long lines and enhancing exception handling tests for num_retries. Ensure consistent style in test cases for better maintainability.
* Update exception handling for num_retries in Router class to suppress mypy warnings. Add type ignore comment for clarity in type conversion from string to int.
* added support for nova grounding for amazon nova model
* added citations support
* added integration tests
* removing test file
* refactor: Use web_search_options for Nova grounding instead of system_tool
---------
Co-authored-by: Juhie <juhiechandra@gmail.com>
Co-authored-by: Juhie <75068056+juhiechandra@users.noreply.github.com>