respect model id in opencode.json (#2833)

This commit is contained in:
Aiden Cline
2025-09-27 17:09:21 -05:00
committed by GitHub
parent 4b429029df
commit 89167ae387

View File

@@ -215,7 +215,7 @@ export namespace Provider {
for (const [modelID, model] of Object.entries(provider.models ?? {})) {
const existing = parsed.models[modelID]
const parsedModel: ModelsDev.Model = {
id: modelID,
id: model.id ?? modelID,
name: model.name ?? existing?.name ?? modelID,
release_date: model.release_date ?? existing?.release_date,
attachment: model.attachment ?? existing?.attachment ?? false,