Settings

Theme

Ask HN:Do people configure Claude Code to use other models

openrouter.ai

2 points by ripvanwinkle 4 days ago · 6 comments

Reader

perrygeo 4 days ago

Running models locally using LM Studio, you can use a shell function like

    claude-local () {
     MODEL=$(curl --silent localhost:1234/api/v1/models | jq 'first(.models[].loaded_instances[].id)') 
     ANTHROPIC_BASE_URL=http://localhost:1234 ANTHROPIC_AUTH_TOKEN='' claude --model $MODEL
    }

Fun experiment: run `claude` and `claude-local` side by side and paste the same prompt into both. In my experience, recent open weight models (Qwen, Gemini) are pretty solid on quality, even on moderately difficulty prompts. They get the "right" answer eventually but roughly 10x slower on my M3 mac.
jonahbenton 4 days ago

It can be done- both to use local models and/or cheaper cloud models- but IME it does not work very well. CC really needs the Anthropic model special sauce. A point of surprise here is we also run CC against Bedrock hosted Anthropic models and that works reasonably well even though there is a bunch of other server side functionality CC uses when using an Anthropic subscription.

Tomte 4 days ago

I just did that today. See https://api-docs.deepseek.com/quick_start/agent_integrations...

A few environment variables and Claude Code uses DeepSeek. I was actually surprised how easy that is.

ilia-a 4 days ago

I use codex plugin to often validate claude results, surprisingly many findings, so for things like code-review becomes very helpful. Considering trying using Deepseek 4 Pro, seems like could be a good/cheap alternative to codex

ripvanwinkleOP 4 days ago

I stumbled on this page and it seems to imply that Claude Code calls other models like Qwen, not just Anthropic's

Is that commonly done. Presumably this is from people customizing their installs - is that correct?

  • verdverm 4 days ago

    You can do it with ENV cars for local models, but search tool does not work

    Anthropic has partnerships, for example Claude Desktop has a provider selection now that allows you to use Vertex AI instead, even for Claude models (same price, more reliable)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection