Get stock Claude Code CLI driving open-weight models against Tensormesh in 5 minutes. No config file, no proxy — just three environment variables. Every model listed below supports the full Claude Code flow today (chat + tool use);Documentation Index
Fetch the complete documentation index at: https://docs.tensormesh.ai/llms.txt
Use this file to discover all available pages before exploring further.
MiniMaxAI/MiniMax-M2.5 is the recommended default.
Quick Links
Sign up / Log in
Create your Tensormesh account with Google or GitHub.
Get an API key
Generate an
ak-... key under Profile → API keys.Install Claude Code
npm install -g @anthropic-ai/claude-code — verified against 2.1.145+.Supported models
Matrix of Claude-Code-ready models on Tensormesh serverless.
Get support
Email saas-support@tensormesh.ai for help.
TL;DR
Three environment variables, no config file:config.toml, no PATH change, no proxy.
Prerequisites
- Claude Code CLI installed via
npm install -g @anthropic-ai/claude-code. Verified against2.1.145(chat + tool use end-to-end); forward-compatible with later versions barring upstream Claude Code breaking changes. - A Tensormesh account with an API key (
ak-...). Sign up, then visit Profile → API keys. - macOS or Linux, bash or zsh. Windows binaries ship in recent Claude Code releases but aren’t currently tested by Tensormesh.
Tensormesh accepts Claude Code’s native
x-api-key header. You do not need to use claude login or the Anthropic OAuth flow — those are for Anthropic-hosted models. Setting ANTHROPIC_API_KEY is sufficient.You do not need to run any local infrastructure. Tensormesh handles the full Anthropic Messages API server-side, so stock
claude pointed at serverless.tensormesh.ai is the complete setup.Supported models
| Model | Claude Code status | Notes |
|---|---|---|
MiniMaxAI/MiniMax-M2.5 | ✓ chat + tool use | Recommended default; 192K context |
MiniMaxAI/MiniMax-M2.7 | ✓ chat + tool use | Newer MiniMax release; 200K context |
openai/gpt-oss-120b | ✓ chat + tool use | Reasoning + tools, 128K context |
openai/gpt-oss-20b | ✓ chat + tool use | Reasoning + tools, 128K context |
Qwen/Qwen3-30B-A3B | ✓ chat + tool use | Reasoning + tools, 40K context |
Qwen/Qwen3-Coder-30B-A3B-Instruct | ✓ chat + tool use | Coding-tuned, 256K context |
Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 | ✓ chat + tool use | Coding-tuned, 256K context |
moonshotai/Kimi-K2.6 | ✓ chat + tool use | Reasoning + tools, 32K context |
lukealonso/GLM-5.1-NVFP4-MTP | ✓ chat + tool use | Reasoning + tools, 198K context |
deepseek-ai/DeepSeek-V4-Flash | ✓ chat + tool use | Long-context, 1M tokens |
/v1/messages and /v1/chat/completions as well. The matrix above is calibrated specifically for stock Claude Code CLI.
Switching models
Claude Code defaults to a Claude-family model if--model is omitted. To use a Tensormesh model, pass --model on the command line. Per-invocation overrides don’t change any defaults — they only affect the current run.
Per-invocation (no env edit)
Set a default for every session
The cleanest way to pin a Tensormesh model as your everyday default isANTHROPIC_MODEL, persisted alongside the other two env vars:
claude (no --model) uses the model above. Per-invocation --model still overrides.
Optional: shell aliases for frequent switching
If you switch models often, add aliases to your~/.zshrc (zsh) or ~/.bashrc (bash):
cc-coder from any directory to start a Claude Code session against that model.
Setup
The three steps from the TL;DR, with explanation.Install Claude Code CLI
claude command to your global node_modules/bin. Verify with claude --version.Point Claude Code at Tensormesh
Set two environment variables in your shell (add them to Don’t have a key yet? Generate one in your profile.
~/.zshrc or ~/.bashrc to persist):ANTHROPIC_BASE_URL redirects the Anthropic SDK away from api.anthropic.com to Tensormesh. ANTHROPIC_API_KEY is sent as the x-api-key header on every request (Anthropic-SDK convention).- Fresh setup
- Already using Claude Code with Anthropic
Add both lines to
~/.zshrc or ~/.bashrc, then source the file or open a new terminal.Usage
The
--bare requirement for the TUI is a property of Claude Code’s auth precedence — when a custom ANTHROPIC_BASE_URL is set, Claude Code’s interactive mode still tries OAuth/keychain first by default. --bare switches it to strict env-var auth. The alias in the TL;DR tip is the simplest way to make this transparent for daily use.Slash commands in TUI
Inside an interactiveclaude session, type / to bring up the command picker (autocomplete). The set of commands varies slightly between Claude Code versions, so the picker is the source of truth. To exit a session cleanly, type /exit or press Ctrl-D twice.
Permission and sandbox modes
By default, Claude Code asks for confirmation before each file write, shell command, and tool call. Three modes:| Mode | When to use |
|---|---|
| (no flag) | Default — prompts before each potentially-impactful action. Safest for unfamiliar prompts. |
--dangerously-skip-permissions | Bypasses all permission checks (writes, shell, tool calls). Per Anthropic’s guidance, recommended only for sandboxes with no internet access — i.e. an isolated container or VM where a misbehaving agent can’t reach outside resources. |
--bare | Strips hooks, plugins, auto-memory, keychain reads, and CLAUDE.md auto-discovery. Auth is restricted to ANTHROPIC_API_KEY (no OAuth or keychain fallback), which is the path Tensormesh uses — so --bare is the most predictable mode for scripts and CI. |
--bare is the recommended mode when calling Claude Code from automated pipelines — fewer side effects, more deterministic behavior, no surprise interactive prompts, and a single explicit auth path. Combine with -p for one-shot prompts.Recommended settings
MiniMaxAI/MiniMax-M2.5is the most reliable all-purpose default for Claude Code on Tensormesh. It handles the full agentic loop (read → edit → run shell → iterate) and stays consistent across long multi-turn sessions (verified through 10+ turns of stateful workflow without drift).- For pure code generation or editing (e.g. write a function, refactor a file, translate snippets),
Qwen/Qwen3-Coder-30B-A3B-Instruct(256K) orQwen/Qwen3-Coder-480B-A35B-Instruct-FP8are coding-tuned alternatives. They’re strong at code-generation work but can be more brittle than MiniMax on composite tool-orchestration prompts (e.g. “create file X, then run Y, then summarize”) — if you hit unexpected output, retry with a simpler one-step prompt or fall back to MiniMax. - For very long contexts,
deepseek-ai/DeepSeek-V4-Flash(1M tokens) handles inputs that won’t fit elsewhere. - Stay in the default (prompted) permission mode for code you don’t fully trust. Reach for
--dangerously-skip-permissionsonly inside a sandboxed environment with no internet access, per Anthropic’s own guidance.
Troubleshooting
When a request fails, the meaningful error message is the most recent line printed by Claude Code. Match that line against the Symptom column below.
| Symptom (the actual error line) | Likely cause | Fix |
|---|---|---|
command not found: claude | Claude Code CLI not installed | npm install -g @anthropic-ai/claude-code |
Not logged in · Please run /login (in the interactive TUI, despite ANTHROPIC_API_KEY being set) | Claude Code’s interactive TUI tries OAuth/keychain before env-var auth. Without --bare, your env-var key is ignored. | Run claude --bare instead of plain claude. To make this the default, alias it: echo "alias claude='claude --bare'" >> ~/.zshrc && source ~/.zshrc. |
API Error: 500 Internal Server Error (after Claude Code’s “try again” suggestion) | Most often an invalid or wrong-environment API key. Authentication failures are surfaced as 5xx, which Claude Code wraps with its retry-suggestion text. | Verify your key matches your target environment (ak-dev-..., ak-staging-..., ak-live-...). Quickest probe: a real POST that exercises auth, e.g. curl -sS -X POST -H "x-api-key: $ANTHROPIC_API_KEY" -H "Content-Type: application/json" -d '{"model":"MiniMaxAI/MiniMax-M2.5","max_tokens":5,"messages":[{"role":"user","content":"hi"}]}' https://serverless.tensormesh.ai/v1/messages — HTTP 500 = bad key. |
There's an issue with the selected model (<slug>). It may not exist or you may not have access to it. | Three things can produce this message: (1) typo in the model slug; (2) the model is currently cold and Tensormesh is hiding it from /v1/models; (3) ANTHROPIC_BASE_URL has a /v1 suffix (the Anthropic SDK then double-appends /v1, hits an unknown path, surfaces it as a model error). | Check the supported models matrix against your spelling. Confirm echo $ANTHROPIC_BASE_URL returns https://serverless.tensormesh.ai without a /v1 suffix (a trailing slash is fine). If the model is in the table and the URL is clean, wait 30–60 seconds and retry to warm the model. |
Maximum context length is N tokens | Conversation grew past the model’s context window | Start a fresh session (type / in the TUI to see the available clear/exit commands in your version), or switch to a larger-context model (e.g., deepseek-ai/DeepSeek-V4-Flash for 1M tokens). |
Same “It may not exist or you may not have access to it” message but the slug looks like claude-opus-4-7… or claude-sonnet-… | ANTHROPIC_MODEL not set and --model not passed — Claude Code defaulted to its own Claude-family model, which Tensormesh doesn’t serve. | Either set ANTHROPIC_MODEL (see Setup) or pass --model <slug> on every invocation. |
claude sits silent for many seconds after a prompt, no error | ANTHROPIC_BASE_URL points to an unreachable host | Confirm echo $ANTHROPIC_BASE_URL returns https://serverless.tensormesh.ai. If you set it to a private URL or typo’d, requests will block until the SDK’s network timeout. |
claude --version.
Rollback / uninstall
To remove Tensormesh from your Claude Code setup:-
Unset the three environment variables from your shell, and remove them from
~/.zshrc/~/.bashrc: - Claude Code will resume targeting Anthropic’s hosted API on its next invocation.

