sim icon indicating copy to clipboard operation
sim copied to clipboard

Feat/stagehand

Open fahadali503 opened this issue 7 months ago • 2 comments

This pull request introduces several enhancements and fixes across multiple files, focusing on extending functionality for model and environment selection, improving validation, and standardizing configurations. Below are the most important changes grouped by theme:

Feature Enhancements

  • Added support for specifying model and env parameters in the Stagehand extraction tool. This includes extending the requestSchema in apps/sim/app/api/tools/stagehand/extract/route.ts to validate these new fields and updating the POST function to handle them appropriately. [1] [2] [3]
  • Updated the StagehandBlock configuration in apps/sim/blocks/blocks/stagehand.ts to include dropdown options for selecting the environment (browserbase or local) and the model to use for extraction. [1] [2]
  • Extended StagehandExtractParams and related types in apps/sim/tools/stagehand/types.ts to include model and env fields, ensuring type safety for the new parameters.

Validation and Error Handling

  • Improved validation for API keys by generalizing the error message to handle non-OpenAI keys and ensuring compatibility with the new env parameter.
  • Enhanced environment-specific logic to ensure required variables (BROWSERBASE_API_KEY, BROWSERBASE_PROJECT_ID) are only checked when the env is set to browserbase.

Configuration and Standardization

  • Standardized the formatting of strings in docker-compose.prod.yml by replacing single quotes with double quotes for consistency. [1] [2] [3] [4] [5]

These changes collectively improve the flexibility, usability, and maintainability of the codebase while introducing new capabilities for users to configure and execute data extraction tasks.

fahadali503 avatar Jun 30 '25 19:06 fahadali503

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 30, 2025 7:02pm

vercel[bot] avatar Jun 30 '25 19:06 vercel[bot]

@fahadali503 is attempting to deploy a commit to the Sim Studio Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jun 30 '25 19:06 vercel[bot]