How to access GLM-4.6 in Claude Code: Complete setup guide for developers

Access GLM-4.6 in Claude Code

Claude Code offers powerful agent capabilities that transform how developers interact with AI for coding tasks.

By integrating GLM-4.6 through Novita AI’s platform, you can access Zhipu AI’s flagship model with a 200K context window and advanced coding capabilities at competitive pricing.

GLM-4.6 achieves state-of-the-art performance among open-source models with a 48.6% win rate against Claude Sonnet 4 in real-world coding tasks.

This guide covers everything you need to know about accessing GLM-4.6 in Claude Code on Windows, Mac, and Linux systems.

What is GLM-4.6?

GLM-4.6 is Zhipu AI’s new generation flagship model.

It brings significant improvements over GLM-4.5 and achieves state-of-the-art performance among open-source models.

Built with a 355B-parameter Mixture of Experts (MoE) architecture, it’s designed to excel in agentic tasks, coding applications, and complex reasoning scenarios.

Key features

Expanded context window

GLM-4.6 introduces a 200K token context window (up from 128K in GLM-4.5).

This allows it to handle more complex conversations and process larger codebases.

You can work with extensive documentation, analyze longer code files, and maintain context across sophisticated agent workflows.

Superior coding performance

GLM-4.6 shows substantial improvements across benchmarks.

It delivers exceptional real-world performance in popular coding assistants like Claude Code, Cline, Roo Code, and Kilo Code.

The model excels at generating visually polished front-end pages and handling complex development tasks with greater accuracy.

Enhanced reasoning capabilities

The model’s reasoning has been strengthened through support for tool use during inference.

This leads to better performance in problem-solving scenarios.

GLM-4.6 integrates more effectively within agent frameworks.

This makes it ideal for building AI-powered automation systems that require multi-step reasoning and external tool integration.

Refined writing quality

GLM-4.6 produces writing that better aligns with human preferences in style and readability.

It performs more naturally in role-playing scenarios and content generation tasks.

Technical specifications

SpecificationDetails
Parameters355B (MoE architecture)
Context window200K tokens (204,800)
LanguagesEnglish, Chinese
Pricing on Novita AI$0.6/1M input, $2.2/1M output

What is Claude Code?

Claude Code is an agentic command-line tool that revolutionizes how developers interact with AI for coding tasks.

Unlike traditional code editors, Claude Code offers more powerful agent abilities than Cursor.

It transforms natural language descriptions into functional code.

The tool operates as an interactive session where you can describe your requirements in plain English.

Claude Code intelligently generates, modifies, and optimizes code accordingly.

Its advanced understanding of context and project structure allows it to make informed decisions about code architecture, dependencies, and implementation patterns.

This tool enables you to delegate complex coding tasks directly from your terminal.

Why access GLM-4.6 in Claude Code?

GLM-4.6 offers exceptional coding capabilities at competitive pricing through Novita AI’s platform.

Performance benchmarks

Public benchmark results

Evaluated across eight public benchmarks, GLM-4.6 shows clear improvements over GLM-4.5 and achieves state-of-the-art performance among open-source models.

It holds competitive performance against leading models like DeepSeek-V3.2-Exp and Claude Sonnet 4.

It still falls behind Claude Sonnet 4.5 in pure coding ability.

Real-world performance (CC-Bench)

In the extended CC-Bench evaluation, human evaluators used GLM-4.6 inside isolated Docker containers to complete multi-turn tasks.

These tasks spanned front-end development, tool building, data analysis, testing, and algorithm implementation.

The results show GLM-4.6 reaches near-equivalent performance to Claude Sonnet 4.

It achieves a 48.6% win rate while clearly outperforming other open-source models.

Token efficiency

GLM-4.6 completes tasks with approximately 15% fewer tokens than GLM-4.5.

This results in faster response times, lower computational costs, and maintained or improved output quality.

Cost advantages

Pricing on Novita AI:

  • Input tokens: $0.6 per 1M tokens
  • Output tokens: $2.2 per 1M tokens
  • Context window: 204,800 tokens

