I just tried to use deepgram/nova-3 and it still doesn't seem to work. Has anyone used it successful
I just tried to use deepgram/nova-3 and it still doesn't seem to work. Has anyone used it successfully so far?
lang field to en or fr. While en works, we get AiError: AiError: Invalid input if we set the lang to fr.messages array with the { role: "tool" } items, it shows me this error:
name in the message element?"pattern": "[a-zA-Z0-9]{9}" makes sense, but it still doesnt work when i put 0s followed by 1mistral_common package is raising an exception: "Unexpected role 'tool' after role 'user'". So the issue was in the appearance of role "tool" after role "user", not in the message object itself? Alright, I guess.
response.message string to the messages array, then after executing the tools adds the { role: "tool" } object(s)... But when the LLM chooses a tool to call it doesn't give a message in the first place


@cf/openai/gpt-oss-120b. is this a known thing? using the completions API:[...] partnered with Leonardo.Ai and Deepgram to bring their latest and greatest models to Workers AI, hosted on Cloudflare’s infrastructure
langenenfrfrAiError: AiError: Invalid input{ role: "tool" }{ role: "tool" }"pattern": "[a-zA-Z0-9]{9}"mistral_commonresponse.message{
"role": "assistant",
"content": "",
"tool_calls": [
{
"type": "function",
"function": {
"name": "getClassRoster",
"parameters": {
"grade": 10,
"classLetter": "A"
}
},
"id": "000000001"
}
]
},@cf/openai/gpt-oss-120bimport { createClient as createOpenAIClient } from "./client";
import type { ChatCompletionMessageParam } from "openai/resources/chat/completions";
export async function callCloudflareAI(
model: string,
messages: ChatCompletionMessageParam[],
options: {
temperature?: number;
max_tokens?: number;
} = {}
): Promise<string> {
const client = createOpenAIClient();
const response = await client.chat.completions.create({
model,
messages,
temperature: options.temperature,
max_tokens: options.max_tokens
});
return response.choices[0]?.message?.content || "";
}{"httpCode":500,"internalCode":3043,"message":"AiError: AiError: Internal server error (40099610-8d16-4868-9093-de9bafb5818f)","name":"AiError","skipSentry":true,"description":"Internal server error"}[wrangler:error] AiError: 3043: Internal server error
at Ai._parseError (cloudflare-internal:ai-api:212:24)
at async Ai.run (cloudflare-internal:ai-api:190:19)
at async runWorker (file:///home/proman4713/JavaScript%20Projects/MawjoodAPI/src/index.js:50:20)
at async jsonError (file:///home/proman4713/.nvm/versions/node/v22.13.1/lib/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
at async drainBody (file:///home/proman4713/.nvm/versions/node/v22.13.1/lib/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)[
{
"role": "system",
"content": "My system prompt goes here."
},
{
"role": "user",
"content": "What's ابراهيم محمد ابراهيم الدسوقي's attendance percentage this year in class 10/A?"
},
{
"role": "assistant",
"content": "",
"tool_calls": [{
"name": "getClassRoster",
"arguments": {
"grade": 10,
"classLetter": "A"
}
}]
},
{
"role": "tool",
"tool_call_id": "000000001",
"name": "getClassRoster",
"content": "{\"data\":[...TheResults]}"
}
][wrangler:error] AiError: 3030: 3 validation errors for ValidatorIterator
0.id
Field required [type=missing, input_value={'name': 'getClassRoster'...10, 'classLetter': 'A'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
0.function
Field required [type=missing, input_value={'name': 'getClassRoster'...10, 'classLetter': 'A'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
0.type
Field required [type=missing, input_value={'name': 'getClassRoster'...10, 'classLetter': 'A'}}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing{
"role": "assistant",
"content": "",
"tool_calls": [
{
"name": "getClassRoster",
"arguments": {
"grade": 10,
"classLetter": "A"
}
}
]
},