How to Use GLM Latest in Gemini CLI
GLM Latest follows Z.ai's newest GLM release for coding and reasoning work, currently GLM 5.3. Unlike GLM 5.3, it can change which model answers as new releases arrive.
Prompts to try with GLM Latest in Gemini CLI
Copy an example into Gemini CLI, or ask in your own words.
Use GLM Latest to investigate the failing tests in this project. Reproduce one failure, trace its cause, make the smallest justified fix, and rerun the relevant checks. Report the changed files and any remaining failures.
Use GLM Latest to inspect this project's authentication code and tests. Identify inconsistent session-expiration behavior, propose a focused correction, and add a regression check before changing the implementation.
Use GLM Latest to implement pagination in this project's existing list endpoint. Follow the current conventions, preserve existing filters, and test empty results, the last page, and invalid page sizes.
Use GLM Latest to plan a refactor of this project's duplicated validation logic. Map callers first, preserve public behavior, make the changes in small steps, and verify each step with relevant tests.
Use GLM Latest to diagnose this project's slowest tested operation. Establish a baseline, identify the bottleneck, make one justified optimization, and compare performance while checking correctness.
How to set up GLM Latest in Gemini CLI
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Or add it to ~/.gemini/settings.json yourself:
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
- Sign in
Start gemini and run:
/mcp auth spiral
- Check it
In Gemini CLI, run /mcp. From your shell:
gemini mcp list
Use the Spiral skill
- Send Gemini CLI this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run GLM Latest
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "openrouter", "model": "~z-ai/glm-latest", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Gemini CLI finds GLM Latest on Spiral, shows the price and runs it.
GLM Latest providers and prices
Spiral runs GLM Latest through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.007459 per run at the default inputs. $0.09087 per 1M input tokens, $1.82 per 1M output tokens.
Settings you can ask for
Ask Gemini CLI for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Min p | 0 to 1 | ||
| Top k | a whole number from 0 | ||
| Top p | 0 to 1 | ||
| Logprobs | on or off | ||
| Max tokens | 1 to 943718 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Top logprobs | 0 to 20 | ||
| Presence penalty | -2 to 2 | ||
| Reasoning effort | low, high, or max | max | How much the model reasons. |
| Frequency penalty | -2 to 2 | ||
| Repetition penalty | 0 to 2 | ||
| Parallel tool calls | on or off |
Every API field of Z.ai: GLM Latest is on its tool page: open its card above.
What can you do with GLM Latest in Gemini CLI?
GLM Latest can help carry a code change from diagnosis through implementation and verification. Give it the project context, expected behavior, and checks that define a finished result.
Reproduce and fix a bug
Give GLM Latest the failing behavior, relevant code, and expected result. Ask for a focused fix and a regression check that reproduces the original failure.
Implement a feature with acceptance criteria
Ask GLM Latest to turn a written specification into working code, checking each acceptance criterion before reporting what remains unfinished.
Plan a refactor
Use GLM Latest to identify dependencies, propose a sequence of changes, and define checks that preserve existing behavior.
Compare technical designs
Give GLM Latest competing approaches and concrete constraints. Request a decision table covering failure modes, implementation work, and assumptions that need testing.
Compare long technical documents
Provide GLM Latest with labeled source text and ask it to find conflicting requirements, cite the relevant passages, and separate conclusions from unanswered questions.
Extract structured feedback
Ask GLM Latest to organize supplied feedback into JSON with categories, evidence, and missing values, using an example of the required structure.
More on GLM Latest and Gemini CLI
Overview
GLM Latest in other agents
More Gemini CLI guides
Questions about GLM Latest in Gemini CLI
Can Gemini CLI use GLM Latest?
Yes. Add Spiral to Gemini CLI as an MCP server, and Gemini CLI can find and run GLM Latest like any built-in tool.
How much does GLM Latest cost in Gemini CLI?
Up to $0.007459 per run at the default inputs. $0.09087 per 1M input tokens, $1.82 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Gemini CLI plan is separate.
Do I need an OpenRouter account to use GLM Latest in Gemini CLI?
No. Spiral runs GLM Latest on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up GLM Latest in Gemini CLI?
About two minutes: add the server, then sign in, then check it.
Does Gemini CLI wait while GLM Latest runs?
GLM Latest runs in the background. Gemini CLI starts the run, checks on it and gives you the text, json when it's ready.
Is GLM Latest a fixed model?
No. GLM Latest follows Z.ai's latest GLM model and currently points to GLM 5.3, so its behavior and limits can change after a new release.
What is GLM Latest best suited to?
Its current target, GLM 5.3, emphasizes complex coding and tasks that require sustained work across many steps. Useful starting points include debugging, implementing features, and comparing technical approaches against explicit requirements.
Can GLM Latest read screenshots or images?
The current target, GLM 5.3, accepts text only. Supply the relevant text, error messages, or a written description when asking about visual material.
How much text can GLM Latest handle?
GLM 5.3 has a documented 1M-token context window and a maximum output length of 128K tokens. Those are separate limits: a large context window does not mean an equally long answer.
Can I turn off reasoning?
GLM 5.3 always uses reasoning. For a narrow task, ask for a short final answer and clear completion criteria.
Start using GLM Latest in Gemini CLI
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Gemini CLI:
set up https://spiral.ai/SKILL.md


