Skip to content

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

sameelarif
Copy link
Member

@sameelarif sameelarif commented Jul 10, 2025

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

Copy link

changeset-bot bot commented Jul 10, 2025

🦋 Changeset detected

Latest 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

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.

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 accessing this.clientOptions before initialization
  • Updated computer types: Claude 3.5 uses type '20241022' while newer models use '20250124'
  • Inconsistency: Changed baseUrl to baseURL 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",
Copy link
Contributor

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

@@ -4,6 +4,7 @@ import {
AgentType,
AgentExecutionOptions,
} from "@/types/agent";
import { ClientOptions } from "@anthropic-ai/sdk";
Copy link
Contributor

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.

Suggested change
import { ClientOptions } from "@anthropic-ai/sdk";
import type { LLMClientOptions } from "@/types/llm";

@@ -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);
Copy link
Contributor

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

Suggested change
console.log("USING API KEY", this.apiKey);
// this.apiKey is set;

sameelarif and others added 5 commits July 9, 2025 16:40
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>
Comment on lines -47 to -54
// Get thinking budget if specified
if (
clientOptions?.thinkingBudget &&
typeof clientOptions.thinkingBudget === "number"
) {
this.thinkingBudget = clientOptions.thinkingBudget;
}

Copy link
Member Author

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

Comment on lines -48 to -52
if (
clientOptions?.environment &&
typeof clientOptions.environment === "string"
) {
this.environment = clientOptions.environment;
Copy link
Member Author

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

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.

1 participant