Yes, both the tool result and the tool call need to be included as a message.
Yes, both the tool result and the tool call need to be included as a message.
unshift adds the system message to the start of the arraytool_calls instead of string content: https://platform.openai.com/docs/api-reference/chat/createX
•7/22/25, 8:52 PM
allminiLmv6 in cloudflare workers ai.



{"errors":[{"code":7000,"message":"No route for that URI"}]} and {"code":2002,"message":"Internal server error"}

{
"role": "assistant",
"tool_calls": [
{
"id": "039920ecd55b4b5ba689d692933602cc",
"function": {
"name": "Query Vector Database",
"arguments": "{\"Query\": \"joe\"}"
},
"type": "function"
}
],
"content": ""
}✘ [ERROR] Uncaught (in promise) InferenceUpstreamError: 10000: Authentication error
at _parseError (cloudflare-internal:ai-api:107:24)