fix: opencode run not parsing model string

This commit is contained in:
Aiden Cline
2025-11-06 12:09:04 -06:00
parent 3c2803fd9a
commit de1278414f

View File

@@ -9,6 +9,7 @@ import { EOL } from "os"
import { select } from "@clack/prompts"
import { createOpencodeClient, type OpencodeClient } from "@opencode-ai/sdk"
import { Server } from "../../server/server"
import { Provider } from "../../provider/provider"
const TOOL: Record<string, [string, string]> = {
todowrite: ["Todo", UI.Style.TEXT_WARNING_BOLD],
@@ -237,12 +238,7 @@ export const RunCommand = cmd({
},
})
} else {
const modelParam = args.model
? (() => {
const [providerID, modelID] = args.model.split("/")
return { providerID, modelID }
})()
: undefined
const modelParam = args.model ? Provider.parseModel(args.model) : undefined
await sdk.session.prompt({
path: { id: sessionID },
body: {