Trying to use qwen via Cerebras through Open Router and the tool calls seem to be in a different format than the typsecript agent sdk expects
https://openai.github.io/openai-agents-js/
This is how I try to get it working and I am getting responses just the tool calls are not executed (If I don't use a custom model it works).
return new Agent({
name: config.name,
instructions: systemPrompt,
tools: tools,
model: new OpenAIChatCompletionsModel(
new Cerebras({
apiKey: process.env.OPENROUTER_API_KEY,
baseURL: "https://openrouter.ai/api"
}) as unknown as OpenAI,
'qwen/qwen3-235b-a22b-2507',
),
modelSettings: {
parallelToolCalls: false,
providerData: {
provider: {
only: ["Cerebras"]
}
},
},
});
OpenAI Agents SDK
The OpenAI Agents SDK for TypeScript enables you to build agentic AI apps in a lightweight, easy-to-use package with very few abstractions.