Skip to content

Conversation

@ziruihao
Copy link
Contributor

@ziruihao ziruihao commented Dec 12, 2025

why

  • update act reference to use "provider/model-name" formatting

@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2025

⚠️ No Changeset found

Latest commit: c455121

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

model: {
modelName: "gemini-2.5-flash",
apiKey: process.env.GOOGLE_API_KEY,
modelName: "google/gemini-2.5-flash",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assuming we want the google/ prefix here, like the example above it.

Copy link
Member

Choose a reason for hiding this comment

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

yes nice catch

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 12, 2025

Greptile Overview

Greptile Summary

This PR updates v3 documentation to use the correct environment variable names for Google/Gemini API keys. The migration from v2 to v3 changed the recommended environment variable from GOOGLE_API_KEY to either GEMINI_API_KEY or GOOGLE_GENERATIVE_AI_API_KEY, but the v3 docs still referenced the old variable name.

Changes made:

  • Updated all code examples in v3 docs to use GEMINI_API_KEY
  • Fixed the CUA example to use GOOGLE_GENERATIVE_AI_API_KEY as fallback (matching the actual implementation in GoogleCUAClient.ts:70-71)
  • Updated CLI command examples in deployment docs
  • Corrected the environment variable list in the Stagehand reference docs
  • Also fixed model name format in act.mdx from gemini-2.5-flash to google/gemini-2.5-flash (adding the provider prefix)

All changes are consistent with the actual implementation in packages/core/lib/utils.ts:685 which shows the "google" provider supports both GEMINI_API_KEY and GOOGLE_GENERATIVE_AI_API_KEY.

Confidence Score: 5/5

  • This PR is safe to merge - it only updates documentation and example code to fix incorrect environment variable references
  • The changes are straightforward documentation fixes that align with the actual implementation. All updated references are consistent with the code in utils.ts and GoogleCUAClient.ts which show both GEMINI_API_KEY and GOOGLE_GENERATIVE_AI_API_KEY are supported. No functional code changes, only doc corrections.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/core/examples/cua-example.ts 5/5 Updated fallback API key from GOOGLE_API_KEY to GOOGLE_GENERATIVE_AI_API_KEY, aligning with v3 conventions
packages/docs/v3/best-practices/deployments.mdx 5/5 Updated environment variable references from GOOGLE_API_KEY to GEMINI_API_KEY in code examples and CLI commands
packages/docs/v3/references/act.mdx 5/5 Updated documentation example to use GEMINI_API_KEY and corrected model name format to include provider prefix
packages/docs/v3/references/stagehand.mdx 5/5 Updated environment variable list to reflect GEMINI_API_KEY as the documented Google AI API key variable

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Docs as V3 Documentation
    participant Code as Stagehand Code
    participant Env as Environment Variables

    Note over Dev,Env: Before PR: Inconsistent Variable Names
    Dev->>Docs: Reads v3 docs
    Docs-->>Dev: Use GOOGLE_API_KEY
    Dev->>Env: Sets GOOGLE_API_KEY
    Dev->>Code: Initializes Stagehand
    Code->>Env: Checks GEMINI_API_KEY
    Code->>Env: Checks GOOGLE_GENERATIVE_AI_API_KEY
    Code-->>Dev: ❌ Missing API key error

    Note over Dev,Env: After PR: Aligned Documentation
    Dev->>Docs: Reads v3 docs
    Docs-->>Dev: Use GEMINI_API_KEY
    Dev->>Env: Sets GEMINI_API_KEY
    Dev->>Code: Initializes Stagehand
    Code->>Env: Checks GEMINI_API_KEY
    Code-->>Dev: ✅ Successfully initialized
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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 4 files

@seanmcguire12 seanmcguire12 changed the title Update Google/Gemini env key reference in v3 docs [docs]: update act reference with preferred model name formatting Dec 13, 2025
@seanmcguire12 seanmcguire12 merged commit d4b5bd4 into main Dec 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants