-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Using provider/model syntax in modelName examples within openapi spec #1526
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
Conversation
|
✱ Stainless preview buildsThis PR will update the
|
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.
No issues found across 2 files
Greptile OverviewGreptile SummaryThis PR corrects documentation examples in the Zod schemas and OpenAPI specification to use the What ChangedThe PR updates examples in three locations:
Why This MattersThe old examples showed
The system does support both formats for backward compatibility, but the documentation should show the recommended Review Findings✅ No issues found. The changes are:
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant API as SessionStart API
participant Schema as Zod Schema
participant Resolver as resolveModel()
participant Provider as LLMProvider
participant AISDK as AI SDK
Client->>API: POST /v1/sessions/start
Note over Client,API: modelName: "openai/gpt-4o"
API->>Schema: Validate with SessionStartRequestSchema
Schema->>Schema: Check modelName example
Note over Schema: Example now shows<br/>"openai/gpt-4o"<br/>(was "gpt-4o")
Schema->>Resolver: Pass validated modelName
alt modelName includes "/"
Resolver->>Resolver: Split on "/"
Note over Resolver: provider = "openai"<br/>modelName = "gpt-4o"
Resolver->>Provider: getClient("openai/gpt-4o")
Provider->>Provider: Split on "/"
Provider->>AISDK: Use AI SDK with openai("gpt-4o")
else modelName without "/"
Resolver->>Provider: getClient("gpt-4o")
Provider->>Provider: Lookup in modelToProviderMap
Note over Provider: Legacy format:<br/>uses predefined provider
end
AISDK->>Client: Return session with configured model
|
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.
No files reviewed, no comments
why
https://stagehand.stldocs.app/api/python/resources/sessions/methods/startexamples were showingmodel_name="gpt-4o".what changed
Changed zod schemas so that the examples show the
provider/modelsyntaxtest plan
Summary by cubic
Updated Zod schemas and OpenAPI examples to use provider/model syntax for modelName (e.g., "openai/gpt-4o"). This aligns the docs with the API and fixes incorrect examples shown in the Session start endpoint.
Written for commit 5657c1e. Summary will update on new commits.