[BUG] Env ignored for locally hosted opus

Resolved 💬 5 comments Opened Mar 15, 2026 by gavinvw Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Using version 2.1.76 (Claude Code) on Debian GNU/Linux 12 (bookworm) - WSL (Same on Windows 11)

export ANTHROPIC_BASE_URL="https://llama.home.homenetwork.net"
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_MODEL="bjoernb/claude-opus-4-5"

Claude will still use the Opus cloud based model online.

What Should Happen?

Expected behaviour: Claude should use the locally hosted model.

Confirmation that environment is in effect:

  • Changing the ANTHROPIC_MODEL to "qwen3-coder:30b" (also locally hosted) works 100%

Error Messages/Logs

No error present, unexpected behaviour

Steps to Reproduce

  1. Host Opus model on ollama host
  1. Set environment variables in terminal
export ANTHROPIC_BASE_URL="https://llama.home.homenetwork.net"
export ANTHROPIC_AUTH_TOKEN="ollama"
export ANTHROPIC_MODEL="bjoernb/claude-opus-4-5"
  1. Launch claude in same terminal
  1. Compare local and cloud utilization stats

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.76 (Claude Code)

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