Skip to content

Bug: /insights shows wrong model name β€” displays Gemini instead of actual active model (GLM-5.1 via zai provider)Β #3988

@AxDSan

Description

@AxDSan

Bug Description

The /insights command incorrectly reports the most-used model as gemini-3.1-flash-lite-pre when the actual active provider is zai (Z.AI / GLM) running glm-5.1.

What /insights shows (incorrect):

πŸ€– Models:
  gemini-3.1-flash-lite-pre β€” 1149 sessions, 2,299,735,216 tokens, $0.00
  kimi-for-coding β€” 1459 sessions, 1,888,206,762 tokens, N/A

What /provider confirms (correct):

πŸ”Œ Current provider: Z.AI / GLM (zai)
βœ… zai β€” Z.AI / GLM  (also: glm, z-ai, z.ai, zhipu) ← active

Model is glm-5.1 via the zai provider. It has never been gemini-3.1-flash-lite-pre.

Expected Behavior

/insights should report glm-5.1 (or zai/glm-5.1) as the model name, matching the actual provider and model in use. It appears the model name is being resolved incorrectly β€” possibly falling back to a default or cached name instead of reading the active provider config.

Environment

  • Hermes Agent (latest)
  • Active provider: zai (Z.AI / GLM)
  • Active model: glm-5.1
  • Platform: Telegram + CLI
  • 2807 sessions, ~4.3B tokens over 30 days

Steps to Reproduce

  1. Set provider to zai with model glm-5.1: /model zai/glm-5.1
  2. Use the agent normally across multiple sessions
  3. Run /insights
  4. Observe model reported as gemini-3.1-flash-lite-pre instead of glm-5.1

Additional Notes

This might be a token counting/logging issue where the model name gets overwritten or defaults to something incorrect in the analytics pipeline. The model alias resolution (glm, z-ai, z.ai, zhipu all map to zai) might also be relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low β€” cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardprovider/zaiZAI providertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions