From 617e53605a12cd8a558ea8f4b54847f6fd017aad Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 18 Feb 2026 17:43:07 +0900 Subject: [PATCH] feat(cli): use sonnet-4-6 with ultrawork opus-4-6 for non-max20 Claude subscribers --- docs/guide/installation.md | 9 +++++ .../__snapshots__/model-fallback.test.ts.snap | 36 +++++++++++++++---- src/cli/config-manager.test.ts | 18 ++++++---- src/cli/model-fallback-types.ts | 6 ++++ src/cli/model-fallback.ts | 10 ++++++ 5 files changed, 66 insertions(+), 13 deletions(-) diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 051887c2d..f266a9907 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -68,6 +68,15 @@ Ask the user these questions to determine CLI options: **Provider Priority**: Native (anthropic/, openai/, google/) > GitHub Copilot > OpenCode Zen > Z.ai Coding Plan +#### Claude Subscription Model Assignments + +| Subscription | Sisyphus (Daily) | Ultrawork Mode | +| ------------ | ---------------- | -------------- | +| **max20** | `anthropic/claude-opus-4-6` (max) | Already on Opus — no override | +| **standard** | `anthropic/claude-sonnet-4-6` (max) | `anthropic/claude-opus-4-6` (max) | + +Standard Claude subscribers use Sonnet 4.6 for daily driving and automatically switch to Opus 4.6 when ultrawork mode is activated (by typing `ultrawork` or `ulw`). + MUST STRONGLY WARNING, WHEN USER SAID THEY DON'T HAVE CLAUDE SUBSCRIPTION, SISYPHUS AGENT MIGHT NOT WORK IDEALLY. ### Step 1: Install OpenCode (if not installed) diff --git a/src/cli/__snapshots__/model-fallback.test.ts.snap b/src/cli/__snapshots__/model-fallback.test.ts.snap index e545a186e..a7069aed0 100644 --- a/src/cli/__snapshots__/model-fallback.test.ts.snap +++ b/src/cli/__snapshots__/model-fallback.test.ts.snap @@ -94,7 +94,11 @@ exports[`generateModelConfig single native provider uses Claude models when only "variant": "max", }, "sisyphus": { - "model": "anthropic/claude-opus-4-6", + "model": "anthropic/claude-sonnet-4-6", + "ultrawork": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + }, "variant": "max", }, }, @@ -479,7 +483,11 @@ exports[`generateModelConfig all native providers uses preferred models from fal "variant": "max", }, "sisyphus": { - "model": "anthropic/claude-opus-4-6", + "model": "anthropic/claude-sonnet-4-6", + "ultrawork": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + }, "variant": "max", }, }, @@ -1036,7 +1044,11 @@ exports[`generateModelConfig mixed provider scenarios uses Claude + OpenCode Zen "variant": "max", }, "sisyphus": { - "model": "anthropic/claude-opus-4-6", + "model": "anthropic/claude-sonnet-4-6", + "ultrawork": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + }, "variant": "max", }, }, @@ -1180,7 +1192,11 @@ exports[`generateModelConfig mixed provider scenarios uses Claude + ZAI combinat "variant": "max", }, "sisyphus": { - "model": "anthropic/claude-opus-4-6", + "model": "anthropic/claude-sonnet-4-6", + "ultrawork": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + }, "variant": "max", }, }, @@ -1241,7 +1257,11 @@ exports[`generateModelConfig mixed provider scenarios uses Gemini + Claude combi "variant": "max", }, "sisyphus": { - "model": "anthropic/claude-opus-4-6", + "model": "anthropic/claude-sonnet-4-6", + "ultrawork": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + }, "variant": "max", }, }, @@ -1385,7 +1405,11 @@ exports[`generateModelConfig mixed provider scenarios uses all providers togethe "variant": "max", }, "sisyphus": { - "model": "anthropic/claude-opus-4-6", + "model": "anthropic/claude-sonnet-4-6", + "ultrawork": { + "model": "anthropic/claude-opus-4-6", + "variant": "max", + }, "variant": "max", }, }, diff --git a/src/cli/config-manager.test.ts b/src/cli/config-manager.test.ts index ccfeb5566..1d6b0a071 100644 --- a/src/cli/config-manager.test.ts +++ b/src/cli/config-manager.test.ts @@ -240,7 +240,7 @@ describe("config-manager ANTIGRAVITY_PROVIDER_CONFIG", () => { }) describe("generateOmoConfig - model fallback system", () => { - test("generates native sonnet models when Claude standard subscription", () => { + test("generates sonnet model with ultrawork opus for Claude standard subscription", () => { // #given user has Claude standard subscription (not max20) const config: InstallConfig = { hasClaude: true, @@ -256,13 +256,15 @@ describe("generateOmoConfig - model fallback system", () => { // #when generating config const result = generateOmoConfig(config) - // #then Sisyphus uses Claude (OR logic - at least one provider available) + // #then Sisyphus uses sonnet for daily driving with ultrawork opus override + const sisyphus = (result.agents as Record).sisyphus expect(result.$schema).toBe("https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json") - expect(result.agents).toBeDefined() - expect((result.agents as Record).sisyphus.model).toBe("anthropic/claude-opus-4-6") + expect(sisyphus.model).toBe("anthropic/claude-sonnet-4-6") + expect(sisyphus.variant).toBe("max") + expect(sisyphus.ultrawork).toEqual({ model: "anthropic/claude-opus-4-6", variant: "max" }) }) - test("generates native opus models when Claude max20 subscription", () => { + test("generates native opus models without ultrawork when Claude max20 subscription", () => { // #given user has Claude max20 subscription const config: InstallConfig = { hasClaude: true, @@ -278,8 +280,10 @@ describe("generateOmoConfig - model fallback system", () => { // #when generating config const result = generateOmoConfig(config) - // #then Sisyphus uses Claude (OR logic - at least one provider available) - expect((result.agents as Record).sisyphus.model).toBe("anthropic/claude-opus-4-6") + // #then Sisyphus uses opus directly, no ultrawork override needed + const sisyphus = (result.agents as Record).sisyphus + expect(sisyphus.model).toBe("anthropic/claude-opus-4-6") + expect(sisyphus.ultrawork).toBeUndefined() }) test("uses github-copilot sonnet fallback when only copilot available", () => { diff --git a/src/cli/model-fallback-types.ts b/src/cli/model-fallback-types.ts index 98dcab86e..6f62a36fa 100644 --- a/src/cli/model-fallback-types.ts +++ b/src/cli/model-fallback-types.ts @@ -11,9 +11,15 @@ export interface ProviderAvailability { isMaxPlan: boolean } +export interface UltraworkConfig { + model: string + variant?: string +} + export interface AgentConfig { model: string variant?: string + ultrawork?: UltraworkConfig } export interface CategoryConfig { diff --git a/src/cli/model-fallback.ts b/src/cli/model-fallback.ts index bbc8e02c1..df2764e10 100644 --- a/src/cli/model-fallback.ts +++ b/src/cli/model-fallback.ts @@ -75,6 +75,16 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig { if (req.requiresAnyModel && !isAnyFallbackEntryAvailable(fallbackChain, avail)) { continue } + + if (avail.native.claude && !avail.isMaxPlan) { + agents[role] = { + model: "anthropic/claude-sonnet-4-6", + variant: "max", + ultrawork: { model: "anthropic/claude-opus-4-6", variant: "max" }, + } + continue + } + const resolved = resolveModelFromChain(fallbackChain, avail) if (resolved) { const variant = resolved.variant ?? req.variant