You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCode: legacy models like other providers, and Z.AI Coding Plan 5-hour and 7-day usage
#12964
Two gaps in the OpenCode integration, seen on T3 Code 0.0.42 (server) with the Android app. Both already exist for other providers. This is a suggestion for a later release, not a request to change anyone's local install.
1. Show only current OpenCode models; put older ones behind Legacy models
Codex, Claude, and Antigravity already do this. The picker lists currentModels first and appends legacyModels only after the "Legacy models" row is expanded.
OpenCode does not. In 0.0.42:
isLegacyModel returns false for every slug when manifest.currentModels[driverKind] is missing.
The bundled manifest's currentModels lists codex, claudeAgent, and antigravity only. There is no opencode entry.
OpenCodeDriver never calls applyModelManifest.
flattenOpenCodeModels builds each model without isLegacy.
A connected OpenCode catalog (Zen, Go, OpenRouter, Z.AI Coding Plan) is therefore one flat list of hundreds of models. The Android model sheet has the Legacy control, but it stays empty for OpenCode because the server never sets the flag.
Suggested behavior, matching the other drivers:
Classify OpenCode on every published snapshot, including pending and error paths, and keep custom models exempt.
A model is current when it is the newest generation of its line. Same-generation variants stay visible: flash, pro, free, contributor, highspeed.
Visible: opencode/muse-spark-1.3, opencode/muse-spark-1.3-contributor-free, openrouter/meta/muse-spark-1.3-contributor. Legacy: Muse Spark 1.2 and 1.1.
Visible flagships otherwise follow the same rule already used for Codex and Claude: Grok 4.7 rather than 4.6, Claude Fable 5.1 rather than Fable 5, Opus 5 rather than Opus 4.8, GPT-6 Astra and GPT-5.6 Luna/Sol/Terra rather than GPT-5.5.
currentModels.opencode in the model manifest would let this update without an app release, which is why the manifest exists. The driver still has to call applyModelManifest, or the list has no effect.
2. Show Z.AI Coding Plan 5-hour and 7-day usage on the Android Usage screen
The Usage screen already renders provider.usageLimits.windows (kind of session or weekly, label, usedPercent, resetsAt, windowDurationMins). Codex publishes a weekly window this way. OpenCode's status probe never sets usageLimits, so a connected Z.AI Coding Plan account has no row.
The plan's own quota endpoint returns both windows:
GET https://api.z.ai/api/monitor/usage/quota/limit
Authorize with the Z.AI Coding Plan API key that OpenCode already stored for the zai-coding-plan upstream (Authorization is the key itself). The useful payload is data.limits[] with type: "CREDIT_LIMIT" (older responses use TOKENS_LIMIT):
Window
How to recognize it
T3 window
5 hours
unit === 3 and number === 5
kind: "session", windowDurationMins: 300, label such as Z.AI 5h
7 days
unit === 6 and number === 1
kind: "weekly", windowDurationMins: 10080, label such as Z.AI 7 days
percentage is usedPercent (0–100). nextResetTime is epoch milliseconds for resetsAt.
Please attach those two windows to the OpenCode provider snapshot when that upstream is connected, and refresh them on the existing provider health interval. No separate T3 provider is needed. A failed read should use the existing usageLimits.unavailable reason probeFailed so the last good bars stay on screen.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Two gaps in the OpenCode integration, seen on T3 Code 0.0.42 (server) with the Android app. Both already exist for other providers. This is a suggestion for a later release, not a request to change anyone's local install.
1. Show only current OpenCode models; put older ones behind Legacy models
Codex, Claude, and Antigravity already do this. The picker lists
currentModelsfirst and appendslegacyModelsonly after the "Legacy models" row is expanded.OpenCode does not. In 0.0.42:
isLegacyModelreturns false for every slug whenmanifest.currentModels[driverKind]is missing.currentModelslistscodex,claudeAgent, andantigravityonly. There is noopencodeentry.OpenCodeDrivernever callsapplyModelManifest.flattenOpenCodeModelsbuilds each model withoutisLegacy.A connected OpenCode catalog (Zen, Go, OpenRouter, Z.AI Coding Plan) is therefore one flat list of hundreds of models. The Android model sheet has the Legacy control, but it stays empty for OpenCode because the server never sets the flag.
Suggested behavior, matching the other drivers:
Examples:
zai-coding-plan/glm-5.3,zai-coding-plan/glm-5.3-flash,zai-coding-plan/glm-5.3-highspeed. Legacy:zai-coding-plan/glm-4.7,zai-coding-plan/glm-5.2,zai-coding-plan/glm-5-turbo.opencode/muse-spark-1.3,opencode/muse-spark-1.3-contributor-free,openrouter/meta/muse-spark-1.3-contributor. Legacy: Muse Spark 1.2 and 1.1.currentModels.opencodein the model manifest would let this update without an app release, which is why the manifest exists. The driver still has to callapplyModelManifest, or the list has no effect.2. Show Z.AI Coding Plan 5-hour and 7-day usage on the Android Usage screen
The Usage screen already renders
provider.usageLimits.windows(kindofsessionorweekly,label,usedPercent,resetsAt,windowDurationMins). Codex publishes a weekly window this way. OpenCode's status probe never setsusageLimits, so a connected Z.AI Coding Plan account has no row.The plan's own quota endpoint returns both windows:
GET https://api.z.ai/api/monitor/usage/quota/limitAuthorize with the Z.AI Coding Plan API key that OpenCode already stored for the
zai-coding-planupstream (Authorizationis the key itself). The useful payload isdata.limits[]withtype: "CREDIT_LIMIT"(older responses useTOKENS_LIMIT):unit === 3andnumber === 5kind: "session",windowDurationMins: 300, label such asZ.AI 5hunit === 6andnumber === 1kind: "weekly",windowDurationMins: 10080, label such asZ.AI 7 dayspercentageisusedPercent(0–100).nextResetTimeis epoch milliseconds forresetsAt.Please attach those two windows to the OpenCode provider snapshot when that upstream is connected, and refresh them on the existing provider health interval. No separate T3 provider is needed. A failed read should use the existing
usageLimits.unavailablereasonprobeFailedso the last good bars stay on screen.All reactions