You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An LLM error that states its own cause is also told to check the config file #2681
When a provider refuses a request and writes down why, the daemon reports that sentence and then appends a generic remedy anyway.
The error frame in _run_tool_loop (emrg/server/daemon.py) appends . Check config at ~/.emrg/config.toml to every LLM error except a content-filter refusal, which has its own arm. Since llm.py began extracting the provider's own sentence (provider_error_message, for a JSON body carrying error.message), refusals arrive already answered — and still collect the advice:
The account is empty; the configuration is fine. One remedy is printed for every cause, so the actionable half of the message competes with a pointer that sends the host to a file that was never wrong. The same holds for an invalid key, a rate limit or an unknown model: each arrives with its own sentence, and each is currently also told to check the config.
Expected
A refusal that states its cause is printed as that sentence, with no generic remedy appended. A failure that says nothing about its cause keeps the pointer — that is exactly when a host needs to know where the configuration lives.
What a fix must satisfy
The question is a predicate in llm.py, beside the extraction it belongs to (the is_overlong_error shape), never re-derived from the message's spelling at the daemon call site.
Both raise paths mark it.chat() and chat_stream() each compose a refusal sentence, and the tool loop takes the streaming one while the summariser takes the other.
The content-filter arm keeps its behaviour and its logging: its abort-run count is keyed to that case, and the new case must not fall into it.
Two guards, one each way. With the predicate ignored, the "stated cause" arm goes red; with the advice removed wholesale, the "a silent failure keeps the pointer" arm goes red.
Activity
argszero commentedon Nov 3, 2026
Handled by #2682