[GH-ISSUE #5112] [BUG]: OpenRouter failed message bug #4924

Closed
opened 2026-06-05 14:50:54 -04:00 by yindo · 0 comments
Owner

Originally created by @shatfield4 on GitHub (Mar 2, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5112

Originally assigned to: @shatfield4 on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

When any chat is sent to OpenRouter LLM provider, the message responds but then throws an error on completion of the message:

Cannot read properties of undefined (reading 'finish_reason')

It seems like OpenRouter has changed their chunk response structure causing this error to throw.

Are there known steps to reproduce?

No response

Originally created by @shatfield4 on GitHub (Mar 2, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5112 Originally assigned to: @shatfield4 on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? When any chat is sent to OpenRouter LLM provider, the message responds but then throws an error on completion of the message: `Cannot read properties of undefined (reading 'finish_reason')` It seems like OpenRouter has changed their chunk response structure causing this error to throw. ### Are there known steps to reproduce? _No response_
yindo added the possible bugcore-team-only labels 2026-06-05 14:50:54 -04:00
yindo closed this issue 2026-06-05 14:50:54 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#4924