mirror of
https://github.com/stablyai/orca.git
synced 2026-11-04 19:17:28 +00:00
fix(opencode): accept OpenCode release ranges for launch-time model selection (#33307)
OpenCode model selection accepts per-major floors (1.x >= 1.18.30, 2.x >= 2.0.14; prereleases and 3.x refused) instead of exact version allowlists, so current releases launch with a picked model again. Fixes #26611. Supersedes #26683, #31985. Co-authored-by: ggbdpq <67929842+ggbdpq@users.noreply.github.com>
This commit is contained in:
@@ -71,7 +71,7 @@ export function parseOpenCodeLaunchModelContext(options: {
|
||||
) {
|
||||
return null
|
||||
}
|
||||
// Installed 2.0.16 returns the selected default first; newer source has a different order.
|
||||
// OpenCode 2.x `agent.list` returns the selected default agent first.
|
||||
const primary = agents.data.data.find((item) => item.mode !== 'subagent' && !item.hidden)
|
||||
const configured = config.data.reduce<string | undefined>(
|
||||
(value, entry) => entry.info?.default_agent ?? value,
|
||||
|
||||
Reference in New Issue
Block a user