Skip to content

fix(browser-automation): fix Stagehand v3 model format and add MVP controls#2498

Merged
tofikwest merged 3 commits intomainfrom
worktree-fix-browser-automation
Apr 10, 2026
Merged

fix(browser-automation): fix Stagehand v3 model format and add MVP controls#2498
tofikwest merged 3 commits intomainfrom
worktree-fix-browser-automation

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

Summary

  • Fixed "Unsupported model" error: Stagehand v3 requires provider/model format (e.g., anthropic/claude-sonnet-4-5-20250929). The init model was using claude-3-7-sonnet-latest without the anthropic/ prefix, and the CUA agent model was using the deprecated claude-3-7-sonnet-latest name. Both now use anthropic/claude-sonnet-4-5-20250929.
  • Added delete automation: Users can now delete browser automations with a confirmation step
  • Added enable/disable toggle: Users can pause/resume scheduled automations without deleting them
  • UI polish: Disabled automations show "Paused" badge and dimmed styling, run button is disabled when automation is paused

Changes

File Change
apps/api/src/browserbase/browserbase.service.ts Fixed model names to Stagehand v3 format, extracted to constants
apps/app/.../hooks/useBrowserAutomations.ts Added deleteAutomation and toggleAutomation methods
apps/app/.../AutomationItem.tsx Added delete button (with confirm), enable/disable toggle, paused state UI
apps/app/.../BrowserAutomationsList.tsx Passed new onDelete and onToggleEnabled props
apps/app/.../BrowserAutomations.tsx Wired new props from hook to list component
apps/app/.../BrowserAutomationsList.test.tsx Added new required props to test defaults

Test plan

  • Create a browser automation and run it — should no longer show "Unsupported model" error
  • Toggle an automation off — should show "Paused" badge and disable the Run button
  • Toggle it back on — should re-enable
  • Delete an automation — confirm dialog should appear, then automation removed
  • Scheduled runs should skip disabled automations

🤖 Generated with Claude Code

…/toggle controls

The Stagehand model config used 'claude-3-7-sonnet-latest' without the
required 'provider/model' prefix, causing "Unsupported model" errors.
Updated both init and CUA agent models to use
'anthropic/claude-sonnet-4-5-20250929'.

Also added delete automation and enable/disable toggle to the frontend
for a more complete MVP experience.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Apr 10, 2026 3:58pm
comp-framework-editor Ready Ready Preview, Comment Apr 10, 2026 3:58pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped Apr 10, 2026 3:58pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 10, 2026

PR Summary

Medium Risk
Touches both automation execution (Stagehand model configuration) and automation management UX (delete/enable/disable), which could impact scheduled runs or user ability to manage automations if API expectations differ.

Overview
Fixes Stagehand v3 integration by switching Stagehand init and CUA agent model names to the required provider/model format via shared constants.

Adds MVP automation controls in the task UI: users can pause/resume automations (disabling run and next-run display when none are enabled) and delete automations with a confirmation step, wiring new DELETE/PATCH { isEnabled } calls through useBrowserAutomations and updating list/item components and tests accordingly.

Reviewed by Cursor Bugbot for commit 5f700cc. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eb012b0. Configure here.

… paused

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel vercel bot temporarily deployed to Preview – portal April 10, 2026 15:57 Inactive
@tofikwest tofikwest merged commit 7be96c0 into main Apr 10, 2026
10 checks passed
@tofikwest tofikwest deleted the worktree-fix-browser-automation branch April 10, 2026 16:12
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.20.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants