Skip to content

[v6.0] fix: new OpenAI model versions falling back to incompatible legacy request defaults - #17828

Merged
gr2m merged 2 commits into
release-v6.0from
backport-v6.0/17799-1
Jul 23, 2026
Merged

[v6.0] fix: new OpenAI model versions falling back to incompatible legacy request defaults#17828
gr2m merged 2 commits into
release-v6.0from
backport-v6.0/17799-1

Conversation

@ai-sdk-factory

Copy link
Copy Markdown
Contributor

Background

Recognizable newer OpenAI language and image model IDs inherited legacy defaults, causing invalid reasoning requests, stripped service tiers, and incorrect GPT Image parameters in OpenAI and shared Azure model implementations.

Root Cause

OpenAI capability and image defaults relied on hardcoded model allowlists rather than family/version recognition. Reproduction and request-level tests confirmed that current o4 and hypothetical future family IDs were misclassified while fine-tuned, proxy, and custom IDs correctly required conservative fallbacks.

Summary

Added anchored o-series and GPT version parsing for reasoning, parameter, and service-tier capabilities; family-wide GPT Image response-format and image-count defaults; conservative unknown-ID behavior; regression fixtures and tests; and a patch changeset for @ai-sdk/openai.

Testing

Capability matrices and request-level Chat, Responses, and image tests cover current and hypothetical versions, multi-digit versions, service tiers, fine-tuned/proxy IDs, and unknown IDs. Focused Node and Edge runs each passed all 148 tests; the package build, targeted checks, and full type-check also passed.

End-to-end Validation

  • pnpm -C examples/ai-functions exec tsx -e … exercised live gpt-5.6 Chat and Responses requests; both returned ok with stop.
  • pnpm -C examples/ai-functions exec tsx -e … exercised live gpt-image-2 generation; it returned one PNG image.

Related Issues

Fixes #17799

Closes #17817

Backport of #17820

Co-authored-by: gr2m 39992+gr2m@users.noreply.github.com

ai-sdk-factory Bot and others added 2 commits July 23, 2026 05:01
…quest defaults (#17820)

## Background

Recognizable newer OpenAI language and image model IDs inherited legacy
defaults, causing invalid reasoning requests, stripped service tiers,
and incorrect GPT Image parameters in OpenAI and shared Azure model
implementations.

## Root Cause

OpenAI capability and image defaults relied on hardcoded model
allowlists rather than family/version recognition. Reproduction and
request-level tests confirmed that current o4 and hypothetical future
family IDs were misclassified while fine-tuned, proxy, and custom IDs
correctly required conservative fallbacks.

## Summary

Added anchored o-series and GPT version parsing for reasoning,
parameter, and service-tier capabilities; family-wide GPT Image
response-format and image-count defaults; conservative unknown-ID
behavior; regression fixtures and tests; and a patch changeset for
@ai-sdk/openai.

## Testing

Capability matrices and request-level Chat, Responses, and image tests
cover current and hypothetical versions, multi-digit versions, service
tiers, fine-tuned/proxy IDs, and unknown IDs. Focused Node and Edge runs
each passed all 148 tests; the package build, targeted checks, and full
type-check also passed.

## End-to-end Validation

- `pnpm -C examples/ai-functions exec tsx -e …` exercised live gpt-5.6
Chat and Responses requests; both returned `ok` with `stop`.
- `pnpm -C examples/ai-functions exec tsx -e …` exercised live
gpt-image-2 generation; it returned one PNG image.

## Related Issues

Fixes #17799

Closes #17817

Co-authored-by: gr2m <39992+gr2m@users.noreply.github.com>

---------

Co-authored-by: ai-sdk-factory <308175966+ai-sdk-factory@users.noreply.github.com>
@gr2m
gr2m enabled auto-merge (squash) July 23, 2026 05:18
@gr2m
gr2m merged commit 8100830 into release-v6.0 Jul 23, 2026
51 of 52 checks passed
@gr2m
gr2m deleted the backport-v6.0/17799-1 branch July 23, 2026 05:21
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Published in:

Package Version
ai 6.0.235 github npm
@ai-sdk/amazon-bedrock 4.0.140 github npm
@ai-sdk/angular 2.0.236 github npm
@ai-sdk/anthropic 3.0.101 github npm
@ai-sdk/anthropic-aws 1.0.23 github npm
@ai-sdk/azure 3.0.93 github npm
@ai-sdk/gateway 3.0.157 github npm
@ai-sdk/google 3.0.100 github npm
@ai-sdk/google-vertex 4.0.169 github npm
@ai-sdk/langchain 2.0.243 github npm
@ai-sdk/llamaindex 2.0.235 github npm
@ai-sdk/openai 3.0.88 github npm
@ai-sdk/react 3.0.237 github npm
@ai-sdk/rsc 2.0.235 github npm
@ai-sdk/svelte 4.0.235 github npm
@ai-sdk/vue 3.0.235 github npm

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants