-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: adding gpt 5.1 to stagehand #1264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adding gpt 5.1 to stagehand #1264
Conversation
🦋 Changeset detectedLatest commit: b0b1087 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| openai: { | ||
| textVerbosity: "low", // Making these the default for gpt-5 for now | ||
| reasoningEffort: "minimal", | ||
| reasoningEffort: isGPT51 ? "low" : "minimal", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to make 5.1 low vs 5 minimal? is it faster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a weird syntax change, you have to set to low because the model doesn't accept minimal as a param
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also apparently set the reasoning to none
Greptile OverviewGreptile SummaryThis PR adds support for GPT-5.1 ( Key Changes:
Implementation: Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client as Client Code
participant LLMProvider as LLMProvider
participant AISdkClient as AISdkClient/Wrapped
participant AISDK as Vercel AI SDK
Client->>LLMProvider: Request with model: "gpt-5.1-2025-11-13"
LLMProvider->>LLMProvider: Check modelToProviderMap
LLMProvider->>LLMProvider: Maps to "openai" provider
LLMProvider->>AISdkClient: Initialize with model
Client->>AISdkClient: createChatCompletion()
AISdkClient->>AISdkClient: Check isGPT5 = includes("gpt-5") → true
AISdkClient->>AISdkClient: Check isGPT51 = includes("gpt-5.1") → true
alt isGPT5 is true
AISdkClient->>AISdkClient: Set providerOptions
AISdkClient->>AISdkClient: textVerbosity: "low"
alt isGPT51 is true
AISdkClient->>AISdkClient: reasoningEffort: "low"
else other GPT-5 models
AISdkClient->>AISdkClient: reasoningEffort: "minimal"
end
end
AISdkClient->>AISDK: generateObject() with providerOptions
AISDK->>Client: Return response
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 files reviewed, no comments
Co-authored-by: Miguel <36487034+miguelg719@users.noreply.github.com>
dd4eb87 to
b0b1087
Compare
# why we want to benchmark/use the sota models in stagehand # what changed added gpt 5.1 to available models, setting reasoning to low for gpt 5.1 specifically since it cannot be set to minimal. # test plan --------- Co-authored-by: Miguel <36487034+miguelg719@users.noreply.github.com>
why
we want to benchmark/use the sota models in stagehand
what changed
added gpt 5.1 to available models, setting reasoning to low for gpt 5.1 specifically since it cannot be set to minimal.
test plan