Developer Seeks Dual Support for Anthropic and Open-Weight Models in Claude Code
Positive users express excitement that AI coding progress with tools like Claude Code is happening now despite fad dismissals, while negative users sarcastically mock workarounds using open-weight models instead of Anthropic ones.
No Digg Deeper questions have been answered for this story yet.
Most Activity

@svpino You could. Write a new shell script that calls the model you want. People are hacking Claude to use deepseek, you should be able to do the same with gemini.
Basically something that edits the config file. Then use an alias.

@svpino try this? but not simultaneously https://github.com/farion1231/cc-switch

@svpino Why not use codex which is open source and probably more complete harness with better memory?
I can run Claude Code with open weight models:
$ ollama launch claude --model gemma4:26b
But this no longer lets me use Anthropic models.
Is there a way I can use Claude Code with Anthropic models *and* open-weight models?

@svpino You need a proxy script, which will replace the Ollama "localhost" address in the settings.json file.
You also need to remove the "DEFAULT_MODEL" settings of the models you don't want to replace.
The proxy script might look like this script which I created with Jules.

@svpino With the following global settings.json file you can use Claude Code with Ollama models natively.
Just type "claude" in your terminal.
(this is my current setup)

@svpino Ive constantly heard on my timeline that Claude Code is the "worst" harness that anthropic models can use. Why are you choosing Claude Code as your harness?

@svpino Try two version of settings.json

@svpino honestly that's the dream setup right now, but i don't think claude code lets you swap between them mid-session.
you're basically picking your lane when you boot up.

@svpino What’s your experience with open-weight models? What’s the quality of the output?

@svpino I’ll dm

@svpino Running Claude Code with a model named claude to avoid using Claude models is the open-source stack in a nutshell.

@svpino Not natively right now. Your best bet is running two separate CC instances - one pointed at Ollama for local work and one with your Anthropic api key for the heavy lifting.

@svpino I think ollama has a reset to go back to anthropic models. You could also maybe install another instance of Claude code to use a different env file since I think that’s what it modifies anyways

@svpino slowly entering the guided RSI loop and people still calling it a fad is wild to me. It's happening right now.Yeah you can swap providers mid-session. Use Anthropic as default, then just call `ollama` directly in terminal when you need local inference. Two tools, same workflow.

@svpino nah you can't have both in the same session rn

@svpino I don't think it works as a true mixed mode right now. I'd use normal Claude Code for Anthropic, and a separate Ollama-backed launch for open-weight models.

@svpino This might be already the solution. But I have not tested it.

@svpino Recommend switching to http://pi.dev and move one from claude. It works far better with open models cloud or local

@svpino Why don’t you use http://Autohand.ai/code ?!