docs(cli): propagate chunkTimeout to streamText and document provider options#9795
docs(cli): propagate chunkTimeout to streamText and document provider options#9795Fatty911 wants to merge 4 commits into
Conversation
…amText Add chunkTimeout propagation to Vercel AI SDK streamText timeout.chunkMs for silent stream dropout detection. The config option already existed in the provider schema and worked at the fetch wrapper level, but was not passed through to the streamText call. This adds dual-layer protection at both the fetch layer and the SDK stream consumer layer. Also updates docs to document chunkTimeout with failure scenario and recommended values (15-30s).
|
@Fatty911 is attempting to deploy a commit to the Kilo Code Team on Vercel. A member of the Team first needs to authorize it. |
| // Pass chunkTimeout from provider/model options to streamText for AI SDK-level | ||
| // chunk idle timeout detection. This catches silenced stream dropouts where | ||
| // the TCP connection stays open but no SSE chunks arrive. // kilocode_change | ||
| const chunkTimeout = typeof options["chunkTimeout"] === "number" ? options["chunkTimeout"] : undefined // kilocode_change |
There was a problem hiding this comment.
WARNING: Provider-level chunkTimeout is not propagated to streamText
This reads only from the merged model/agent/variant options. The documented provider-level setting lives on item.options, and ProviderTransform.options(...) only uses provider options for derived defaults like setCacheKey; it does not merge arbitrary provider options into options. As a result, a config like the docs example under provider.<id>.options.chunkTimeout still won't set streamText({ timeout: { chunkMs } }), so the new SDK-layer timeout silently doesn't activate for the primary documented use case.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.5-2026-04-23 · 327,495 tokens |
…ed options ProviderTransform.options() does not merge arbitrary provider options into the merged options object. Read chunkTimeout from item.options as a fallback so provider.<id>.options.chunkTimeout works as documented. Addresses kilo-code-bot review finding in PR Kilo-Org#9795.
Closes #9797
Summary
Propagate
chunkTimeoutto Vercel AI SDK streamText timeout.chunkMs for silent stream dropout detection, and document it in the custom models guide.Reads from both merged model/agent/variant options AND
item.options(provider-level) soprovider.<id>.options.chunkTimeoutworks as documented. Addresses kilo-code-bot review finding.Files Changed