fix(core,web): retry transport and quota LLM errors, disable dead sessions on auth failure (#82)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Yaowei Zheng
2026-07-27 22:29:16 +08:00
committed by GitHub
parent c369e089a7
commit 3d3495528c
54 changed files with 2278 additions and 161 deletions
+25
View File
@@ -234,6 +234,13 @@ export interface ModelsResponse {
defaultModel?: ModelRefDto;
/** Vision model used as a proxy reader for read_image (describes images when the session model has vision=false). */
visionModel?: ModelRefDto;
/**
* When the Project's model/credential config last changed (ISO; the config file's mtime,
* so it survives restarts). The web's auth-dead gate compares it against the last auth
* abort: an abort OLDER than the last credential update no longer disables the composer
* (the key was fixed since). Absent when the Project has no config file yet.
*/
updatedAt?: string;
models: ModelInfo[];
}
@@ -609,6 +616,16 @@ export interface ApprovalDecisionRequest {
decision: "allow" | "deny";
}
/**
* POST /api/sessions/:sessionId/retry-now — skip the in-progress reconnect backoff and
* fire the next retry immediately (the "retry now" button on the reconnect countdown).
* `skipped: false` is the benign "no reconnect wait in progress" case (idle session, or
* the wait elapsed in a timing race), not an error.
*/
export interface RetryNowResponse {
skipped: boolean;
}
// ---------------------------------------------------------------------------
// SSE server events (OmniMessage uses the default event, only server_event here)
// ---------------------------------------------------------------------------
@@ -626,6 +643,14 @@ export type ServerEvent =
| { type: "session_title"; sessionId: string; title: string }
/** Last-Event-ID has been evicted from the buffer: the frontend should re-fetch the history endpoint before continuing to consume this connection. */
| { type: "resync_required" }
/**
* The Project's model credentials changed (PUT /models): cached runtimes have been
* invalidated server-side, so an auth-dead Session can continue — the frontend clears
* its auth-dead composer state immediately. Published to every existing Session channel
* of the Project; tabs without a live channel learn the same fact from the models
* response's `updatedAt` on their next load.
*/
| { type: "credentials_updated" }
/** Placeholder handshake on the user channel (reserved for automated task notifications). */
| { type: "hello" }
/** New session registered (pushed over the parent session's channel for subagent sessions): frontend refreshes the list in place. */