Skip to content

[Bug]: OpenCode GLM 5.3 (via GLM coding plan) usage shows “unpriced” despite available Z.AI rates #19688

Open

Description

@Ouna-the-Dataweaver

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

Connect OpenCode to the Z.AI GLM Coding Plan.
Run a conversation using GLM 5.3.
Open T3 Code’s Usage page.

Expected behavior

Show an estimated API-equivalent cost using Z.AI’s published token rates, with subscription billing distinguished from that estimate.

Actual behavior

Token counts appear, but GLM 5.3 is marked “unpriced.” On top of that, trying to map the model in usage shows an error "Input is required on WSL (Ubuntu)."

Impact

Cosmetic issue

Version or commit

0.0.46-nightly.20261014.3118

Environment

OS: Windows Agent: OpenCode Provider: zai-coding-plan Model: glm-5.3

Logs or stack traces

**Investigation**

OpenCode’s stored assistant messages contain:


{
  "modelID": "glm-5.3",
  "providerID": "zai-coding-plan",
  "cost": 0
}


In the installed T3 build, `parseOpenCodeMessage()` extracts the model ID but discards the provider ID. Pricing therefore looks up the bare `glm-5.3`.

The local LiteLLM pricing cache already contains `zai/glm-5.3`. However, `parseRateTable()` avoids creating a bare-name alias when different providers have different rates. Reproducing the lookup gives:


glm-5.3                 → no rate
zai-coding-plan/glm-5.3  → no rate
zai/glm-5.3             → rate found

Screenshots, recordings, or supporting files

Screenshot 2026-10-15 031303.png
Screenshot 2026-10-15 032521.png

Workaround

Mapping glm-5.3 to zai/glm-5.3 fixes the problem, native dropdown menu (to map glm-5.3 to glm-5.3 errors out)

Activity

  1. added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Oct 15, 2026
  2. Ouna-the-Dataweaver commented on Oct 22, 2026

    @Ouna-the-Dataweaver
    Author

    3. Triage environment: Linux, current main 70e5e384da. No matching open issue found in the last 90 days.
    I could not complete the reported flow: this VM has no Z.AI Coding Plan account configured, and opencode auth list exits with Database is not empty and has no session table. No conversation or Usage-page reproduction was completed; Windows/WSL desktop behavior remains unverified.
    Does this still occur on the latest nightly? Please include the T3 and OpenCode versions, the exact steps that trigger “Input is required on WSL (Ubuntu),” and one redacted assistant-message record containing only modelID, providerID, cost, and token counts. Do not include credentials or conversation text. This will help distinguish the automatic-pricing failure from the model-mapping failure.

    Rechecked on Windows with T3 0.1.2-nightly.20261021.3499. (maybe not the latest-latest, but with current state of the web it can't update it seems)

    The “Input is required on WSL (Ubuntu)” message appears immediately through: Usage → select an unpriced model → Set price. The dialog automatically creates a row with the model ID filled and prices blank. It displays the validation error before I enter anything or click save. This is premature form validation, rather than a failed mapping request or WSL backend error. The environment name comes from whichever selected environment’s validation is processed last.

    In general, it's just very misleading display, since it's highlighting field with some input inside, and should fire after user entered something idk?

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions