Skip to content

feat: migrate providers to support new top-level reasoning parameter#13648

Merged
felixarntz merged 9 commits intomainfrom
fa/v7-reasoning-provider-migration
Mar 20, 2026
Merged

feat: migrate providers to support new top-level reasoning parameter#13648
felixarntz merged 9 commits intomainfrom
fa/v7-reasoning-provider-migration

Conversation

@felixarntz
Copy link
Copy Markdown
Collaborator

@felixarntz felixarntz commented Mar 19, 2026

Background

The new top-level reasoning parameter was added to the AI SDK spec and core in #13553. Providers need to be migrated to translate this parameter into their native reasoning/thinking configuration.

Summary

Migrates 7 providers to support the new top-level reasoning parameter:

  • deepseek: Maps reasoning to existing thinking support (already had infrastructure, just needed wiring)
  • groq: Maps reasoning to reasoning_effort in provider options
  • xai: Maps reasoning to reasoning_effort for both chat and responses models
  • openai-compatible: Maps reasoning to reasoning_effort in provider options
  • open-responses: Maps reasoning to reasoning.effort in the responses format
  • alibaba: Maps reasoning to enable_thinking + thinking_budget via token budget calculation
  • cohere: Maps reasoning to thinking.type + thinking.token_budget via token budget calculation
  • fireworks: Uses openai-compatible

Together with #13649, this completes the work on #12516.

Manual Verification

Relevant examples were updated or added, then run for verification.

Checklist

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • I have reviewed this pull request (self-review)

Future Work

N/A

Related Issues

See #12516.

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label feature New feature or request provider/cohere Issues related to the @ai-sdk/cohere provider provider/deepseek Issues related to the @ai-sdk/deepseek provider provider/groq Issues related to the @ai-sdk/groq provider provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider provider/xai Issues related to the @ai-sdk/xai provider labels Mar 19, 2026
@felixarntz felixarntz merged commit 74d520f into main Mar 20, 2026
18 checks passed
@felixarntz felixarntz deleted the fa/v7-reasoning-provider-migration branch March 20, 2026 16:19
felixarntz added a commit that referenced this pull request Mar 20, 2026
…rameter (#13649)

## Background

A new top-level `reasoning` parameter was added to the AI SDK spec in
#13553 and is supported in `generateText`/`streamText`. Providers that
don't natively support reasoning configuration need to emit an
unsupported warning when a custom reasoning value is passed, rather than
silently ignoring it.

## Summary

- Added unsupported-feature warnings to `perplexity`, `mistral`, and
`prodia` providers when `isCustomReasoning(reasoning)` returns `true`
- Added documentation to `architecture/provider-abstraction.md`
explaining how providers should handle the `reasoning` parameter (effort
mapping, budget mapping, or unsupported warning).

Together with #13648, this completes the work on #12516.

## Manual Verification

N/A

## Checklist

- [x] Tests have been added / updated (for bug fixes / features)
- [x] Documentation has been added / updated (for bug fixes / features)
- [x] A _patch_ changeset for relevant packages has been added (for bug
fixes / features - run `pnpm changeset` in the project root)
- [x] I have reviewed this pull request (self-review)

## Future Work

N/A

## Related Issues

See #12516.
@vercel-ai-sdk
Copy link
Copy Markdown
Contributor

vercel-ai-sdk bot commented Mar 20, 2026

🚀 Published in:

Package Version
@ai-sdk/alibaba 2.0.0-beta.11
@ai-sdk/baseten 2.0.0-beta.9
@ai-sdk/cerebras 3.0.0-beta.9
@ai-sdk/cohere 4.0.0-beta.7
@ai-sdk/deepinfra 3.0.0-beta.9
@ai-sdk/deepseek 3.0.0-beta.8
@ai-sdk/fireworks 3.0.0-beta.9
@ai-sdk/groq 4.0.0-beta.8
@ai-sdk/huggingface 2.0.0-beta.9
@ai-sdk/mistral 4.0.0-beta.7
@ai-sdk/moonshotai 3.0.0-beta.9
@ai-sdk/open-responses 2.0.0-beta.8
@ai-sdk/openai-compatible 3.0.0-beta.9
@ai-sdk/perplexity 4.0.0-beta.8
@ai-sdk/prodia 2.0.0-beta.9
@ai-sdk/togetherai 3.0.0-beta.9
@ai-sdk/vercel 3.0.0-beta.9
@ai-sdk/xai 4.0.0-beta.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label feature New feature or request provider/cohere Issues related to the @ai-sdk/cohere provider provider/deepseek Issues related to the @ai-sdk/deepseek provider provider/groq Issues related to the @ai-sdk/groq provider provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider provider/xai Issues related to the @ai-sdk/xai provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants