feat(cli): add model fallback system with provider priority

Implements intelligent model selection based on available providers.
Priority order: Native > Copilot > OpenCode Zen > Z.ai > Ultimate Fallback.

- Add model-fallback.ts with MODEL_CATALOG and capability-based resolution
- Extend InstallConfig with hasOpencodeZen and hasZaiCodingPlan
- Add TUI prompts and CLI args for new provider options
- Z.ai gets Librarian priority (zai-coding-plan/glm-4.7)

🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
justsisyphus
2026-01-21 00:05:51 +09:00
parent 2a916b9d89
commit 72976f7f17
7 changed files with 368 additions and 55 deletions
+6
View File
@@ -6,6 +6,8 @@ export interface InstallArgs {
claude?: ClaudeSubscription
gemini?: BooleanArg
copilot?: BooleanArg
opencodeZen?: BooleanArg
zaiCodingPlan?: BooleanArg
skipAuth?: boolean
}
@@ -14,6 +16,8 @@ export interface InstallConfig {
isMax20: boolean
hasGemini: boolean
hasCopilot: boolean
hasOpencodeZen: boolean
hasZaiCodingPlan: boolean
}
export interface ConfigMergeResult {
@@ -28,4 +32,6 @@ export interface DetectedConfig {
isMax20: boolean
hasGemini: boolean
hasCopilot: boolean
hasOpencodeZen: boolean
hasZaiCodingPlan: boolean
}