Files
opencode/packages
Developer d2bf8aa630 fix(session): tolerate pre-#24512 model JSON shape in fromRow
Closes #26435.

Sessions created before #24512 (commit a3bc5d35b, 2026-05-02) wrote
the `model` column as { providerID, modelID }. That PR renamed the
shape to { id, providerID, variant } and updated `fromRow` to read
row.model.id, but only updated the Drizzle \$type<>() annotation —
the on-disk JSON of existing rows was not migrated. fromRow now
crashes on those legacy rows with 'Expected string, got undefined',
killing the whole session list (no per-row containment).

Fall back to row.model.modelID when row.model.id is absent. Newly
written rows still use the new shape; this only affects reads of
legacy data.
2026-05-09 16:07:23 -04:00
..
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00
2026-01-21 14:36:21 -06:00
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00