[PR #7568] fix: Support finishReason in both new and old versions of ai-sdk #12444

Open
opened 2026-02-16 18:17:21 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7568

State: open
Merged: No


What does this PR do?

Enables both new and old versions of ai-sdk providers to work with the new finishReason property introduced in https://github.com/vercel/ai/pull/11338

Fixes https://github.com/anomalyco/opencode/issues/7439 https://github.com/anomalyco/opencode/issues/7674

How did you verify your code works?

I created a custom npm package based on @ai-sdk/openai-compatible. Before the change I was getting a zod error. After the change it works.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7568 **State:** open **Merged:** No --- ### What does this PR do? Enables both new and old versions of ai-sdk providers to work with the new `finishReason` property introduced in https://github.com/vercel/ai/pull/11338 Fixes https://github.com/anomalyco/opencode/issues/7439 https://github.com/anomalyco/opencode/issues/7674 ### How did you verify your code works? I created a custom npm package based on `@ai-sdk/openai-compatible`. Before the change I was getting a zod error. After the change it works.
yindo added the pull-request label 2026-02-16 18:17:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12444