Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
Merge pull request #2041 from xpeng5278-web/fix/gemini-json-http-status
Land731d6b56ea7
diff --cc docs/spec/03-runtime/08-error-codes.mdindex d99290a3b,f88132406..6f7ca857f--- a/docs/spec/03-runtime/08-error-codes.md+++ b/docs/spec/03-runtime/08-error-codes.md@@@ -377,13 -377,15 +377,17 @@@ exceeds max length`, xAI `maximum prompBedrock `Input is too long for requested model`. `CONTEXT_TOO_LARGE` is neverreplayed by either retry budget, and a delegate reports it as`SUBAGENT_CONTEXT_OVERFLOW`. Explicit billing/account exhaustion codes and-messages (including `insufficient_quota`, `credit_balance_exhausted`, and-organization/project spend-limit codes) map to terminal `PROVIDER_ERROR` even-when the HTTP status is 429. Throughput rate-limit wording, including+messages (including `insufficient_quota`, `credit_balance_exhausted`,+organization/project spend-limit codes, `insufficient credits`, and+`requires more credits`) map to terminal `PROVIDER_ERROR` even when the HTTP+status is 429, and HTTP 402 is terminal `PROVIDER_ERROR` even when the body+omits those phrases. Throughput rate-limit wording, includingBedrock's `Throttling error: Too many tokens, please wait before trying again.`,- stays `PROVIDER_RATE_LIMITED`.+ stays `PROVIDER_RATE_LIMITED`. An unprefixed JSON error body that carries an+ HTTP status in `error.code` (Gemini's `@google/genai` `ApiError.message`) is+ classified from that 400-599 code the same way as a `<status>:` message:+ 400/422 stay terminal unless they report a context overflow, 404 is+ `MODEL_NOT_CONFIGURED`, and 429 / 5xx stay retryable.An exact `terminated` provider message and equivalent premature stream-closemessages map to `STREAM_FAILED`. A message is `TURN_ABORTED` only for a