[BUG] API Error: 404 404 page not found

Resolved 💬 6 comments Opened Jan 23, 2026 by fabgrd Closed Jan 26, 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?

I'm trying to use Claude Code with Ollama, but getting a 404 error.

# Ollama is running and model is pulled
ollama pull qwen2.5-coder
ollama list  # shows qwen2.5-coder:latest

# Environment variables set
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_BASE_URL=http://localhost:11434/v1

# Running Claude Code
claude --model qwen2.5-coder

Error:

❯ [my prompt]
  ⎿  API Error: 404 404 page not found`

### What Should Happen?

Working with these ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL

### Error Messages/Logs

Steps to Reproduce

ollama pull qwen2.5-coder
ollama list # Expected: qwen2.5-coder appears in the list
npm install -g @anthropic-ai/claude-code
claude /logout
export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_BASE_URL=http://localhost:11434/v1
claude --model qwen2.5-coder
Enter any prompt (e.g., "Create a Hello World in Python")

**Expected behavior:**
Claude Code should connect to the local Ollama instance and generate code using the qwen2.5-coder model.

**Actual behavior:**

API Error: 404 404 page not found

Claude Model

Other

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.17 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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