-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Haiku 4.5 computer use support #1137
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
Conversation
🦋 Changeset detectedLatest commit: 52daea0 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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
Summary
Added support for Anthropic's new Claude Haiku 4.5 model (claude-haiku-4-5-20251001) by registering it in the agent provider mapping. The model is correctly mapped to the anthropic provider type, allowing it to be used with the existing AnthropicCUAClient.
- Added
claude-haiku-4-5-20251001tomodelToAgentProviderMapin lib/agent/AgentProvider.ts:18 - Included proper changeset for version bump documentation
- Issue:
stagehand.config.tscontains an unrelated change (default model switched fromgpt-4otoopenai/gpt-4.1-mini) that should be reverted
Confidence Score: 2/5
- This PR should not be merged until the unrelated config change is reverted
- The core change (adding Haiku 4.5 support) is correct and safe, but the PR includes an unrelated modification to the default model in the config file that changes production behavior and should be removed
stagehand.config.tsneeds the unrelated model change reverted before merge
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| .changeset/gentle-beds-enjoy.md | 5/5 | Properly formatted changeset documenting the patch version bump for Haiku 4.5 support |
| lib/agent/AgentProvider.ts | 5/5 | Added claude-haiku-4-5-20251001 to the model mapping for Anthropic provider |
| stagehand.config.ts | 0/5 | Contains unrelated change to default model (gpt-4o → openai/gpt-4.1-mini) that shouldn't be in this PR |
Sequence Diagram
sequenceDiagram
participant User
participant AgentProvider
participant modelToAgentProviderMap
participant AnthropicCUAClient
User->>AgentProvider: getClient("claude-haiku-4-5-20251001", options)
AgentProvider->>AgentProvider: getAgentProvider(modelName)
AgentProvider->>modelToAgentProviderMap: lookup "claude-haiku-4-5-20251001"
modelToAgentProviderMap-->>AgentProvider: return "anthropic"
AgentProvider->>AnthropicCUAClient: new AnthropicCUAClient("anthropic", "claude-haiku-4-5-20251001", ...)
AnthropicCUAClient-->>AgentProvider: client instance
AgentProvider-->>User: return AnthropicCUAClient
2 files reviewed, 1 comment
|
|
||
| // LLM configuration | ||
| modelName: "gpt-4o" /* Name of the model to use */, | ||
| modelName: "openai/gpt-4.1-mini" /* Name of the model to use */, |
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.
logic: unrelated change - reverting default model from gpt-4o to openai/gpt-4.1-mini shouldn't be part of this PR
| modelName: "openai/gpt-4.1-mini" /* Name of the model to use */, | |
| modelName: "gpt-4o" /* Name of the model to use */, |
Prompt To Fix With AI
This is a comment left during a code review.
Path: stagehand.config.ts
Line: 10:10
Comment:
**logic:** unrelated change - reverting default model from `gpt-4o` to `openai/gpt-4.1-mini` shouldn't be part of this PR
```suggestion
modelName: "gpt-4o" /* Name of the model to use */,
```
How can I resolve this? If you propose a fix, please make it concise.
why
New model dropped
what changed
Added support for haiku 4.5
test plan