-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The Feature
import openai
import os
from dotenv import load_dotenv
load_dotenv()
api_key=os.getenv("LITELLM_PROXY_API_KEY"),
api_base=os.getenv("LITELLM_PROXY_API_BASE"),
client = openai.OpenAI(
api_key=api_key,
base_url=api_base
)
model_id = "amazon.titan-embed-g1-text-02"
response = client.embeddings.create(model=model_id, input="What is this")
print(len(response.data[0].embedding))
openai.InternalServerError: Error code: 500 - {'error': {'message': 'litellm.APIConnectionError: Unable to map Bedrock request to provider\nTraceback (most recent call last):\n File "/usr/lib/python3.13/site-packages/litellm/main.py", line 3566, in embedding\n response = bedrock_embedding.embeddings(\n model=model,\n ...<11 lines>...\n extra_headers=extra_headers,\n )\n File "/usr/lib/python3.13/site-packages/litellm/llms/bedrock/embed/embedding.py", line 448, in embeddings\n raise Exception("Unable to map Bedrock request to provider")\nException: Unable to map Bedrock request to provider\n. Received Model Group=amazon.titan-embed-g1-text-02\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '500'}}
Motivation, pitch
This is still a relevant model for bedrock, and has not been deprecated yet
Are you a ML Ops Team?
No
Twitter / LinkedIn details
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request