Endpoint Error when message.content not a string #5999
Unanswered
Kristovich
asked this question in
Troubleshooting
Replies: 1 comment 5 replies
-
Hi, thanks for the report. You're going to have issues when you switch from a model that supports tool-calling, to one that doesn't, using the same agent configuration (in this case, adding the Google tool). We can't always know all the models that support tools or don't support them, so this is not something we can mitigate programmatically. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Minimal Reproduction Using OpenRouter:
This will fail with
error: [handleAbortError] AI response error; aborting request: Provider returned error
A message history with a tool call also fails when using other openrouter llms, I guess it depends on whether the underlying provider supports it.
I was also able to get it to fail natively using the Perplexity Provider in LibreChat. Google, OpenAi, and Anthropic work properly.
I've narrowed it down; some providers doesn't like message.content to be anything other than a string.
Try it yourself using curl, or postman or something:
POST to
https://openrouter.ai/api/v1/chat/completions
Yields
Whereas
Yields
I was able to mostly fix it (Still fails on perplexity):
node_modules/@librechat/agents/node_modules/@langchain/openai/dist/chat_models.cjs
Version Information
Steps to Reproduce
What browsers are you seeing the problem on?
Firefox
Relevant log output
Screenshots
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions