[Bug]: Experimental Agents broken with custom endpoints
returnofblank opened this issue · comments
What happened?
Note: This is only tested with OpenRouter, this may not apply to other custom endpoints. Unfortunately I do not have the resources to try with something else.
When choosing a custom endpoint in the agent creation menu, and then choosing a model (any model from what I found), exiting out will lead to this error.
Unexpected Application Error!
n.toLowerCase is not a function
i_@https://mydomain.example/assets/index.DOfEXLPm.js:3128:22877
A7@https://mydomain.example/assets/vendor.BujiSg_e.js:38:19557
Qee@https://mydomain.example/assets/vendor.BujiSg_e.js:40:44171
zee@https://mydomain.example/assets/vendor.BujiSg_e.js:40:39879
pSe@https://mydomain.example/assets/vendor.BujiSg_e.js:40:39802
v2@https://mydomain.example/assets/vendor.BujiSg_e.js:40:39648
j$@https://mydomain.example/assets/vendor.BujiSg_e.js:40:36004
iB@https://mydomain.example/assets/vendor.BujiSg_e.js:40:36809
Kf@https://mydomain.example/assets/vendor.BujiSg_e.js:38:3288
Vo/<@https://mydomain.example/assets/vendor.BujiSg_e.js:40:34324
I have no concrete theory as to what is causing this. But I assume something on the front end is passing a broken input to the chatCompletion
function at api/server/controllers/agents/client.js
since the error appears in the logs.
Again, this theory is mostly baseless. I unfortunately do not have the time to go more in depth, as I wish to rewatch The Orville at this moment, not make another issue.
Steps to Reproduce
- Create a custom endpoint (for me, OpenRouter)
- Under the Model option, choose the custom endpoint provider
- Set the actual model to anything, not sure it matters
- Click the back arrow to return to the previous screen
- Error will appear
What browsers are you seeing the problem on?
No response
Relevant log output
2024-10-02T02:03:46.493Z debug: [api/server/controllers/agents/client.js] chatCompletion
{
baseURL: undefined,
// 1 payload(s)
payload: [{"role":"user","content":"\nUnexpected Application Error!\nn.toLowerCase is not a function\ni_@ht... [truncated]],
}
Screenshots
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
I will confirm that I had the issue. I use custom and litellm as a backend.