# GLM 4.7

Major improvements in coding, tool usage, and multi-step reasoning, a more natural conversational tone, and reported gains in frontend development work.

- **Model ID:** `zai/glm-4.7`
- **Type:** chat
- **Providers:** zai, novita, deepinfra, bedrock
- **Context window:** 204,800
- **Maximum output tokens:** 131,072
- **Pricing:** $0.4/1M input tokens, $1.75/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/glm-4.7

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

const result = streamText({
  model: 'zai/glm-4.7',
  prompt: 'Why is the sky blue?'
})
```

## About

GLM 4.7 was released December 22, 2025 as a capability upgrade in Z.AI's model lineup. It brings major improvements in coding, tool usage, and multi-step reasoning, with added focus on complex agentic tasks that require sustained planning across multiple steps.

The model introduces a more natural conversational tone compared to earlier GLM generations. This improves the experience in chat-based applications and interactive coding assistants. GLM 4.7 shows improved frontend development results for teams building UI components, web applications, and design-to-code workflows.

GLM 4.7 operates within a context window of 204.8K tokens and is available through AI Gateway with the standard unified API, built-in observability, and intelligent provider routing. It represents the full-scale offering in the 4.7 generation, complemented by GLM-4.7-Flash and GLM-4.7-FlashX for speed-optimized workloads.

## What to consider

GLM 4.7 targets frontend tasks. If your workload involves generating React components, CSS, or converting designs to code, benchmark it against general-purpose alternatives you already use.

The 4.7 generation includes three tiers. GLM 4.7 provides maximum capability, GLM-4.7-Flash offers speed optimization, and GLM-4.7-FlashX provides the fastest inference. Choose based on your latency-capability tradeoff.

Multi-step reasoning updates make GLM 4.7 more reliable for agentic pipelines. Test it against your existing agent benchmarks to quantify the improvement over GLM-4.6.

## When to use

### Best For

- **Frontend development** where generating HTML, CSS, React components, and converting designs to code benefits from the model's targeted improvements
- **Complex agentic tasks** requiring multi-step reasoning, tool usage, and sustained planning across extended interactions
- **Interactive coding assistants** where the natural conversational tone improves developer experience
- **Full-stack code generation** leveraging improvements in both coding capability and tool usage
- **Production applications** requiring the highest capability tier in the GLM-4.7 generation with AI Gateway observability

### Consider Alternatives When

- Latency is the primary constraint. GLM-4.7-Flash or GLM-4.7-FlashX provides faster inference at reduced capability
- You need vision capabilities. Evaluate GLM-4.6V or GLM-4.5V for multimodal visual input
- Reasoning and planning beyond the GLM-4.7 generation is required. GLM-5 introduces multiple thinking modes and improved long-range planning
- Cost efficiency matters more than peak capability. The flash variants in the 4.7 generation or GLM-4.5-Air may be more economical

## Best for

- **Frontend development:** HTML, CSS, React components, and design-to-code conversion benefit from the targeted improvements
- **Complex agentic tasks:** Multi-step reasoning, tool usage, and sustained planning across extended interactions
- **Interactive coding assistants:** The natural conversational tone improves developer experience
- **Full-stack code generation:** Improvements in both coding capability and tool usage apply across the stack
- **Production applications:** The highest capability tier in the GLM-4.7 generation, paired with AI Gateway observability

## Consider alternatives

- **Latency-driven workloads:** GLM-4.7-Flash or GLM-4.7-FlashX provides faster inference at reduced capability
- **Vision capabilities needed:** Evaluate GLM-4.6V or GLM-4.5V for multimodal visual input
- **Advanced reasoning beyond 4.7:** GLM-5 introduces multiple thinking modes and improved long-range planning
- **Cost-efficiency priority:** The flash variants in the 4.7 generation or GLM-4.5-Air may be more economical when peak capability is not essential

## Frequently asked questions

### What are the main improvements in GLM 4.7 over previous GLM models?

Coding, tool usage, and multi-step reasoning. It also uses a more natural conversational tone and shows improved frontend development results in this generation.

### What is the difference between GLM-4.7, GLM-4.7-Flash, and GLM-4.7-FlashX?

GLM-4.7 is the full-scale variant with maximum capability. GLM-4.7-Flash is optimized for faster inference with reduced capability. GLM-4.7-FlashX provides the fastest inference tier in the generation. All share the same API surface.

### Is GLM 4.7 good for frontend development?

Yes. Z.AI cites improved frontend development results as a key change in this model generation.

### What is the context window for GLM 4.7?

204.8K tokens.

### How do I authenticate with GLM 4.7 through AI Gateway?

AI Gateway provides a unified API key. Configure it in your environment and use the model identifier to route requests. No separate Z.AI account is required, though BYOK is also supported.

### How does GLM 4.7 handle multi-step agentic tasks?

Multi-step reasoning is a core improvement in this generation. The model maintains better coherence across extended tool-use sequences and planning steps compared to earlier GLM models.

### What providers serve GLM 4.7 through AI Gateway?

GLM 4.7 is available through Z.AI, Novita AI, DeepInfra, Bedrock. AI Gateway handles routing and automatic retries across providers.

## Links

- [Model page](https://vercel.com/ai-gateway/models/glm-4.7)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://docs.z.ai/guides/llm/glm-4.7)
- [Provider pricing](https://docs.z.ai/guides/overview/pricing)


If you encounter incorrect information, can’t find what you need, need a capability Vercel doesn’t currently offer, or have any other feedback to report, please do it by following the instructions at https://vercel.com/feedback.md.
