Tool calling broken with OpenRouter #342
Replies: 2 comments 2 replies
-
|
I had the same issue with OpenRouter. The only way I was able to get it to work is by using the OpenAI adapter and changing the const adapter = createOpenaiChat(
"openrouter/auto",
process.env.OPENROUTER_API_KEY!,
{
baseURL: "https://openrouter.ai/api/v1",
}
); |
Beta Was this translation helpful? Give feedback.
-
|
I've hit similar issues before. When tool execution silently breaks, debugging can be pretty painful, especially outside the React/devtools setup. I usually start by logging the raw messages exchanged with the model and verifying that the provider is actually returning valid tool calls instead of just emitting stream events. On a related note, I've been looking at https://github.com/FailproofAI/failproofai which focuses on catching runtime agent failures like loops and repeated errors. Different problem, but having extra visibility into agent execution has been really helpful when tracking down issues like this. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Whenever I tried to use
ai-openrouterwith an OpenAI model tool calling is broken, especially the loop functionallity. I see theinput_completemessage in the frontend stream, but the tool execute function is never called and returned to the llm. Switching toai-openaieverything works as docs say. I really like what you are building, but the docs are up to date and it seems like even official adaptes don't work. Also what is a way to debug is in when not using react or the devtools, I was adding logs to thenode_modulesfolder 🤔Beta Was this translation helpful? Give feedback.
All reactions