Files
oh-my-opencode/src/cli/types.ts
T
justsisyphus 72976f7f17 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)
2026-01-21 11:19:00 +09:00

38 lines
762 B
TypeScript

export type ClaudeSubscription = "no" | "yes" | "max20"
export type BooleanArg = "no" | "yes"
export interface InstallArgs {
tui: boolean
claude?: ClaudeSubscription
gemini?: BooleanArg
copilot?: BooleanArg
opencodeZen?: BooleanArg
zaiCodingPlan?: BooleanArg
skipAuth?: boolean
}
export interface InstallConfig {
hasClaude: boolean
isMax20: boolean
hasGemini: boolean
hasCopilot: boolean
hasOpencodeZen: boolean
hasZaiCodingPlan: boolean
}
export interface ConfigMergeResult {
success: boolean
configPath: string
error?: string
}
export interface DetectedConfig {
isInstalled: boolean
hasClaude: boolean
isMax20: boolean
hasGemini: boolean
hasCopilot: boolean
hasOpencodeZen: boolean
hasZaiCodingPlan: boolean
}