Return user-facing message if API reuturn 429 API rate limit reached #2202 (#10415)

* Return user-facing message if API reuturn 429 API rate limit reached

* clarify the error message

* fix(agents): improve 429 user messaging (#10415) (thanks @vincenthsin)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
Vincent
2026-02-15 00:40:02 +08:00
committed by GitHub
parent ff32f43459
commit 478af81706
10 changed files with 115 additions and 14 deletions

View File

@@ -1,5 +1,6 @@
import type { AgentSession } from "@mariozechner/pi-coding-agent";
import type { ReasoningLevel, VerboseLevel } from "../auto-reply/thinking.js";
import type { OpenClawConfig } from "../config/types.openclaw.js";
import type { HookRunner } from "../plugins/hooks.js";
import type { BlockReplyChunking } from "./pi-embedded-block-chunker.js";
@@ -32,6 +33,8 @@ export type SubscribeEmbeddedPiSessionParams = {
onAssistantMessageStart?: () => void | Promise<void>;
onAgentEvent?: (evt: { stream: string; data: Record<string, unknown> }) => void | Promise<void>;
enforceFinalTag?: boolean;
config?: OpenClawConfig;
sessionKey?: string;
};
export type { BlockReplyChunking } from "./pi-embedded-block-chunker.js";