feat: enable codex models
Merged
KY
8mo ago+25+25+01234567890123456789-9-9-0123456789
why
people want to try codex models in Stagehand (also see benchmarks)
what changed
Codex needs a text verbosity and reasoning effort of medium (not low) so we set this using a conditional operator.
test plan
Ran evals
Summary by cubic
Enable Codex models in Stagehand via the AI SDK with the right OpenAI provider options. Addresses STG-1324: Codex uses medium text verbosity and reasoning effort; non-Codex gpt-5 defaults stay the same.
- New Features
- Detects Codex models (modelId includes "codex") and sets textVerbosity: "medium" and reasoningEffort: "medium".
- Updates AISdkClient and AISdkClientWrapped to apply low/minimal reasoning defaults to gpt-5.1/5.2 only when not Codex.