Skip to content

fix(opencode-go): fallback to message table on older OpenCode DB schema#19

Merged
symonbaikov merged 1 commit into
mainfrom
feat/fix-opencode-go-sync
Jun 23, 2026
Merged

fix(opencode-go): fallback to message table on older OpenCode DB schema#19
symonbaikov merged 1 commit into
mainfrom
feat/fix-opencode-go-sync

Conversation

@symonbaikov

Copy link
Copy Markdown
Collaborator

Summary

  • Detects OpenCode DB schema via PRAGMA table_info(session).
  • Falls back to reading assistant message costs from the message table when session.cost / session.model columns are missing (older local databases).
  • Updates tests and provider docs for the fallback behavior.

Why

Older OpenCode databases do not have cost and model columns on the session table yet, causing the plugin query to fail and display No usage data even when OpenCode Go has real usage.

Older OpenCode databases may not have session.cost/model columns yet.
Detect the schema via PRAGMA table_info and read assistant message
costs from the message table when needed.
@symonbaikov symonbaikov merged commit a40a64e into main Jun 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant