Use Qwen3.5-397B-A17B in Claude Code: High-Quality Coding at a Lower Cost

use-Qwen3.5-in-Claude-code

Novita AI makes it simple to run frontier open models with production-ready GPU inference—without managing clusters, drivers, or scaling headaches. In this guide, we’ll show how to use Qwen3.5-397B-A17B inside Claude Code by routing requests through Novita AI’s API, so you can keep the same developer workflow while swapping in a powerful Qwen model for coding, refactoring, and long-context tasks. If you want better cost-control, flexible model choice, and a smooth “drop-in” setup, this walkthrough is for you.

What is Qwen3.5-397B-A17B?

Qwen3.5-397B-A17B is Alibaba’s flagship native multimodal (text + image + video in, text out) model in the Qwen3.5 family. Architecturally, it’s a Hybrid Mixture-of-Experts (MoE) model with 397B total parameters but only ~17B activated per token—one of the main reasons it can deliver “frontier-level” capability with much better inference efficiency than dense models at similar total size.

Key specs that matter for developers:

  • Context length: 262,144 tokens
  • Multimodal input: supports text, image, video (great for agent workflows that need UI screenshots, logs, diagrams, or video frames).
  • Strong agent + coding orientation: Qwen3.5 highlights emphasize reasoning, coding, and agent capabilities as first-class goals.

If you’re evaluating it with independent benchmarks and provider-side comparisons, Artificial Analysis tracks quality, speed, and price across providers for Qwen3.5 397B A17B.

Why Use Qwen3.5-397B-A17B with Claude Code?

Claude Code is an agentic coding tool that runs in your terminal (and IDEs), reading your codebase, editing files, running commands, and helping with git workflows. Anthropic’s docs explicitly note that the Terminal CLI and VS Code support third-party providers, which makes it possible to route Claude Code requests to non-Anthropic models through compatible endpoints.

Pairing Qwen3.5-397B-A17B + Claude Code is especially compelling when you want:

  • Big-context coding + refactors without losing global structure: With 262K native context, Qwen3.5 can keep more of your repository, logs, stack traces, and specs “in mind” during multi-step tasks—handy for migrations, monorepo refactors, or debugging complex incidents.
  • Agent workflows that include screenshots and UI artifacts: Because Qwen3.5 is natively multimodal, you can feed UI screenshots (or generated diagrams) into the same model that’s writing and editing code—useful for “fix this layout bug” or “recreate this UI component” loops.
  • Lower-cost experimentation at scale (without changing your workflow): Using Novita AI’s serverless API, you can call qwen/qwen3.5-397b-a17b pay-per-token and keep your existing Claude Code habits (slash commands, repo scanning, iterative changes).

How to Use Qwen3.5-397B-A17B in Claude Code

Before you start: Novita AI’s Qwen3.5 API (capabilities + pricing)

Novita provides Qwen3.5-397B-A17B as a serverless API: you can send requests immediately and pay only for usage.

On the model page you can also confirm what you’ll get out of the box:

  • Context length: 262,144
  • Max output: 64,000
  • Function calling: Supported
  • Structured output: Supported
  • Input: text, image, video (Output: text)

And the pricing (serverless):

  • Input: $0.6 / M tokens
  • Output: $3.6 / M tokens

Step 1: Getting Your API Key on Novita AI

  • Create or Login to Your Account: Visit https://novita.ai and sign up or log in.
  • Navigate to Key Management: After logging in, find “API Keys” in the console/settings.
  • Create a New Key: Click “Add New Key”.
  • Save Your Key Immediately: Copy and store the key as soon as it’s generated (use a password manager / encrypted notes).
how to get your api key

Step 2: Installing Claude Code

Claude Code now recommends native installers:

  • macOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bash
  • Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
  • Windows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Note: On Windows, Claude Code requires Git for Windows (install it first if you don’t already have it).

Verify your installation

claude --version

Step 3: Setting Up Environment Variables

  • On Windows (CMD)
set ANTHROPIC_BASE_URL=https://api.novita.ai/anthropic
set ANTHROPIC_AUTH_TOKEN=<Your_Novita_API_Key>
set ANTHROPIC_MODEL=qwen/qwen3.5-397b-a17b
set ANTHROPIC_SMALL_FAST_MODEL=qwen/qwen3.5-397b-a17b
  • On macOS and Linux
export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Your_Novita_API_Key>"
export ANTHROPIC_MODEL="qwen/qwen3.5-397b-a17b"
export ANTHROPIC_SMALL_FAST_MODEL="qwen/qwen3.5-397b-a17b"

Step 4: Starting Claude Code

  • Navigate to Your Project Directory
cd <path_to_your_project>
  • Launch Claude Code
claude .

The dot (.) tells Claude Code to operate on the current directory, scanning and working within this project. You’ll get an interactive prompt where you can use commands like /init, /model, /review, etc. (See the official overview for how Claude Code operates across files/tools.)

One Config, Many Models

If you want to switch between different large language models in your development workflow (for example, moving from a “fast draft” model to a “deep reasoning” model), you can do it without changing your codebase.

Novita AI makes this especially simple by offering unified, compatibility-first APIs—so you can test multiple models quickly and keep your workflow stable.

Using Environment Variables

If you’re working with Claude Code (or any tooling tied to the Anthropic SDK), you can switch models by updating environment variables—no refactors required.

On macOS/Linux:

export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Your_Novita_API_Key>"
export ANTHROPIC_MODEL="qwen/qwen3-coder-next"              # ← swap model here 
export ANTHROPIC_SMALL_FAST_MODEL="qwen/qwen3-coder-next"   

On Windows (CMD):

set ANTHROPIC_BASE_URL=https://api.novita.ai/anthropic
set ANTHROPIC_AUTH_TOKEN=<Your_Novita_API_Key>
set ANTHROPIC_MODEL=qwen/qwen3-coder-next           # ← swap model here 
set ANTHROPIC_SMALL_FAST_MODEL=qwen/qwen3-coder-next

To switch models, just replace the ANTHROPIC_MODEL value with another supported model name (e.g. deepseek/deepseek-v3.2, zai-org/glm-4.7, moonshotai/kimi-k2.5, etc.).

anthropic SDK supported Models

Conclusion

Qwen3.5-397B-A17B combines MoE efficiency (397B total / 17B active), 262K native context, and native multimodal inputs—a strong recipe for modern “agentic coding” workloads.

By routing Claude Code through Novita AI’s Anthropic-compatible endpoint, you can keep the same terminal-native workflow (plan → edit → run → iterate) while tapping into Qwen3.5’s long-context and multimodal strengths—often with more flexible cost control thanks to Novita’s serverless, pay-per-token model access.

Novita AI is the All-in-one cloud platform that empowers your AI ambitions. Integrated APIs, serverless, GPU Instance — the cost-effective tools you need. Eliminate infrastructure, start free, and make your AI vision a reality.

Frequently Asked Questions

What is Qwen3.5-397B-A17B?

Qwen3.5-397B-A17B is a large language model from the Qwen family designed for high-quality reasoning and coding tasks. It’s built to handle complex instructions and long-form generation, making it a strong option for software development workflows.

What is Claude Code?

Claude Code is a developer tool (from Anthropic) that lets you use an LLM to help with coding tasks directly in your workflow—such as understanding a codebase, generating patches, refactoring, writing tests, and explaining code—often through a CLI-style experience.

How do I use Qwen3.5-397B-A17B in Claude Code with Novita AI?

You can point Claude Code to Novita AI’s Anthropic-compatible API by setting your endpoint and API key in environment variables, then selecting Qwen3.5-397B-A17B as the model. This lets you run Qwen inside Claude Code without changing your project code—just switch the configuration.


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