API advantages through Novita AI

Novita AI offers OpenAI- and Anthropic-compatible LLM APIs that integrate smoothly with tools like Claude Code, Cursor, Codex, Trae, Qwen Code, and Cline, delivering faster, more reliable, and flexible performance.

How to set up GLM-4.6 in Claude Code

Follow these steps to configure and start using GLM-4.6 in Claude Code on Windows, Mac, or Linux.

Step 1: Get your Novita AI API key

  • Sign up for a Novita AI account to get started with free trial credits.
  • Navigate to the Key Management page in your dashboard.
  • Click “Create New Key” to generate a new API key.
  • Copy the generated API key immediately and store it securely. It won’t be displayed again.

You’ll need this key for the configuration steps below.

Step 2: Install Claude Code

Before installing Claude Code, ensure Node.js 18 or higher is installed on your local environment.

You can verify your Node.js version by running:

bash

node --version

Open Command Prompt (Windows) or Terminal (Mac/Linux) and run:

bash

npm install -g @anthropic-ai/claude-code

The global installation ensures Claude Code is accessible from any directory on your system.

The installation process automatically configures the necessary dependencies and PATH variables across all platforms.

Step 3: Set up environment variables

Environment variables configure Claude Code to use GLM-4.6 through Novita AI’s API endpoints.

These variables tell Claude Code where to send requests and how to authenticate.

For Windows, open Command Prompt and set the following environment variables:

cmd

set ANTHROPIC_BASE_URL=https://api.novita.ai/anthropic
set ANTHROPIC_AUTH_TOKEN=<Your_Novita_API_Key>
set ANTHROPIC_MODEL=zai-org/glm-4.6
set ANTHROPIC_SMALL_FAST_MODEL=zai-org/glm-4.6

For Mac and Linux, open Terminal and export the following environment variables:

bash

export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Your_Novita_API_Key>"
export ANTHROPIC_MODEL="zai-org/glm-4.6"
export ANTHROPIC_SMALL_FAST_MODEL="zai-org/glm-4.6"

Replace <Your_Novita_API_Key> with your API key from the Novita AI platform.

On Windows, these variables remain active for the current session. You must reset them if you close the Command Prompt.

Step 4: Start Claude Code with GLM-4.6

Navigate to your desired project location using the cd command:

bash

cd <your-project-directory>

Then start Claude Code:

bash

claude .

The dot (.) parameter instructs Claude Code to operate in the current directory.

Upon startup, you’ll see the Claude Code prompt appear in an interactive session.

This indicates the tool is ready to receive your instructions.

The interface provides a clean environment for natural language programming interactions.

Step 5: Build your first project

Claude Code excels at transforming detailed project descriptions into functional applications.

After entering your prompt, press Enter to begin the task.

Here’s an example test prompt:

Create a simple todo list web application with the following features:
- HTML frontend with CSS styling
- JavaScript for adding, completing, and deleting tasks
- Local storage to persist tasks between sessions
- Responsive design that works on mobile devices
- Clean, minimalist interface with smooth animations

Please create all necessary files and explain the project structure.

Claude Code will analyze your requirements, create the necessary files, implement the functionality, and provide a complete project structure with documentation.

GLM-4.6’s enhanced reasoning capabilities will analyze this request and plan the optimal project architecture.

It generates a complete working application with all specified features.

The model excels at generating visually polished front-end pages and handling complex development tasks with greater accuracy.

Using Claude Code in VSCode or Cursor

Claude Code integrates with popular development environments.

It enhances your existing workflow rather than replacing it.

Terminal integration

You can use Claude Code directly in the terminal within VSCode or Cursor.

This maintains access to your familiar development tools while leveraging AI support.

The terminal integration allows you to run Claude Code commands without leaving your development environment.

This creates a streamlined workflow for AI-assisted development.

Plugin integration

Claude Code plugins are available for both VSCode and Cursor.

