Repository navigation
fix(core): wait 10 minutes for headers on Gemini and DeepSeek models - #67243
Conversation
There was a problem hiding this comment.
Looks sound. I called Provider.timeouts directly on the base and with this PR. Gemini and DeepSeek families (gemini-pro, gemini-flash-lite, deepseek-flash) now get a 600s header timeout. Other families and models with no family keep 300s, and an explicit headerTimeout still wins. All three callers pass the model family. The model-resolver and aisdk tests pass, and tsc -b on packages/core reports no errors. I didn't test against a real provider.
Public API: no config keys, schema, SDK or HTTP API change. Only the unset headerTimeout default changes, for these two families. Existing configs keep working.
One thing worth updating: the Timeouts section of services/site/src/docs/content/providers.mdx still says requests wait "up to five minutes for response headers". It should mention the 10-minute default for Gemini and DeepSeek models.
Related: #56344
Gemini and DeepSeek models now get 10 minutes to send response headers instead of 5, on any provider that serves them. Every other model keeps the 5 minute default.
The default is picked from the model's catalog
family, so it covers google, google-vertex, opencode, opencode-go, openrouter, deepseek, alibaba and others without listing providers or matching model ids:An explicit
headerTimeoutin config still wins.chunkTimeout(15 min) and the totaltimeoutare unchanged.Why
Related: #56344
Trade-offs
A request that really is stuck on one of these models now takes 10 minutes to fail instead of 5. I kept the rule to these two families rather than raising the default for everyone, since other models have not shown this. Models without a catalog family (some custom config models) keep 5 minutes.
Verification
packages/core/test/model-resolver.test.ts: Gemini and DeepSeek families resolve to 600_000 on google-vertex, opencode, deepseek and opencode-go; a Claude family and a model with no family stay at 300_000; explicitheaderTimeout(number andfalse) wins.bun test test/model-resolver.test.ts test/aisdk.test.tsandbun typecheckin packages/core,bun run checkfrom root.Added by the opencode bot (AI-generated).
Related: #56344