feat(opencode-go): integrate into model fallback chain resolution
This commit is contained in:
@@ -33,8 +33,8 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
|||||||
avail.opencodeZen ||
|
avail.opencodeZen ||
|
||||||
avail.copilot ||
|
avail.copilot ||
|
||||||
avail.zai ||
|
avail.zai ||
|
||||||
avail.kimiForCoding
|
avail.kimiForCoding ||
|
||||||
|
avail.opencodeGo
|
||||||
if (!hasAnyProvider) {
|
if (!hasAnyProvider) {
|
||||||
return {
|
return {
|
||||||
$schema: SCHEMA_URL,
|
$schema: SCHEMA_URL,
|
||||||
@@ -53,8 +53,12 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
|||||||
const categories: Record<string, CategoryConfig> = {}
|
const categories: Record<string, CategoryConfig> = {}
|
||||||
|
|
||||||
for (const [role, req] of Object.entries(CLI_AGENT_MODEL_REQUIREMENTS)) {
|
for (const [role, req] of Object.entries(CLI_AGENT_MODEL_REQUIREMENTS)) {
|
||||||
if (role === "librarian" && avail.zai) {
|
if (role === "librarian") {
|
||||||
agents[role] = { model: ZAI_MODEL }
|
if (avail.opencodeGo) {
|
||||||
|
agents[role] = { model: "opencode-go/minimax-m2.5" }
|
||||||
|
} else if (avail.zai) {
|
||||||
|
agents[role] = { model: ZAI_MODEL }
|
||||||
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +67,8 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig {
|
|||||||
agents[role] = { model: "anthropic/claude-haiku-4-5" }
|
agents[role] = { model: "anthropic/claude-haiku-4-5" }
|
||||||
} else if (avail.opencodeZen) {
|
} else if (avail.opencodeZen) {
|
||||||
agents[role] = { model: "opencode/claude-haiku-4-5" }
|
agents[role] = { model: "opencode/claude-haiku-4-5" }
|
||||||
|
} else if (avail.opencodeGo) {
|
||||||
|
agents[role] = { model: "opencode-go/minimax-m2.5" }
|
||||||
} else if (avail.copilot) {
|
} else if (avail.copilot) {
|
||||||
agents[role] = { model: "github-copilot/gpt-5-mini" }
|
agents[role] = { model: "github-copilot/gpt-5-mini" }
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user