GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(ai): retry transient client statuses (#39391) · jinhuang712/opencode@55d96f8

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/ai
    • src
      • provider-error.ts
    • test
      • provider-error.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/ai/src/provider-error.ts‎

Copy file name to clipboardExpand all lines: packages/ai/src/provider-error.ts
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function classifyProviderFailure(input: ProviderFailure): LLMError["reaso
135135
rateLimit: input.rateLimit,
136136
})
137137
}
138-
if (input.status !== undefined && input.status >= 500)
138+
if (input.status === 408 || input.status === 409 || (input.status !== undefined && input.status >= 500))
139139
return new ProviderInternalReason({
140140
...common,
141141
status: input.status,
@@ -145,7 +145,6 @@ export function classifyProviderFailure(input: ProviderFailure): LLMError["reaso
145145
if (
146146
input.status === 400 ||
147147
input.status === 404 ||
148-
input.status === 409 ||
149148
input.status === 413 ||
150149
input.status === 422
151150
)
Collapse file

‎packages/ai/test/provider-error.test.ts‎

Copy file name to clipboardExpand all lines: packages/ai/test/provider-error.test.ts
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ describe("provider error classification", () => {
5858
).toEqual(["ProviderInternal", "ProviderInternal"])
5959
})
6060

61+
test("classifies transient client statuses as provider internal", () => {
62+
expect(
63+
[408, 409].map((status) => classifyProviderFailure({ message: `HTTP ${status}`, status })._tag),
64+
).toEqual(["ProviderInternal", "ProviderInternal"])
65+
})
66+
6167
test("classifies nested provider codes when a top-level code is also present", () => {
6268
expect(
6369
[

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.