-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
What happened?
After an API request fails, switching the model and sending a new message does not clear the previous error message. It remains displayed on the interface.
Steps to reproduce:
- Send a request that triggers an API error (e.g., quota exceeded, model unavailable)
- The error message is displayed with "Press Ctrl+Y to retry" hint
- Use
/modelcommand to switch to another model - Send a new request, which succeeds this time
- The previous error message is still visible and was not cleared
Root cause:
In useGeminiStream.ts, the submitQuery function has incomplete condition check when clearing old errors:
// Problematic code (line 1084)
if (pendingRetryCountdownItemRef.current) { // Only checks countdown, not error
clearRetryCountdown();
}When the error does not trigger an auto-retry countdown (only showing a static "Press Ctrl+Y to retry" hint), pendingRetryCountdownItemRef.current is null, so clearRetryCountdown() is never called.
What did you expect to happen?
When switching models and sending a new message, the previous error message should be cleared, and only the new request result should be displayed.
Client information
Client Information
$ qwen /about
╭──────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ 状态 │
│ │
│ Qwen Code 0.11.0 (a31cf757) │
│ 运行环境 Node.js v22.22.0 / npm 10.9.4 │
│ IDE 客户端 VS Code │
│ 操作系统 darwin arm64 (24.1.0) │
│ │
│ 认证 openai (custom endpoint) │
│ 模型 pai/glm-5 │
│ 会话 ID 7dbaf372-8d51-4f23-a9bd-ade69279f7b4 │
│ 沙箱 no sandbox │
│ 代理 no proxy │
│ 内存使用 275.3 MB │
╰──────────────────────────────────────────────────────────────────────────────────────╯Login information
Using OpenAI compatible API endpoint.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels