Skip to content

[BUG]: Inference does not stop when clicking away from active session #5905

Description

@gregtakacs

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

This had been reported before, but closed, however I could repro this issue on 1.14.1 just today using LM Studio as the model provider.

#2640

If you move from an active chat it closes the connection (this in and of itself is a dubious design decision without real benefit) however the inference does not stop on the other end and it keeps generating tokens into thin air. While this may be a nuisance on a local LLM provider it can be a costly API issue using remote frontier API tokens.

This is a very serious bug.

Are there known steps to reproduce?

set up LM Studio and use it as the model provider in AnythingLLM. Ask an agent question then click away and back. Notice that the question as well as the inference progress is gone in the chat. Go to the server side of LM Studio and observe that there is a active token process still generating tokens.

LLM Provider & Model (if applicable)

LM Studio with qwen/qwen3.6-35b-a3b

Embedder Provider & Model (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    possible bugBug was reported but is not confirmed or is unable to be replicated.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions