mirror of
https://github.com/aljazceru/opencode.git
synced 2026-02-03 15:15:08 +01:00
fix: opencode run not parsing model string
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user