Skip to content

chore: add warning for providers that do not support new reasoning parameter#13649

Merged
felixarntz merged 4 commits intomainfrom
fa/provider-reasoning-support-warning
Mar 20, 2026
Merged

chore: add warning for providers that do not support new reasoning parameter#13649
felixarntz merged 4 commits intomainfrom
fa/provider-reasoning-support-warning

Conversation

@felixarntz
Copy link
Copy Markdown
Collaborator

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

  • 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 maintenance CI, internal documentation, automations, etc provider/mistral Issues related to the @ai-sdk/mistral provider provider/perplexity Issues related to the @ai-sdk/perplexity provider provider/prodia Issues related to the @ai-sdk/prodia provider labels Mar 19, 2026
felixarntz added a commit that referenced this pull request Mar 20, 2026
#13648)

## 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

- [x] Tests have been added / updated (for bug fixes / features)
- [ ] 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.
@felixarntz felixarntz merged commit 5259a95 into main Mar 20, 2026
33 checks passed
@felixarntz felixarntz deleted the fa/provider-reasoning-support-warning branch March 20, 2026 16:19
@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 maintenance CI, internal documentation, automations, etc provider/mistral Issues related to the @ai-sdk/mistral provider provider/perplexity Issues related to the @ai-sdk/perplexity provider provider/prodia Issues related to the @ai-sdk/prodia provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants