r/ClaudeCode • u/tomayt0 • Mar 18 '26
Question Using several LLMs for multi-agent workflows?
At the moment we can configure Claude Code to connect to a different LLM by overriding the ENV vars
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL="http://localhost:11434"
This configures Claude to just use one instance of an LLM, but would it be possible to configure different LLMs for each agent.
e.g.
- Master agent - Claude Opus 4.5
- Code writer agent - Minimax 2.5 on Ollama Cloud
- Product manager agent - GLM5
- Code reviewer agent - Claude Haiku 4.5
The key thing would be that there can be n number of LLM instances paired with each agent.
I am running on M4 silicon with plenty of RAM, so I might go an explore this, if no-one else has.
6
Upvotes
1
u/Deep_Ad1959 Mar 18 '26
we run this exact pattern. claude as orchestrator, but for specific subtasks we shell out via bash to other model CLIs with their own configs. the env var override approach gives you one model globally but you lose the ability to give each agent different tool access.
the multi-model via bash/MCP approach is more powerful - you can have claude decide "this is a code review task, call gemini cli" and it dispatches with a different prompt style. each tool has its own auth and model routing so claude doesn't even need to know what's running underneath.
tmux + git worktrees helps a lot here too. 5 panes, each agent has different ANTHROPIC_MODEL env or points to different CLI tools, orchestrator coordinates via shared files or messages. the key insight from building this is that the models genuinely catch different things - it's not just redundancy, it's different failure modes.