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
Align AI SDK v5 packages on @ai-sdk/provider-utils >=3.0.28 (GHSA-866g-f22w-33x8) #167
Before 3.0.28, @ai-sdk/provider-utils reads response bodies in createJsonResponseHandler, createJsonErrorResponseHandler and createStatusCodeErrorResponseHandler with no size limit. A provider endpoint can return a huge body and exhaust memory.
packages/cli pins @ai-sdk/provider-utils 3.0.21 directly, and the in-repo Copilot provider (src/provider/sdk/copilot/*) uses it. Every @ai-sdk/* provider package and ai 5.0.124 also pin their own exact copies, 3.0.20 to 3.0.22.
Bumping only the direct dependency to 3.0.28 brings in @ai-sdk/provider 2.0.3 nested under it. The Copilot provider imports @ai-sdk/provider 2.0.1, so the two copies of APICallError / ResponseHandler no longer match and tsc fails in openai-compatible-chat-language-model.ts with type errors (TS2322 / TS18046).
Later 3.0.x releases (3.0.33 and up, at least) also add undici as a runtime dependency.
Bumping the direct pin would not fix the copies that the provider packages and ai use at runtime. A real fix means bumping the AI SDK v5 set together (ai, @ai-sdk/provider, @ai-sdk/provider-utils and the @ai-sdk/* providers, patch or minor within the current majors), or adding an override, followed by provider regression testing.
Exposure
Only response bodies from the configured model provider endpoints are affected, so the endpoint, or a malicious base URL that a user configured, would have to return the oversized body.
Acceptance criteria
Every resolved copy of @ai-sdk/provider-utils in bun.lock is >= 3.0.28. Check with grep '@ai-sdk/provider-utils@' bun.lock.
A single @ai-sdk/provider version is used across ai, the providers and src/provider/sdk/copilot.
bun turbo typecheck passes, and test/provider and test/session pass.
Activity