You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Managed stream completion doesn't report the served provider or model #133
generateManagedResponseStream doesn't report which provider and model served the stream. StreamCompletion has only outcome, emittedChars, and usage, and TokenUsage has no model field. Non-streaming generateResponse does return provider and model.
Why it matters
An application that enforces a per-task model allowlist can check every non-streaming response, but can't check a streamed one. With fallbackRules: [] and only one provider configured, routing to another provider shouldn't happen, but the application can't confirm that, and telemetry can't record the served model for streams. It also can't tell which model to bill a partial stream against without assuming the requested one.
const{ stream, completion }=awaitllm.generateManagedResponseStream({ model, messages,maxTokens: 100});forawait(const_ofstream){/* read */}constdone=awaitcompletion;// Keys on done: outcome, emittedChars, usage. No provider or model.
Confirmed from dist/types.d.ts (StreamCompletion, TokenUsage).
Expected
Add provider and model to StreamCompletion, set to what actually served the request, so streams can be checked the same way as other responses.
Relationship to existing issues
Related to #128 (a pinned model fails over with no marker) and to the accounting work in #110. Filed separately because it's a small API addition.
Scope
Read from the published types and used in a live evaluation. Our application records this as a limit and allowlists streaming only with one provider and no fallback.
Activity
feat: Workers AI reasoning control and pinned-model integrity (Stackb…