respect model id in opencode.json (#2833)
Some checks are pending
deploy / deploy (push) Waiting to run
format / format (push) Waiting to run
snapshot / publish (push) Waiting to run
test / test (push) Waiting to run

This commit is contained in:
Aiden Cline 2025-09-27 17:09:21 -05:00 committed by GitHub
parent 4b429029df
commit 89167ae387
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,