Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[CE-483][docs] Add model object format warning#1248

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
chrisreadsf wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromchris/docs/model-object-format

Conversation

@chrisreadsf
Copy link
Member

why

Currently broken - user spent 3 hours to figure out

what changed

Stagehand Init:

Screenshot 2025-11-07 at 11 19 44

Stagehand Agent:

Screenshot 2025-11-07 at 11 19 58

test plan

greptile-apps[bot] reacted with thumbs up emoji
@changeset-bot
Copy link

⚠️ No Changeset found

Latest commit:6a1d03b

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

Copy link
Contributor

@greptile-appsgreptile-appsbot left a comment
edited
Loading

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Added warning callouts to notify users that automatic environment variable loading for model API keys is currently broken, providing workaround using explicit model object configuration.

Key Changes:

  • Added prominent warning callout at top of Configuration Setup section
  • Added second warning callout in Agent Models section with CUA-specific example
  • Both warnings include code examples showing model object format with explicitapiKey parameter

Critical Issue:

  • Uses incorrect property namemodel instead ofmodelName in all workaround code examples (4 occurrences)
  • This will cause the workaround itself to fail, defeating the purpose of the documentation update

Confidence Score: 0/5

  • This PR cannot be merged as-is - it contains syntax errors that make the documented workaround non-functional
  • Score reflects critical syntax errors in documentation examples. The PR attempts to document a workaround for broken environment variable auto-loading, but uses incorrect property names (model instead ofmodelName) in all code examples. This will cause users following the documentation to encounter errors, making the problem worse rather than better.
  • packages/docs/v3/configuration/models.mdx requires immediate fixes to all model object property names

Important Files Changed

File Analysis

FilenameScoreOverview
packages/docs/v3/configuration/models.mdx1/5Added warning callouts about broken auto-loading of environment variables, but incorrect property name (model instead ofmodelName) used in workaround code examples

Sequence Diagram

sequenceDiagram    participant User    participant Docs as Documentation    participant Stagehand as Stagehand Init    participant Agent as Agent Creation        User->>Docs: Read models.mdx    Docs-->>User: Warning: Auto env loading broken    Docs-->>User: Use model object format        User->>Stagehand: new Stagehand({ model: { modelName, apiKey } })    Stagehand->>Stagehand: Load model config    Stagehand->>Stagehand: Initialize with explicit API key    Stagehand-->>User: Initialized        User->>Agent: stagehand.agent({ model: { modelName, apiKey } })    Agent->>Agent: Load agent model config    Agent->>Agent: Initialize with explicit API key    Agent-->>User: Agent ready
Loading

Additional Comments (2)

  1. packages/docs/v3/configuration/models.mdx, line 596-597 (link)

    syntax: property name should bemodelName, notmodel

  2. packages/docs/v3/configuration/models.mdx, line 613-614 (link)

    syntax: property name should bemodelName, notmodel

1 file reviewed, 4 comments

Edit Code Review Agent Settings |Greptile

Comment on lines +18 to +19
model: {
model:"google/gemini-2.5-flash",
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: property name should bemodelName, notmodel

Suggested change
model:{
model: "google/gemini-2.5-flash",
modelName: "google/gemini-2.5-flash",
Prompt To Fix With AI
This is a comment left during a code review.Path: packages/docs/v3/configuration/models.mdxLine: 18:19Comment:**syntax:** property name should be`modelName`, not`model````suggestion    modelName: "google/gemini-2.5-flash",```How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +490 to +491
model: {
model:"google/gemini-2.5-computer-use-preview-10-2025",
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: property name should bemodelName, notmodel

Suggested change
model:{
model: "google/gemini-2.5-computer-use-preview-10-2025",
modelName: "google/gemini-2.5-computer-use-preview-10-2025",
Prompt To Fix With AI
This is a comment left during a code review.Path: packages/docs/v3/configuration/models.mdxLine: 490:491Comment:**syntax:** property name should be`modelName`, not`model````suggestion    modelName: "google/gemini-2.5-computer-use-preview-10-2025",```How can I resolve this? If you propose a fix, please make it concise.

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

Reviewers

1 more reviewer

@greptile-appsgreptile-apps[bot]greptile-apps[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@chrisreadsf

[8]ページ先頭

©2009-2025 Movatter.jp