CLI · TESTED END TO END

Use Claude Code with a local LLM on Mac

Connect Claude Code to a local LLM on Mac through Bridge1. Use the generated launch command, choose Route1 and check Auto mode limits.

Updated

Claude Code is tested end to end in real sessions. This does not guarantee every model behaves the same way.

An orange bridge bearing pad sits between a pale deck block and a pier cap.

Before connecting Claude Code

Claude Code API and model names

Claude Code uses the Anthropic-format Messages route, /v1/messages. Its base URL has no /v1 suffix.

Claude Code and Claude Desktop require model names beginning with claude-. They show the same models that OpenCode, Pi.dev, Codex and Hermes Agent list under plain ids. Keep claude-route1 to follow the model you pick in Bridge1 without editing the client config.

How Route1 chooses a model →

Start from the terminal

bridge1 launch claude

What you skip
Bridge1 does not edit Claude Code’s saved configuration: environment and command-line settings apply to this session. Claude Code may write its own files during a session.
Versions
Older versions and different major versions are refused; newer minor versions and patches in the tested major warn.
Needs
On macOS, starting Claude Code depends on model availability and your automatic-loading settings; the manual steps below still work.

Set up Claude Code

Copy Claude Code's launch command from the Gateway panel. Run it in your project folder with your own gateway key.

  1. Choose a local model in Bridge1, then open the Gateway panel and select Claude Code.
  2. Copy the generated command for your Mac. The example below uses a placeholder key.
  3. For a model window of 100,000 tokens or more, keep the extra setting the Gateway panel includes.
ANTHROPIC_BASE_URL="http://127.0.0.1:54321" ANTHROPIC_API_KEY="YOUR-GATEWAY-KEY" ANTHROPIC_MODEL="claude-route1" API_TIMEOUT_MS="1800000" CLAUDE_STREAM_IDLE_TIMEOUT_MS="2400000" CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK="1" ANTHROPIC_CUSTOM_HEADERS="X-Bridge1-Client: claude-code" claude

First connection check

In Claude Code, type bridge1: help in a chat to see status, list models, or load, switch or stop a model. If a model is not ready, Bridge1 explains the next step in the chat. You can turn chat controls off in Settings.

Check that it works

  1. Check Claude Code is using Bridge1: compare its connection settings and selected Claude-prefixed model with the Gateway panel. With claude-route1, also check the model selected in Bridge1.
  2. Ask a short, ordinary question. A pass is a relevant reply from the selected local model, rather than a status command or an echoed phrase.
  3. In a disposable project, ask Claude Code to create a short text file with a greeting. Open the file yourself; a pass means the requested file exists and contains the greeting.

A model list, connection test or echoed reply does not prove Claude Code completed a task. Keep the generated timeout and context settings for the model you chose.

If something is off

SymptomWhat it usually meansWhat to checkMore help
Model refused or not loadedThe selected model may not be ready.Check model availability in Bridge1 and the next step shown in chat.Check model profiles
Long chat waits at an Auto checkThe published long-chat safety-check limits may apply.Compare your model with the limits below; keep the generated launch settings.Claude Code limits

Versions

Bridge1 0.7.7 launches Claude Code 2.1.311, tested on macOS on 2026-10-27. This check used bridge1 launch claude. Below the tested version or a different major version: refused. A newer minor of the same major proceeds with a one-line warning. A newer patch warns. These are not the only versions that work; you do not need the tested version. The manual setup below was not re-tested at that version.

Claude Code: limits to check

Review Claude Code and shared client limits →

Other client setup guides

Request Bridge1 early access

Claude Code setup questions

Which model name should I give Claude Code?

Use claude-route1 to follow Route1. The Gateway panel supplies the Claude-prefixed names used by /model claude-* when you want to switch inside Claude Code.

Why keep the generated Claude Code timeout settings?

The published launch command includes request and stream-idle timeouts and disables nonstreaming fallback. Copy the Gateway panel command, including its extra setting for windows of 100,000 tokens or more.

Does tested end to end mean Claude Code has no limits?

No. Auto mode's first safety check on a long chat: about 3 minutes on Ornith-35B, about 30 minutes of refused retries on Qwen3.6-27B, not measured on Qwen3.6-35B.