Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/opencode/src/acp/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,9 @@ async function defaultModel(config: ACPConfig, cwd?: string): Promise<{ provider
if (specified && providers.length) {
const provider = providers.find((p) => p.id === specified.providerID)
if (provider && provider.models[specified.modelID]) return specified
// Provider not yet loaded or model not found — still honor the user's explicit choice
// rather than falling through to Provider.sort() which may pick a paid model
if (!provider || !provider.models[specified.modelID]) return specified
}

if (specified && !providers.length) return specified
Expand Down