-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(tools): updated browser use and stagehand to use the latest models #2319
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryUpdated stagehand and browser_use tool configurations to use the latest model identifiers, added provider prefixes for proper routing, and included stagehand in standalone builds. Key Changes
ObservationsThe model identifier changes from dated versions (e.g., Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant StagehandAPI
participant Stagehand
participant LLMProvider
participant Browser
Client->>StagehandAPI: POST /api/tools/stagehand/agent
activate StagehandAPI
StagehandAPI->>StagehandAPI: Initialize with model config
Note over StagehandAPI: modelName: anthropic/claude-3-7-sonnet-latest
StagehandAPI->>Stagehand: new Stagehand(config)
activate Stagehand
Stagehand->>Browser: Initialize Browserbase
Browser-->>Stagehand: Browser context ready
Stagehand-->>StagehandAPI: Stagehand instance
StagehandAPI->>Stagehand: agent({ model, executionModel })
Note over Stagehand: Both model & executionModel<br/>use claude-3-7-sonnet-latest
Stagehand-->>StagehandAPI: Agent instance
StagehandAPI->>Stagehand: agent.execute(instruction)
activate LLMProvider
Stagehand->>LLMProvider: Request with anthropic/claude-3-7-sonnet-latest
LLMProvider-->>Stagehand: Model response
deactivate LLMProvider
Stagehand->>Browser: Execute browser actions
Browser-->>Stagehand: Action results
alt Has output schema
Stagehand->>StagehandAPI: Parse JSON response
alt Parse fails
StagehandAPI->>Stagehand: extract(schema)
Stagehand->>Browser: Extract data from page
Browser-->>Stagehand: Extracted data
end
end
Stagehand-->>StagehandAPI: Agent result
deactivate Stagehand
StagehandAPI-->>Client: Success response
deactivate StagehandAPI
|
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
Summary
updated browser use and stagehand to use the latest models
Type of Change
Testing
Tested manually
Checklist