-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
When I use Amazon Bedrock as LLM provider, claude-3-7-sonnet as LLM model.
I got an error: TypeError: Cannot read properties of undefined (reading 'id') when using litellm OpenAI-Compatible Endpoints, the root cause is tool_calls start from 1, it lead to an incorrect array [undefined, {tool_call_object}], then raise the error then (array[0].id)
tool_calls index should always starts from 0 rather than 1
Relevant log output
{
"id": "chatcmpl-8cff77bc-ccea-4b88-a61a-e89d750fe236",
"created": 1749546275,
"model": "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
"object": "chat.completion.chunk",
"choices": [
{
"index": 0,
"delta": {
"content": "",
"role": "assistant",
"tool_calls": [
{
"id": "tooluse_9116K8c5Q8ivMmdx3VdS7g",
"function": {
"arguments": "",
"name": "jira_get_issue"
},
"type": "function",
"index": 1
}
]
}
}
],
"provider_specific_fields": {}
}
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
v1.71.1-stable
Twitter / LinkedIn details
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working