-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
investigatingCore team or maintainer will or is currently looking into this issueCore team or maintainer will or is currently looking into this issuepossible bugBug was reported but is not confirmed or is unable to be replicated.Bug was reported but is not confirmed or is unable to be replicated.
Description
How are you running AnythingLLM?
AnythingLLM desktop app
What happened?
GPT-5 family models does not support message.role = "function". AnythingLLM uses it and the request to OpenAI crashes with 400 Unsupported value.
Here are logs:
[backend] info: [AgentHandler] [debug]: @agent is attempting to call `web-scraping` tool
[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[collector] info: -- Working URL https://docs.anythingllm.com/installation-desktop/debug => (text) --
[Electron:Collector] Page Content loaded - cleaning up timers
[Electron:Collector] Scraping page content as text
[collector] info: Cleaning up request handler for request ID.
[backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-5-mini
[backend] error: error: 400 Unsupported value: 'messages[2].role' does not support 'function' with this model. Error: 400 Unsupported value: 'messages[2].role' does not support 'function' with this model.
at r.complete (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:313:8244)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Dl.handleExecution (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:332:406)
at async Dl.handleExecution (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:332:1345)
at async Dl.reply (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:332:274)
at async Dl.chat (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:313:46286)
at async Dl.start (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:313:45720)
at async aK (/Applications/AnythingLLM.app/Contents/Resources/backend/server.js:369:2717)
at async /Applications/AnythingLLM.app/Contents/Resources/backend/server.js:369:2243
[backend] info: [AgentHandler] End 4292d7b4-6a9e-477e-af0b-6362b6fa756a::openai:gpt-5-mini
This discussion suggests that GPT-5 family models changed the API and are now using "tool" as message type for tool calls, not "function".
Are there known steps to reproduce?
- Set GPT-5 / GPT-5-mini (I guess even GPT-5-nano) as model
- Send this message:
@agent Collect the text of this page: https://docs.anythingllm.com/installation-desktop/debug(or any other tool call)
(Older models like GPT-4.1 work fine.)
PierreB40
Metadata
Metadata
Assignees
Labels
investigatingCore team or maintainer will or is currently looking into this issueCore team or maintainer will or is currently looking into this issuepossible bugBug was reported but is not confirmed or is unable to be replicated.Bug was reported but is not confirmed or is unable to be replicated.