-
Notifications
You must be signed in to change notification settings - Fork 843
add new models #867
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?
add new models #867
Conversation
🦋 Changeset detectedLatest commit: b79c792 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.
PR Summary
Added support for new Anthropic and OpenAI Computer Use API models with corresponding configuration updates across multiple client files.
- Security Issue: Added API key logging in
lib/agent/AnthropicCUAClient.ts
which poses a potential security risk - Type Error: Introduced type incompatibility in
lib/agent/AgentClient.ts
between OpenAI and Anthropic ClientOptions - Bug: Runtime error in
lib/agent/OpenAICUAClient.ts
due to accessingthis.clientOptions
before initialization - Updated computer types: Claude 3.5 uses type '20241022' while newer models use '20250124'
- Inconsistency: Changed
baseUrl
tobaseURL
in configuration but not uniformly across all files
5 files reviewed, 5 comments
Edit PR Review Bot Settings | Greptile
"claude-3-7-sonnet-latest": "anthropic", | ||
"claude-3-7-sonnet-20250219": "anthropic", | ||
"claude-3-5-sonnet-latest": "anthropic", | ||
"claude-3-5-sonnet-20241022": "anthropic", |
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.
style: Consider sorting model versions chronologically - 20240620 appears after 20241022
lib/agent/AgentClient.ts
Outdated
@@ -4,6 +4,7 @@ import { | |||
AgentType, | |||
AgentExecutionOptions, | |||
} from "@/types/agent"; | |||
import { ClientOptions } from "@anthropic-ai/sdk"; |
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.
style: importing ClientOptions from Anthropic SDK when this is a base class that should be implementation-agnostic. Consider moving specific SDK types to the implementing classes.
import { ClientOptions } from "@anthropic-ai/sdk"; | |
import type { LLMClientOptions } from "@/types/llm"; |
lib/agent/AnthropicCUAClient.ts
Outdated
@@ -42,6 +42,7 @@ export class AnthropicCUAClient extends AgentClient { | |||
// Process client options | |||
this.apiKey = | |||
(clientOptions?.apiKey as string) || process.env.ANTHROPIC_API_KEY || ""; | |||
console.log("USING API KEY", this.apiKey); |
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: Logging API keys is a security risk. Consider removing this line or masking the key
console.log("USING API KEY", this.apiKey); | |
// this.apiKey is set; |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…ithub.com/browserbase/stagehand into sarif/bb-1089-update-supported-cua-models
// Get thinking budget if specified | ||
if ( | ||
clientOptions?.thinkingBudget && | ||
typeof clientOptions.thinkingBudget === "number" | ||
) { | ||
this.thinkingBudget = clientOptions.thinkingBudget; | ||
} | ||
|
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.
removed since the key did not exist on the client options type
if ( | ||
clientOptions?.environment && | ||
typeof clientOptions.environment === "string" | ||
) { | ||
this.environment = clientOptions.environment; |
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.
removed since the environment key did not exist on the client options type
why
we need to add support for new computer use models
what changed
added to the list of supported models for CUA. also updated the legacy model lists until we fully migrate to AI SDK
test plan