Skip to content

Backport: feat(provider/openai-compatible): add textVerbosity provider option - #9404

Merged
1 commit merged into
release-v5.0from
backport-pr-9400-to-release-v5.0
Oct 10, 2025
Merged

Backport: feat(provider/openai-compatible): add textVerbosity provider option#9404
1 commit merged into
release-v5.0from
backport-pr-9400-to-release-v5.0

Conversation

@ghost

@ghost ghost commented Oct 10, 2025

Copy link
Copy Markdown

This is an automated backport of #9400 to the release-v5.0 branch.

## Background

The `@ai-sdk/openai-compatible` package was missing support for the
`textVerbosity` provider option. This caused API errors when users tried
to use `textVerbosity` with OpenAI-compatible providers.

<!-- Why was this change necessary? -->

## Summary

- Added textVerbosity option to `openaiCompatibleProviderOptions` schema
- Transform `textVerbosity` to `verbosity` in API request body 
- Added unit tests to verify transformation and ensure no duplication in
the request body
- Updated snapshot tests
- Added example file demonstrating `textVerbosity` usage

<!-- What did you change? -->

## Manual Verification

- Created example file demonstrating `textVerbosity` usage:
`examples/ai-core/src/generate-text/openai-compatible-chat-provider-options.ts`
- Built the package successfully with `pnpm build`
- All unit tests pass, including new textVerbosity tests 
- Verified through unit tests that:
- `textVerbosity` is correctly transformed to `verbosity` in the API
request body
  - No duplicate `textVerbosity` field appears in requests
  - Custom options still work alongside `textVerbosity`

## Related Issues

Fixes #8832 

---------

Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: vercel-ai-sdk[bot] <225926702+vercel-ai-sdk[bot]@users.noreply.github.com>
@ghost
ghost merged commit f02b7ab into release-v5.0 Oct 10, 2025
13 checks passed
@ghost
ghost deleted the backport-pr-9400-to-release-v5.0 branch October 10, 2025 23:21
@gr2m gr2m added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider labels Oct 27, 2025
@gr2m gr2m mentioned this pull request Apr 29, 2026
This pull request was closed.
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 provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider task-merge-tracking-no-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants