Skip to content

Commit f2c80d7

Browse files
jahoomaclaude
andcommitted
Raise provider headers timeout from 10m to 30m
Deep-thinking models (Minimax M2.5, Kimi K2.5, GLM-5.1, GPT-5) can spend 15+ minutes in the reasoning phase before emitting the first token. The 10-min headersTimeout was cutting them off mid-think and surfacing as "Agent run error: The operation timed out." Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 14d3e60 commit f2c80d7

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

web/src/llm-api/canopywave.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const CANOPYWAVE_BASE_URL = 'https://inference.canopywave.io/v1'
1919

2020
// Extended timeout for deep-thinking models that can take
2121
// a long time to start streaming.
22-
const CANOPYWAVE_HEADERS_TIMEOUT_MS = 10 * 60 * 1000
22+
const CANOPYWAVE_HEADERS_TIMEOUT_MS = 30 * 60 * 1000
2323

2424
const canopywaveAgent = new Agent({
2525
headersTimeout: CANOPYWAVE_HEADERS_TIMEOUT_MS,

web/src/llm-api/fireworks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const FIREWORKS_BASE_URL = 'https://api.fireworks.ai/inference/v1'
2020

2121
// Extended timeout for deep-thinking models that can take
2222
// a long time to start streaming.
23-
const FIREWORKS_HEADERS_TIMEOUT_MS = 10 * 60 * 1000
23+
const FIREWORKS_HEADERS_TIMEOUT_MS = 30 * 60 * 1000
2424

2525
const fireworksAgent = new Agent({
2626
headersTimeout: FIREWORKS_HEADERS_TIMEOUT_MS,

web/src/llm-api/openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const OUTPUT_TOKEN_COSTS: Record<string, number> = {
6262

6363
// Extended timeout for deep-thinking models (e.g., gpt-5.x) that can take
6464
// a long time to start streaming.
65-
const OPENAI_HEADERS_TIMEOUT_MS = 10 * 60 * 1000
65+
const OPENAI_HEADERS_TIMEOUT_MS = 30 * 60 * 1000
6666

6767
const openaiAgent = new Agent({
6868
headersTimeout: OPENAI_HEADERS_TIMEOUT_MS,

web/src/llm-api/openrouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const GENERATION_LOOKUP_DELAY_MS = 500
4242

4343
// Extended timeout for deep-thinking models (e.g., gpt-5) that can take
4444
// a long time to start streaming.
45-
const OPENROUTER_HEADERS_TIMEOUT_MS = 10 * 60 * 1000
45+
const OPENROUTER_HEADERS_TIMEOUT_MS = 30 * 60 * 1000
4646

4747
const openrouterAgent = new Agent({
4848
headersTimeout: OPENROUTER_HEADERS_TIMEOUT_MS,

web/src/llm-api/siliconflow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const SILICONFLOW_BASE_URL = 'https://api.siliconflow.com/v1'
1919

2020
// Extended timeout for deep-thinking models that can take
2121
// a long time to start streaming.
22-
const SILICONFLOW_HEADERS_TIMEOUT_MS = 10 * 60 * 1000
22+
const SILICONFLOW_HEADERS_TIMEOUT_MS = 30 * 60 * 1000
2323

2424
const siliconflowAgent = new Agent({
2525
headersTimeout: SILICONFLOW_HEADERS_TIMEOUT_MS,

0 commit comments

Comments
 (0)