[Bug]: Agent stops working: "The AI service rejected the request due to an error. This could be caused by an invalid API key or an improperly formatted request." #4811
I've built multiple agents with tools (Dalle but also custom tools)
All Chats with various agents get this bug after a while. From that point on such a chat is completely broken.
You must start a new chat, otherwise you will always receive the error.
I cannot pin down what is causing it: Tool usage, long system prompts, or a specific model. For now I think it happens on all cases.
I have the feeling that the issue appears more on longer chats, but I am absolutely not sure about that.
I belive it hast nothing to do with any API key, as it just happens!
Steps to Reproduce
Create Agent with approx. 1000 Token Prompt instruction
Attach any Plugin
Chat for a while
wait for the error
What browsers are you seeing the problem on?
No response
Relevant log output
2024-11-29 13:44:50 error: [api/server/controllers/agents/client.js #sendCompletion] Unhandled error type 400 Invalid value for 'content': expected a string, got null.
2024-11-29 13:44:50 error: [handleAbortError] AI response error; aborting request: 400 Invalid value for 'content': expected a string, got null.
Screenshots
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What happened?
I've built multiple agents with tools (Dalle but also custom tools) All Chats with various agents get this bug after a while. From that point on such a chat is completely broken. You must start a new chat, otherwise you will always receive the error.
I cannot pin down what is causing it: Tool usage, long system prompts, or a specific model. For now I think it happens on all cases. I have the feeling that the issue appears more on longer chats, but I am absolutely not sure about that. I belive it hast nothing to do with any API key, as it just happens!
Steps to Reproduce
What browsers are you seeing the problem on?
No response
Relevant log output
Screenshots
Code of Conduct