Skip to content

Multi-Model Configuration

Agent Network supports running agents with different AI models within the same network. All models share the same communication protocol and can message each other seamlessly.

Supported Models

ModelRuntimeStrengthsCost
Claude Sonnet (latest line)claude-agent-sdkBest-in-class reasoning, long context (see Anthropic Models)Mid-High
Claude Opus (latest line)claude-agent-sdkComplex tasks, creative writing (same link)Very high
Claude Codeclaude-code-cliTerminal-style agent; spawns the local claude binary, reuses your Claude Max subscriptionSubscription
Codex (codex-sdk)codex-sdkStrong code generation, tool useMedium
MiniMax (latest line)claude-agent-sdk✅ verified — low cost, high throughput (look up the latest model id at platform.minimaxi.com)Very low
InternLM Intern-S2-Preview (anet node create vendor-picker default, only after you pick claude-agent-sdk runtime — since v0.9.2 the wizard is runtime-first per #133)claude-agent-sdk✅ verified — domestic model, scientific reasoning; the first option in the vendor picker (chat.intern-ai.org.cn, bare hostname)Low
InternLM Intern-S1-Proclaude-agent-sdk✅ verified — domestic model, scientific reasoning (Intern-S1-Pro is the current product line; no version suffix appended)Low
Xiaomi MiMoclaude-agent-sdk✅ verified — mimo-v2.5-pro (default) / v2.5 / v2-pro / v2-omni / v2.5-tts-voicedesign[^mimo-tts-en], low cost (Xiaomi, token-plan-cn.xiaomimimo.com/anthropic; look up model id at platform.xiaomimimo.com)Low

[^mimo-tts-en]: mimo-v2.5-tts-voicedesign is a TTS (voice-design) model — Anthropic Messages text requests are unlikely to be supported by the vendor on that model; use one of the first four (mimo-v2.5-pro / mimo-v2.5 / mimo-v2-pro / mimo-v2-omni) for chat. Since v0.10.10 the wizard ships the full 5-model preset matching Xiaomi's official lineup. | OpenRouter (multi-model gateway) | claude-agent-sdk | one API key, all upstream models (GPT-4 / Claude / Gemini / Llama, etc.); unified billing. Reachable via the custom vendor with openrouter.ai/api/v1 + ANTHROPIC_AUTH_TOKEN. | Upstream pass-through | | xAI Grok Build | grok-build-acp | ACP-protocol cross-agent collaboration via the local grok binary; selectable from the anet node create 4-way runtime picker (since v0.10.8 / v0.10.11) — detailed runtime guide ↗. Auth: grok auth login done + XAI_API_KEY env (runtime prereq). | Medium |

Verification model (post-#104-B): cli.ts no longer uses the old "MODEL_PRESETS + [UNVERIFIED] tag" scheme — it's now a single VENDORS list (in cli.ts, grep const VENDORS), and being in the list means verified-with-real-call. Providers that haven't passed verification (DeepSeek / GLM / Kimi) are intentionally NOT in the list — reach them via the custom vendor below (any Anthropic-compatible API works through custom). Full detail: runtimes — Verified vs not.

Any Anthropic-compatible provider works

The table above lists common providers, but claude-agent-sdk integrates with any service that supports the Anthropic Messages API via ANTHROPIC_BASE_URL. Providers not listed (self-hosted vLLM, SiliconFlow, Qwen Anthropic-compatible endpoint, etc.) work the same way — point ANTHROPIC_BASE_URL at their Anthropic-compatible endpoint and set the API key via ANTHROPIC_AUTH_TOKEN. See "Configuration" below.

Configuration

Claude (Overseas)

Two equivalent ways to run Claude — pick whichever auth you already have.

bash
# Option 1: Anthropic API Key (claude-agent-sdk runtime)
# --model: pick the latest id from [Anthropic Models](https://docs.anthropic.com/claude/docs/models-overview)
ANTHROPIC_API_KEY=sk-ant-xxx \
anet node create reasoning-master --runtime claude-agent-sdk --model <anthropic-model-id>

# Option 2: Claude Code CLI (claude-code-cli runtime, requires a Claude Max subscription)
anet node create all-rounder --runtime claude-code-cli

anet node start reasoning-master
Environment VariableDescription
ANTHROPIC_API_KEYAnthropic API key (Option 1: claude-agent-sdk)
(not needed)Option 2 reuses local claude auth login credentials (claude-code-cli)

Codex SDK

Codex (codex-sdk) uses the OpenAI Codex SDK and requires an OpenAI account.

bash
# Log in first
codex auth login

# Create and start a Codex agent
# --model: pick the latest id from OpenAI Codex docs
anet node create code-assistant --runtime codex-sdk --model <codex-model-id> --tools Read,Write,Edit,Bash,Glob,Grep
anet node start code-assistant
Environment VariableDescription
(not needed)Uses codex auth login credentials

MiniMax (claude-agent-sdk)

MiniMax integrates via the Anthropic-compatible API, using ANTHROPIC_BASE_URL to route to MiniMax.

bash
# Create and start a MiniMax agent
# --model: pick the latest id from MiniMax console (see Model Mapping tip below for Claude-name fallback)
ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic \
ANTHROPIC_AUTH_TOKEN=your-minimax-api-key \
anet node create minimax-bot --runtime claude-agent-sdk --model <minimax-model-id>
anet node start minimax-bot

Model Mapping (Anthropic-compat fallback)

MiniMax's Anthropic-compatible API also accepts Claude model names as aliases — useful if you want to swap Anthropic for MiniMax with zero --model change. Mapping targets may shift as Anthropic releases new model ids; check MiniMax docs for the currently supported alias list.

Environment VariableValue
ANTHROPIC_BASE_URLhttps://api.minimaxi.com/anthropic
ANTHROPIC_AUTH_TOKENMiniMax API Key

InternLM (claude-agent-sdk)

bash
# Note: bare hostname, NO /anthropic suffix — unlike MiniMax et al.
ANTHROPIC_BASE_URL=https://chat.intern-ai.org.cn \
ANTHROPIC_AUTH_TOKEN=your-intern-key \
anet node create intern --runtime claude-agent-sdk --model intern-s1-pro
anet node start intern
Environment VariableValue
ANTHROPIC_BASE_URLhttps://chat.intern-ai.org.cn (bare hostname, no /anthropic)
ANTHROPIC_AUTH_TOKENInternLM API Key

Xiaomi MiMo (claude-agent-sdk)

Xiaomi's MiMo platform exposes an Anthropic-compatible endpoint, with a reasoning-focused lineup at competitive prices. Since v0.10.10 the anet node create wizard ships the full 5-model preset matching Xiaomi's official lineup. Look up the current model ids at platform.xiaomimimo.com.

Model idNotes
mimo-v2.5-proWizard default — pro-tier reasoning
mimo-v2.5Base v2.5
mimo-v2-proPrevious-gen pro
mimo-v2-omniMulti-modal omni
mimo-v2.5-tts-voicedesignTTS voice-design model — Anthropic Messages text requests are unlikely to be supported by the vendor on this model; use one of the four above for text chat
bash
ANTHROPIC_BASE_URL=https://token-plan-cn.xiaomimimo.com/anthropic \
ANTHROPIC_AUTH_TOKEN=your-mimo-api-key \
anet node create mimo-bot --runtime claude-agent-sdk --model mimo-v2.5-pro
anet node start mimo-bot
Environment VariableValue
ANTHROPIC_BASE_URLhttps://token-plan-cn.xiaomimimo.com/anthropic
ANTHROPIC_AUTH_TOKENXiaomi MiMo API Key (sign up at platform.xiaomimimo.com)

OpenRouter (claude-agent-sdk)

OpenRouter is a multi-model gateway — one API key, all upstream models (GPT-4, Claude, Gemini, Llama, etc.) with unified billing.

bash
ANTHROPIC_BASE_URL=https://openrouter.ai/api/v1 \
ANTHROPIC_AUTH_TOKEN=your-openrouter-api-key \
anet node create multi-bot --runtime claude-agent-sdk --model anthropic/claude-sonnet-4
anet node start multi-bot
Environment VariableValue
ANTHROPIC_BASE_URLhttps://openrouter.ai/api/v1
ANTHROPIC_AUTH_TOKENOpenRouter API Key (sign up at openrouter.ai)
--modelprovider/model format (e.g. anthropic/claude-sonnet-4, openai/gpt-4o); full list at openrouter.ai/models

ANTHROPIC_BASE_URL Mechanism

The claude-agent-sdk runtime uses the ANTHROPIC_BASE_URL environment variable to route requests to compatible API endpoints. This is the core model-mapping mechanism:

Configuration Reference

ProviderANTHROPIC_BASE_URLModel Parameter
Anthropic (native)(unset)Latest from Anthropic Models
MiniMaxhttps://api.minimaxi.com/anthropicLatest from MiniMax platform (or use any Claude model id via the mapping tip above)
InternLMhttps://chat.intern-ai.org.cn (bare hostname, no /anthropic)Latest from Intern platform
DeepSeekhttps://api.deepseek.com/anthropicLatest from DeepSeek platform
Xiaomi MiMohttps://token-plan-cn.xiaomimimo.com/anthropicLatest from Xiaomi MiMo platform

Vendor adapter (behavior-correction layer, v0.9.1+)

The Anthropic-compatible protocol only standardizes the wire format; it does not guarantee behavioral parity. Each vendor's RLHF fine-tuning takes its own path, so the same tools + tool_choice: "auto" payload produces behavioral divergence across vendors:

  • ✅ MiniMax / Anthropic native: emits tool_use content blocks cleanly, works out of the box
  • ❌ InternLM intern-s2-preview: defaults to verbose "Thinking Process" text, does not emit tool_use blocks (forcing tool_choice is rejected with -20077)

From v0.9.1 (#130 hotfix) onward, agent-node ships a vendor adapter that detects ANTHROPIC_BASE_URL and prepends a system-prompt bias to nudge vendor behavior back to Anthropic-standard.

Current adapter (intern) trigger: URL matches the regex /intern-ai\.org\.cn|chat\.intern-ai/i (agent-node/src/cli.ts) — the "InternLM" example above (ANTHROPIC_BASE_URL=https://chat.intern-ai.org.cn) triggers it automatically.

Five user-visible side effects (must-read + opt-out path):

  1. Loses Intern's Thinking Process transparency (model skips thinking)
  2. Detection fragility (self-hosted lmdeploy / proxy / aggregator endpoints don't match the regex)
  3. Silent injection (the bias is implicitly prepended; can be confusing while debugging)
  4. Forced tool-calling style (net positive for multi-agent coordination, drag on single-agent report generation)
  5. Fewer tokens out = less explainability

See Vendor Adapters for the full mechanism + per-side-effect migration hints + future polish gaps.

Opt-out: anet node start <alias> --prompt "your system prompt"--prompt replaces rather than appends, so the vendor bias is no longer prepended and the model reverts to its native RLHF.

Mixed Deployment in Practice

A typical mixed deployment scenario: commander uses Codex, code tasks go to Codex (codex-sdk), text tasks go to MiniMax.

docker-compose.yml

yaml
services:
  server:
    image: commhub-server
    ports:
      - "9200:9200"

  commander:
    image: agent-node
    environment:
      - ALIAS=commander
      - RUNTIME=codex-sdk
      - MODEL=<codex-model-id>  # latest id from OpenAI Codex docs
      - COMMHUB_URL=http://server:9200
      - SYSTEM_PROMPT=You are the commander. Receive tasks and dispatch them. Route code tasks to the code team and text tasks to the writing team.

  coder-1:
    image: agent-node
    environment:
      - ALIAS=coder-1
      - RUNTIME=codex-sdk
      - MODEL=<codex-model-id>
      - COMMHUB_URL=http://server:9200
      - TOOLS=Read,Write,Edit,Bash,Glob,Grep

  writer-1:
    image: agent-node
    environment:
      - ALIAS=writer-1
      - RUNTIME=claude-agent-sdk
      - MODEL=<minimax-model-id>  # or any Claude model id via the MiniMax mapping fallback (see tip above)
      - ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic
      - ANTHROPIC_AUTH_TOKEN=${MINIMAX_API_KEY}
      - COMMHUB_URL=http://server:9200

Task Dispatch Strategy

The commander uses its system prompt to determine how to route tasks:

You are the commander. Receive messages and intelligently dispatch tasks:
- Code tasks (file I/O / commands / code) → dispatch to coder-1 through coder-5
- Text tasks (translation / analysis / writing) → dispatch to writer-1 through writer-5
- Use commhub_send_task to dispatch
- Use commhub_get_all_status to check who's online

Model Selection Guide

ScenarioRecommended ModelRationale
Architecture designClaude OpusBest-in-class reasoning
Code implementationCodex (codex-sdk)Strong code + tool use
Code reviewClaude SonnetHigh accuracy
Translation / SummarizationMiniMaxLow cost, high throughput
Data processingMiniMaxBatch processing, low cost
Scientific reasoningInternLM InternDomestic model, strong in specialized domains
General conversationDeepSeekExcellent value

Cost Optimization

Strategy 1: Tiered Models

Complex tasks (10%) → Claude Opus (~$15/M tokens order-of-magnitude)
Medium tasks (30%)  → Codex (codex-sdk) (~$5/M tokens)
Simple tasks (60%)  → MiniMax (~$0.3/M tokens)

Numbers above are order-of-magnitude estimates as of 2026-05; provider pricing changes — check the provider's official rate card before sizing a budget.

Strategy 2: Budget Controls

agent-node supports --max-budget <usd> per task. It's not surfaced as an anet node create flag — set it via config.json flags.maxBudgetUsd:

jsonc
// ~/.anet/nodes/architect/config.json
{
  "alias": "architect",
  "runtime": "claude-agent-sdk",
  "model": "claude-sonnet-4-6",
  "flags": {
    "maxBudgetUsd": 1.0          // cap at $1 per task
  }
}

Or pass it directly when launching agent-node manually:

bash
agent-node --max-budget 1.0 --alias architect --runtime claude-agent-sdk --hub http://127.0.0.1:9200

Strategy 3: Batch with Low-Cost Models

Distribute repetitive tasks in bulk to low-cost models:

bash
# Create and start 5 MiniMax agents for batch translation
for i in 1 2 3 4 5; do
  ANTHROPIC_BASE_URL=https://api.minimaxi.com/anthropic \
  ANTHROPIC_AUTH_TOKEN=$MINIMAX_KEY \
  anet node create "translator-${i}" --runtime claude-agent-sdk --model <minimax-model-id>
  anet node start "translator-${i}" &
done

Next steps

Use it now:

Configure and tune:

Dig deeper:

  • Why does ANTHROPIC_BASE_URL work across all domestic models? See How ANTHROPIC_BASE_URL works above
  • Difference between runtimes? See Runtimes -- claude-agent-sdk / codex-sdk / claude-code-cli

Powered by Sleep2AGI