Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/core/lib/v3/agent/AgentProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const modelToAgentProviderMap: Record<string, AgentProviderType> = {
"claude-sonnet-4-20250514": "anthropic",
"claude-sonnet-4-5-20250929": "anthropic",
"claude-opus-4-5-20251101": "anthropic",
"claude-opus-4-6": "anthropic",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 5, 2026

Choose a reason for hiding this comment

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

P1: Rule violated: Ensure we never check against hardcoded lists of allowed LLM model names

This change adds a hardcoded allowed model name to the model-to-provider map, violating the rule to avoid hardcoded lists of allowed LLM models. Update the logic to accept any model name (preferably provider/model-name) and let the provider validate availability instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/core/lib/v3/agent/AgentProvider.ts, line 23:

<comment>This change adds a hardcoded allowed model name to the model-to-provider map, violating the rule to avoid hardcoded lists of allowed LLM models. Update the logic to accept any model name (preferably provider/model-name) and let the provider validate availability instead.</comment>

<file context>
@@ -20,6 +20,7 @@ export const modelToAgentProviderMap: Record<string, AgentProviderType> = {
   "claude-sonnet-4-20250514": "anthropic",
   "claude-sonnet-4-5-20250929": "anthropic",
   "claude-opus-4-5-20251101": "anthropic",
+  "claude-opus-4-6": "anthropic",
   "claude-haiku-4-5-20251001": "anthropic",
   "gemini-2.5-computer-use-preview-10-2025": "google",
</file context>
Fix with Cubic

Copy link
Contributor

Choose a reason for hiding this comment

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

Check that claude-opus-4-6 is the official model identifier from Anthropic's API. All other Claude models include date suffixes (e.g., claude-opus-4-5-20251101), but this one doesn't follow the pattern.

Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/core/lib/v3/agent/AgentProvider.ts
Line: 23:23

Comment:
Check that `claude-opus-4-6` is the official model identifier from Anthropic's API. All other Claude models include date suffixes (e.g., `claude-opus-4-5-20251101`), but this one doesn't follow the pattern.

How can I resolve this? If you propose a fix, please make it concise.

"claude-haiku-4-5-20251001": "anthropic",
"gemini-2.5-computer-use-preview-10-2025": "google",
"gemini-3-flash-preview": "google",
Expand Down
1 change: 1 addition & 0 deletions packages/core/lib/v3/types/public/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ export const AVAILABLE_CUA_MODELS = [
"openai/computer-use-preview-2025-03-11",
"anthropic/claude-3-7-sonnet-latest",
"anthropic/claude-opus-4-5-20251101",
"anthropic/claude-opus-4-6",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 5, 2026

Choose a reason for hiding this comment

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

P1: Rule violated: Ensure we never check against hardcoded lists of allowed LLM model names

Avoid extending hardcoded allowlists of LLM model names. The rule requires accepting any provider/model-name instead of adding more entries to lists like AVAILABLE_CUA_MODELS; please replace this allowlist-based check with validation that does not hardcode model names (unless explicitly blocking known-bad models).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/core/lib/v3/types/public/agent.ts, line 374:

<comment>Avoid extending hardcoded allowlists of LLM model names. The rule requires accepting any provider/model-name instead of adding more entries to lists like AVAILABLE_CUA_MODELS; please replace this allowlist-based check with validation that does not hardcode model names (unless explicitly blocking known-bad models).</comment>

<file context>
@@ -371,6 +371,7 @@ export const AVAILABLE_CUA_MODELS = [
   "openai/computer-use-preview-2025-03-11",
   "anthropic/claude-3-7-sonnet-latest",
   "anthropic/claude-opus-4-5-20251101",
+  "anthropic/claude-opus-4-6",
   "anthropic/claude-haiku-4-5-20251001",
   "anthropic/claude-sonnet-4-20250514",
</file context>
Fix with Cubic

"anthropic/claude-haiku-4-5-20251001",
"anthropic/claude-sonnet-4-20250514",
"anthropic/claude-sonnet-4-5-20250929",
Expand Down
1 change: 1 addition & 0 deletions packages/core/tests/public-api/llm-and-agents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe("LLM and Agents public API types", () => {
"openai/computer-use-preview-2025-03-11",
"anthropic/claude-3-7-sonnet-latest",
"anthropic/claude-opus-4-5-20251101",
"anthropic/claude-opus-4-6",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Feb 5, 2026

Choose a reason for hiding this comment

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

P1: Rule violated: Ensure we never check against hardcoded lists of allowed LLM model names

This change extends a hardcoded allow-list of LLM model names. The rule (“Ensure we never check against hardcoded lists of allowed LLM model names”) forbids adding or updating such lists, even in tests. Please refactor the test to avoid asserting against a fixed model-name list (e.g., validate provider/model-name format or defer to provider validation) instead of enumerating specific models.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/core/tests/public-api/llm-and-agents.test.ts, line 29:

<comment>This change extends a hardcoded allow-list of LLM model names. The rule (“Ensure we never check against hardcoded lists of allowed LLM model names”) forbids adding or updating such lists, even in tests. Please refactor the test to avoid asserting against a fixed model-name list (e.g., validate provider/model-name format or defer to provider validation) instead of enumerating specific models.</comment>

<file context>
@@ -26,6 +26,7 @@ describe("LLM and Agents public API types", () => {
       "openai/computer-use-preview-2025-03-11",
       "anthropic/claude-3-7-sonnet-latest",
       "anthropic/claude-opus-4-5-20251101",
+      "anthropic/claude-opus-4-6",
       "anthropic/claude-haiku-4-5-20251001",
       "anthropic/claude-sonnet-4-20250514",
</file context>
Fix with Cubic

"anthropic/claude-haiku-4-5-20251001",
"anthropic/claude-sonnet-4-20250514",
"anthropic/claude-sonnet-4-5-20250929",
Expand Down
Loading