Skip to content

feat(openai-compatible): emit warning when using kebab-case instead of camelCase#14177

Open
aayush-kapoor wants to merge 2 commits intomainfrom
aayush/deprecate-kebab-case-options
Open

feat(openai-compatible): emit warning when using kebab-case instead of camelCase#14177
aayush-kapoor wants to merge 2 commits intomainfrom
aayush/deprecate-kebab-case-options

Conversation

@aayush-kapoor
Copy link
Copy Markdown
Collaborator

@aayush-kapoor aayush-kapoor commented Apr 6, 2026

Background

there was a TODO introduced in #11838 that talked about deprecating any providerOptions use that are defined with a kebab-case key.

for user facing APIs we should use camelCase. we should deprecate and eventually remove all other provider options

Summary

  • new warning type: deprecated added that will allow us to use/emit a similar warning for other providers
  • introduced a new helper function warnIfDeprecatedProviderOptionsKey that will emit the warnings
  • the change is still backwards compatible: kebab-case providerOptions will still work

Manual Verification

verified by running the example examples/ai-functions/src/generate-text/openai/compatible-chat-provider-options.ts before and after to see if the warning was emitted

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)

@tigent tigent bot added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label deprecation pull requests that introduced a deprecation maintenance CI, internal documentation, automations, etc provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider labels Apr 6, 2026
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 deprecation pull requests that introduced a deprecation maintenance CI, internal documentation, automations, etc provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant