feat(cli): use sonnet-4-6 with ultrawork opus-4-6 for non-max20 Claude subscribers
This commit is contained in:
parent
376bd7428a
commit
617e53605a
@ -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
|
**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.
|
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)
|
### Step 1: Install OpenCode (if not installed)
|
||||||
|
|||||||
@ -94,9 +94,13 @@ exports[`generateModelConfig single native provider uses Claude models when only
|
|||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
"sisyphus": {
|
"sisyphus": {
|
||||||
|
"model": "anthropic/claude-sonnet-4-6",
|
||||||
|
"ultrawork": {
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "anthropic/claude-opus-4-6",
|
||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
|
"variant": "max",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"quick": {
|
"quick": {
|
||||||
@ -479,9 +483,13 @@ exports[`generateModelConfig all native providers uses preferred models from fal
|
|||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
"sisyphus": {
|
"sisyphus": {
|
||||||
|
"model": "anthropic/claude-sonnet-4-6",
|
||||||
|
"ultrawork": {
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "anthropic/claude-opus-4-6",
|
||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
|
"variant": "max",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"artistry": {
|
"artistry": {
|
||||||
@ -1036,9 +1044,13 @@ exports[`generateModelConfig mixed provider scenarios uses Claude + OpenCode Zen
|
|||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
"sisyphus": {
|
"sisyphus": {
|
||||||
|
"model": "anthropic/claude-sonnet-4-6",
|
||||||
|
"ultrawork": {
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "anthropic/claude-opus-4-6",
|
||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
|
"variant": "max",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"artistry": {
|
"artistry": {
|
||||||
@ -1180,9 +1192,13 @@ exports[`generateModelConfig mixed provider scenarios uses Claude + ZAI combinat
|
|||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
"sisyphus": {
|
"sisyphus": {
|
||||||
|
"model": "anthropic/claude-sonnet-4-6",
|
||||||
|
"ultrawork": {
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "anthropic/claude-opus-4-6",
|
||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
|
"variant": "max",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"quick": {
|
"quick": {
|
||||||
@ -1241,9 +1257,13 @@ exports[`generateModelConfig mixed provider scenarios uses Gemini + Claude combi
|
|||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
"sisyphus": {
|
"sisyphus": {
|
||||||
|
"model": "anthropic/claude-sonnet-4-6",
|
||||||
|
"ultrawork": {
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "anthropic/claude-opus-4-6",
|
||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
|
"variant": "max",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"artistry": {
|
"artistry": {
|
||||||
@ -1385,9 +1405,13 @@ exports[`generateModelConfig mixed provider scenarios uses all providers togethe
|
|||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
"sisyphus": {
|
"sisyphus": {
|
||||||
|
"model": "anthropic/claude-sonnet-4-6",
|
||||||
|
"ultrawork": {
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "anthropic/claude-opus-4-6",
|
||||||
"variant": "max",
|
"variant": "max",
|
||||||
},
|
},
|
||||||
|
"variant": "max",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"artistry": {
|
"artistry": {
|
||||||
|
|||||||
@ -240,7 +240,7 @@ describe("config-manager ANTIGRAVITY_PROVIDER_CONFIG", () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
describe("generateOmoConfig - model fallback system", () => {
|
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)
|
// #given user has Claude standard subscription (not max20)
|
||||||
const config: InstallConfig = {
|
const config: InstallConfig = {
|
||||||
hasClaude: true,
|
hasClaude: true,
|
||||||
@ -256,13 +256,15 @@ describe("generateOmoConfig - model fallback system", () => {
|
|||||||
// #when generating config
|
// #when generating config
|
||||||
const result = generateOmoConfig(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.$schema).toBe("https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json")
|
||||||
expect(result.agents).toBeDefined()
|
expect(sisyphus.model).toBe("anthropic/claude-sonnet-4-6")
|
||||||
expect((result.agents as Record<string, { model: string }>).sisyphus.model).toBe("anthropic/claude-opus-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
|
// #given user has Claude max20 subscription
|
||||||
const config: InstallConfig = {
|
const config: InstallConfig = {
|
||||||
hasClaude: true,
|
hasClaude: true,
|
||||||
@ -278,8 +280,10 @@ describe("generateOmoConfig - model fallback system", () => {
|
|||||||
// #when generating config
|
// #when generating config
|
||||||
const result = generateOmoConfig(config)
|
const result = generateOmoConfig(config)
|
||||||
|
|
||||||
// #then Sisyphus uses Claude (OR logic - at least one provider available)
|
// #then Sisyphus uses opus directly, no ultrawork override needed
|
||||||
expect((result.agents as Record<string, { model: string }>).sisyphus.model).toBe("anthropic/claude-opus-4-6")
|
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", () => {
|
test("uses github-copilot sonnet fallback when only copilot available", () => {
|
||||||
|
|||||||
@ -11,9 +11,15 @@ export interface ProviderAvailability {
|
|||||||
isMaxPlan: boolean
|
isMaxPlan: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface UltraworkConfig {
|
||||||
|
model: string
|
||||||
|
variant?: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface AgentConfig {
|
export interface AgentConfig {
|
||||||
model: string
|
model: string
|
||||||
variant?: string
|
variant?: string
|
||||||
|
ultrawork?: UltraworkConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CategoryConfig {
|
export interface CategoryConfig {
|
||||||
|
|||||||
@ -75,6 +75,16 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
|||||||
if (req.requiresAnyModel && !isAnyFallbackEntryAvailable(fallbackChain, avail)) {
|
if (req.requiresAnyModel && !isAnyFallbackEntryAvailable(fallbackChain, avail)) {
|
||||||
continue
|
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)
|
const resolved = resolveModelFromChain(fallbackChain, avail)
|
||||||
if (resolved) {
|
if (resolved) {
|
||||||
const variant = resolved.variant ?? req.variant
|
const variant = resolved.variant ?? req.variant
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user