These plugins provide deeper integration with these editors.

You get inline AI support, code suggestions, and project management features directly within your IDE interface.

Best practices and optimization

Maximize the effectiveness of GLM-4.6 in Claude Code with these strategies based on the model’s capabilities.

Leverage the 200K context window

GLM-4.6’s 200K token context window allows you to work with extensive documentation.

You can analyze longer code files and maintain context across sophisticated agent workflows.

This expanded capacity lets you handle more complex conversations and process larger codebases effectively.

Optimize for coding tasks

GLM-4.6 shows exceptional real-world performance in popular coding assistants like Claude Code, Cline, Roo Code, and Kilo Code.

The model excels at generating visually polished front-end pages, handling complex development tasks with greater accuracy, multi-turn tasks across front-end development, tool building and data analysis, testing and algorithm implementation.

Take advantage of token efficiency

GLM-4.6 completes tasks with approximately 15% fewer tokens than GLM-4.5.

This results in faster response times, lower computational costs, and maintained or improved output quality.

This efficiency makes GLM-4.6 cost-effective for extended coding sessions.

Use tool use capabilities

The model’s reasoning has been strengthened through support for tool use during inference.

This leads to better performance in problem-solving scenarios.

GLM-4.6 integrates more effectively within agent frameworks.

This makes it ideal for building AI-powered automation systems that require multi-step reasoning and external tool integration.

Conclusion

Accessing GLM-4.6 in Claude Code through Novita AI delivers state-of-the-art performance among open-source models with a 200K context window and competitive pricing.

Start exploring GLM-4.6 today by signing up at Novita AI, getting your API key, and following this guide to enhance your development workflow with exceptional coding support.

Frequently Asked Questions

What is GLM-4.6 and why should I use it in Claude Code?

GLM-4.6 is Zhipu AI’s new generation flagship model with a 355B-parameter MoE architecture and 200K context window. It achieves state-of-the-art performance among open-source models with a 48.6% win rate against Claude Sonnet 4 in real-world coding tasks. The model excels at generating visually polished front-end pages and handling complex development tasks through Claude Code’s agentic interface at competitive pricing ($0.6 input, $2.2 output per 1M tokens).

How do I get started with GLM-4.6 in Claude Code?

Sign up at Novita AI and get your API key from the Key Management page. Install Claude Code globally using npm install -g @anthropic-ai/claude-code. Set environment variables pointing to Novita AI’s endpoint (ANTHROPIC_BASE_URL=https://api.novita.ai/anthropic) with your API key and model (ANTHROPIC_MODEL=zai-org/glm-4.6). Run claude . in your project directory to start using GLM-4.6.

What are the pricing details for GLM-4.6 on Novita AI?

GLM-4.6 on Novita AI costs $0.6 per 1M input tokens and $2.2 per 1M output tokens, with a context window of 204,800 tokens. The model completes tasks with approximately 15% fewer tokens than GLM-4.5. This results in faster response times and lower computational costs while maintaining or improving output quality.

Can I use GLM-4.6 with VSCode or Cursor?

Yes. Claude Code integrates with both VSCode and Cursor. You can run Claude Code directly in the integrated terminal of either IDE. This maintains access to your familiar development tools while leveraging AI support. Claude Code plugins are available for both editors, providing deeper integration with inline AI support and code suggestions.

How does GLM-4.6 perform in real-world coding tasks?

In the extended CC-Bench evaluation, human evaluators used GLM-4.6 inside isolated Docker containers to complete multi-turn tasks across front-end development, tool building, data analysis, testing, and algorithm implementation. GLM-4.6 reaches near-equivalent performance to Claude Sonnet 4.

Novita AI is an AI cloud platform that offers developers an easy way to deploy AI models using our simple API, while also providing affordable and reliable GPU cloud for building and scaling.


Discover more from Novita

Subscribe to get the latest posts sent to your email.

Leave a Comment

Scroll to Top

Discover more from Novita

Subscribe now to keep reading and get access to the full archive.

Continue reading