Conversation
|
✱ Stainless preview builds for stagehandThis PR will update the Edit this comment to update it. It will appear in the SDK's changelogs. ✅ stagehand-ruby studio · code · diff
✅ stagehand-csharp studio · code · diff
✅ stagehand-kotlin studio · code · diff
✅ stagehand-java studio · code · diff
✅ stagehand-openapi studio · code · diff
✅ stagehand-go studio · code · diff
✅ stagehand-python studio · code · diff
✅ stagehand-php studio · code · diff
✅ stagehand-typescript studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
There was a problem hiding this comment.
No issues found across 6 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Client as External Client
participant API as Stagehand API Server
participant Schema as Zod Schema Validation
participant Spec as OpenAPI v3 Spec
participant SDK as Stagehand SDK
participant Vertex as Vertex AI Provider
Note over Client,Vertex: Vertex Auth Configuration Flow
Client->>API: POST /v3/act or /v3/agent/execute
Note over Client,API: NEW: includes vertex model config
API->>Schema: validate request body
Note over Schema: NEW: ModelConfigObjectSchema<br/>includes vertex, project, location,<br/>googleAuthOptions fields
Schema-->>API: validated ModelConfigObject
alt Request uses Google Vertex
API->>SDK: pass ModelConfigObject with vertex fields
SDK->>SDK: construct GoogleVertexProviderSettings
Note over SDK: NEW: baseURL and full<br/>GoogleVertexAuthOptions included
alt Has apiKey
SDK->>Vertex: authenticate with Vertex express mode
Note over SDK,Vertex: uses apiKey from googleAuthOptions
else Has keyFile or credentials
SDK->>Vertex: authenticate with service account
Note over SDK,Vertex: uses keyFilename/keyFile<br/>or credentials object
end
Vertex-->>SDK: auth token
SDK->>Vertex: execute model request with auth
Vertex-->>SDK: model response
SDK-->>API: result
end
API-->>Client: response with Vertex model results
Note over Spec,Client: OpenAPI Spec Generation
API->>Spec: generate OpenAPI v3 spec
Note over Spec: NEW: GoogleServiceAccountCredentials,<br/>GoogleAuthOptions schemas<br/>added to components
Note over Spec: NEW: "vertex" added to<br/>provider enum in ModelConfigObject<br/>and ModelConfigObjectOutput
Spec-->>Client: accessible via /openapi/v3.yaml
Note over Client,Vertex: Schema Coverage Tests
Client->>API: act request with full Vertex auth
Note over Client,API: includes provider:"vertex",<br/>project, location,<br/>googleAuthOptions with apiKey<br/>and credentials
API->>Schema: validate ActRequestSchema
Schema-->>API: successfully parsed
API-->>Client: 200 OK with preserved Vertex config
Client->>API: agentExecute request with Vertex model config
Note over Client,API: agentConfig.model and<br/>executionModel both use Vertex
API->>Schema: validate AgentExecuteRequestSchema
Schema-->>API: successfully parsed
API-->>Client: 200 OK with preserved Vertex config for both models
Summary
Validation
Summary by cubic
Adds Vertex provider support and auth options to the public Stagehand model config and OpenAPI v3 so clients can configure Vertex (express or service account) end-to-end. Addresses STG-1756; tests confirm params pass through
actandagentExecute.vertexprovider inAgentTypeandModelConfigObject.provider.project,location, andgoogleAuthOptions(apiKey,keyFilename/keyFile,credentials,clientOptions,scopes,projectId,universeDomain).GoogleServiceAccountCredentialsandGoogleAuthOptionsschemas in@browserbasehq/stagehand; included in OpenAPI v3 (input/output).GoogleVertexProviderSettingsto supportbaseURLand fullgoogleAuthOptions.Written for commit 05898f3. Summary will update on new commits.