Skip to content

[codex] Support gpt-5.4 reasoning effort#1919

Closed
ShaoyeLi wants to merge 1 commit intobrowserbase:mainfrom
ShaoyeLi:codex/gpt-54-reasoning-effort
Closed

[codex] Support gpt-5.4 reasoning effort#1919
ShaoyeLi wants to merge 1 commit intobrowserbase:mainfrom
ShaoyeLi:codex/gpt-54-reasoning-effort

Conversation

@ShaoyeLi
Copy link
Copy Markdown

@ShaoyeLi ShaoyeLi commented Mar 30, 2026

Summary

  • use a supported OpenAI reasoning effort for openai/gpt-5.4 structured output calls
  • keep existing defaults for Codex and earlier GPT-5 variants
  • add a regression test that asserts the provider options passed to the AI SDK

Root cause

AISdkClient treated gpt-5.4 like older GPT-5 models and passed reasoningEffort: "minimal" to the OpenAI provider. gpt-5.4 rejects that value and only accepts none, low, medium, high, and xhigh, so structured output requests failed before the model call completed.

Testing

  • HUSKY=0 corepack pnpm exec prettier --check lib/v3/llm/aisdk.ts tests/unit/aisdk-client-reasoning.test.ts
  • HUSKY=0 corepack pnpm exec vitest run --config vitest.esm.config.mjs dist/esm/tests/unit/aisdk-client-reasoning.test.js

Summary by cubic

Fix structured output failures on openai/gpt-5.4 by using a supported reasoning effort. Defaults to reasoningEffort: "low" for this model, keeping existing behavior for Codex and earlier GPT-5 variants.

  • Bug Fixes
    • Update model detection so openai/gpt-5.4 uses low reasoning effort (non-Codex), passing reasoningEffort: "low" and textVerbosity: "low" to OpenAI.
    • Add a regression test to assert provider options for openai/gpt-5.4 structured output calls.

Written for commit 5791761. Summary will update on new commits. Review in cubic

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 30, 2026

⚠️ No Changeset found

Latest commit: 5791761

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

This PR is from an external contributor and must be approved by a stagehand team member with write access before CI can run.
Approving the latest commit mirrors it into an internal PR owned by the approver.
If new commits are pushed later, the internal PR stays open but is marked stale until someone approves the latest external commit and refreshes it.

@github-actions github-actions bot added external-contributor Tracks PRs mirrored from external contributor forks. external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. labels Mar 30, 2026
@ShaoyeLi
Copy link
Copy Markdown
Author

Closing this duplicate exploratory PR in favor of #1920, which is the tracked contribution for the current workstream.

@ShaoyeLi ShaoyeLi closed this Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor:awaiting-approval Waiting for a stagehand team member to approve the latest external commit. external-contributor Tracks PRs mirrored from external contributor forks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant