-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
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.
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 explicit
apiKeyparameter
Critical Issue:
- Uses incorrect property name
modelinstead ofmodelNamein 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 (
modelinstead 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
| Filename | Score | Overview |
|---|---|---|
| packages/docs/v3/configuration/models.mdx | 1/5 | Added warning callouts about broken auto-loading of environment variables, but incorrect property name (model instead of modelName) 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
Additional Comments (2)
1 file reviewed, 4 comments
| model: { | ||
| model: "google/gemini-2.5-flash", |
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.
syntax: property name should be modelName, not model
| 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.mdx
Line: 18:19
Comment:
**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.| model: { | ||
| model: "google/gemini-2.5-computer-use-preview-10-2025", |
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.
syntax: property name should be modelName, not model
| 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.mdx
Line: 490:491
Comment:
**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.
why
Currently broken - user spent 3 hours to figure out
what changed
Stagehand Init:
Stagehand Agent:
test plan