feat(cli): use sonnet-4-6 with ultrawork opus-4-6 for non-max20 Claude subscribers
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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<string, { model: string; variant?: string; ultrawork?: { model: string; variant?: string } }>).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<string, { model: string }>).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<string, { model: string }>).sisyphus.model).toBe("anthropic/claude-opus-4-6")
|
||||
// #then Sisyphus uses opus directly, no ultrawork override needed
|
||||
const sisyphus = (result.agents as Record<string, { model: string; ultrawork?: unknown }>).sisyphus
|
||||
expect(sisyphus.model).toBe("anthropic/claude-opus-4-6")
|
||||
expect(sisyphus.ultrawork).toBeUndefined()
|
||||
})
|
||||
|
||||
test("uses github-copilot sonnet fallback when only copilot available", () => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user