Skip to content

Model banner shows empty parentheses for models from custom API-key providers #83

Closed

Description

@wuxiaoqiang12

Summary

Every ZCode session that runs a model from a custom personal provider (API-key type) prints a model line with empty parentheses — once per session start, and again on every rehydrate:

Model: GLM-5.3-Flash ()
Model: GLM-5.3-Flash ()
Model: GLM-5.3-Flash ()

These lines appear in the Paseo agent timeline (console output captured from the ZCode runtime). For sign-in-managed Coding Plan models the parentheses presumably carry plan/subscription metadata; for custom provider entries there is no such metadata, so they render empty. Over one 7-hour session with several prompts the line accumulated 5 times (one per rehydrate after Paseo's idle-runtime release).

Environment

  • Plugin paseo-plugin-zcode-provider 0.4.3 (npm), Paseo daemon 0.14.0
  • Managed runtime: ZCode 3.16.2-paseo.1 / Node 24.21.0, Linux x64
  • Model source: custom personal provider registered in ZCode's provider_config.json (API-key, OpenAI-compatible base URL), models auto-discovered, pinned via Paseo as ["magpie","auto/glm-5.3-flash",null]

Observed vs expected

  • Observed: Model: GLM-5.3-Flash () — empty parentheses
  • Expected: show the provider source, e.g. Model: GLM-5.3-Flash (via magpie), or omit the parentheses entirely when there is no plan/subscription metadata

Impact

Cosmetic only — routing, responses and usage accounting are unaffected (the model answers normally; the empty parens are just noise in the timeline).

Activity

  1. wuxiaoqiang12 commented on Nov 2, 2026

    @wuxiaoqiang12
    Author
    Image

    Update — the noise is worse than first described, and the request is stronger: please drop these lines entirely.

    The lines come in pairs on every turn, not once per rehydrate. The agent's Tasks timeline alternates exactly like this (growing unbounded as the session runs):

    Model: GLM-5.3-Flash ()            ← ZCode runtime banner: display name, empty plan parens
    Model: auto/glm-5.3-flash (max)    ← the Paseo-pinned model id + thinking effort
    Model: GLM-5.3-Flash ()
    Model: auto/glm-5.3-flash (max)
    ...
    

    The picked model and thinking effort are already visible in the UI (model picker / header state) — printing them as info rows on every turn adds zero information and buries actual output.

    Request: suppress these lines from the timeline entirely. If a one-time trace line per session matters for debugging, a deduplicated single line without empty parentheses would be acceptable — but per-turn pairs should just go.

  2. supermomonga commented on Nov 7, 2026

    @supermomonga
    Owner

    @wuxiaoqiang12 Thanks for report! I'll check this.

  3. supermomonga commented on Nov 9, 2026

    @supermomonga
    Owner

    @wuxiaoqiang12 We looked into this.

    Empty parentheses: This is a plugin bug. The text in the parentheses is the reasoning level from ZCode's model change marker, and the plugin printed the parentheses even when it was empty. We'll fix it.

    Lines repeating on every turn: We couldn't reproduce this locally. ZCode records this marker only when a turn runs on a different provider or model than the previous turn. In our tests with a custom API-key provider (model ID auto/glm-5.3-flash, including idle release and resume), no model lines appeared at all.

    When a release that includes the fix is out, please try it. If the lines still repeat on every turn, please open a new issue.

  4. supermomonga commented on Nov 9, 2026

    @supermomonga
    Owner

    @wuxiaoqiang12 A few questions that would help us find why the model lines alternate. Please leave out API keys and other secrets.

    1. In ZCode, are you also signed in to a Z.ai Coding Plan, or using any other provider that offers GLM-5.3-Flash? Which model is ZCode's default model?
    2. Do your magpie logs show any requests for GLM-5.3-Flash, or does your Z.ai Coding Plan usage go up while this session runs?
    3. Does the session use scheduled tasks (Cron), off-peak tasks, workflows, or background subagents?
    4. If you open the same session in ZCode Desktop, does it show "Model switched" dividers between turns?
    5. In the release with the fix, the model line will also show the provider and the previous model. If the lines still repeat, please paste a few of them into the new issue.
  5. supermomonga commented on Nov 9, 2026

    @supermomonga
    Owner

    @wuxiaoqiang12 I added a config that surpress model change marker. please refer PR's screenshots. #90

  6. wuxiaoqiang12 commented on Nov 9, 2026

    @wuxiaoqiang12
    Author

    Answers to your questions:

    1. Sign-in / default model: BigModel Coding Plan only — no separate Z.ai login (BigModel is Z.ai's China platform, same account family). ZCode's default model is the Coding Plan's GLM-5.3. The other provider offering GLM-5.3-Flash is magpie, a local custom API-key personal provider whose auto/glm-5.3-flash routes to a GLM-5.3-Flash upstream.

    2. magpie logs: yes — the log shows ~19k requests for GLM-5.3-Flash from agent zcode, so the sessions' traffic really runs through magpie.

    3. Scheduled / off-peak / workflows / subagents: none of them — no cron, no off-peak tasks, no workflows, no background subagents configured.

    4. ZCode Desktop check — done, and this is the interesting part. The same session shows no "Model switched" dividers at all in ZCode Desktop:

    ZCode Desktop: same session, no dividers

    While Paseo (same session, same region of the conversation) shows the accumulated Model: … pairs:

    Paseo: model line pairs

    One more observation that narrows the trigger down: the lines do not appear at the moment of switching. They accumulate when I switch to another agent/session and come back after a while — each re-attach of the session appends another Model: GLM-5.3-Flash () / Model: auto/glm-5.3-flash (max) pair. Since ZCode Desktop shows none of them for the same turns, these lines are produced by the plugin's re-attach/rehydrate path (re-emitting the model banner), not by ZCode's own history.

    5. Noted — will test on the release with the fix and report back (and if the lines still accumulate on re-attach, I'll paste fresh samples in the new issue).

  7. supermomonga commented on Nov 9, 2026

    @supermomonga
    Owner

    @wuxiaoqiang12 Thanks!

    For now, you can hide the model switch marker in the settings screen of plugin v0.4.4.
    I will continue working to identify the root cause (the difference in behavior compared to the desktop version).

  8. wuxiaoqiang12 commented on Nov 9, 2026

    @wuxiaoqiang12
    Author

    Confirmed fixed on plugin 0.4.4.

    After upgrading, the same session renders identically to ZCode Desktop — no Model: … lines, no empty parentheses, including after switching to other agents/sessions and coming back (the re-attach path that used to accumulate the pairs). Screenshot of the same region as my previous report, now clean:

    Paseo 0.4.4: same session, clean

    Nothing else needed from my side — thanks for the quick turnaround!

  9. supermomonga commented on Nov 12, 2026

    @supermomonga
    Owner

    I think I can close for now.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions