Unknown "glm-4.6" model appearing in /stats output

Resolved 💬 4 comments Opened Dec 29, 2025 by scarlson1109 Closed Feb 14, 2026

When running /stats in Claude Code, I see "glm-4.6" listed as my most-used model (71.1%), but I expected to see Opus or Sonnet.

Environment details

I have a shell function in my .zshrc that optionally routes to Z.AI's GLM model:

gml() {
    export ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
    export ANTHROPIC_API_KEY=$GML_API_KEY
    claude $1
}

This function uses export, which could leak environment variables into subsequent shell commands. However:

  • Running echo $ANTHROPIC_BASE_URL currently returns empty (not set)
  • My Z.AI account shows no API usage
  • I primarily run claude directly, not via the gml function

Questions

  1. What is "glm-4.6" in the /stats output?
  2. Is this an internal model used by Claude Code for background tasks (summarization, etc.)?
  3. If my requests were being routed to Z.AI, why would their dashboard show no usage?
  4. Could this be a mislabeling or bug in the stats display?

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