Videos
Has anyone been using either or both on a high level? Which of the two provides the most cost efficient, consistent and non robotic answers/outputs? I’m currently using 4o and even then, still outputs inconsistently for workflows like data extraction.
edit Thanks to all the early users. There are a couple of inherent limitations with the CLI/SDK that make using it with Roocode difficult. I think this will work best in chat like applications - if you want to code and have a Claude Code subscription then just use Claude Code 😅
/edit
In an effort to get EVEN more out of the Claude Max Plan - I present the Claude Code API Wrapper/Server.
The tool transforms your Claude Code instance into a API server that can be used (locally) in place of an OpenAI chat completion key. Literally just substitute in your localhost address and you are off to the races.
As ever, starts, issues and PRs are welcome!
https://github.com/RichardAtCT/claude-code-openai-wrapper
Sharing an OpenAI proxy solution for Claude-Code
https://github.com/ziozzang/claude2openai-proxy
Advantages:
-
In theory, as long as an OpenAI-compatible API supports tool usage, you can smoothly test any model with Claude Code.
-
You can start using Claude Code with any specified model, whether it’s internal or external.
-
You can also debug if needed.
-
Anyway, at least from my tests, it works very well. The only issue is the model itself.
----
While using Claude Code, I wanted to connect to a local model. There were tools like claude-code-router and other systems, but I couldn’t find a solid solution that worked well for multiple users. So, based on https://github.com/1rgs/claude-code-proxy , I built a proxy tailored for my use. Since it converts between different protocols, “gateway” might actually be a more fitting term.
Anyway, here are the features:
Full support for Claude Code.
-
On the server side, you can configure which model to proxy. For example, when a request comes in for opus or sonnet, you can route it to a predefined model.
-
Alternatively, you can force the model selection at Claude Code startup by letting the user set it via environment variables.
-
Authentication is done via the ANTHROPIC_API_KEY environment variable. The provided token is then forwarded to the backend as a Bearer token for the OpenAI API.
Below is an example of setting up the server and actually using it from a client:
ANTHROPIC_BASE_URL=http://localhost:8082 \ ANTHROPIC_API_KEY=sk-openapi-auth-token \ ANTHROPIC_MODEL="openrouter/horizon-beta" \ ANTHROPIC_SMALL_FAST_MODEL="openrouter/horizon-beta" \ claude
To be honest, I made this to test the openrouter/horizon-beta model. :)
The pipeline works great: Claude Code -(Claude API)-> my modified proxy server -(OpenAI API)-> openrouter/horizon-beta.
By the way, you can find what I built at https://github.com/ziozzang/claude2openai-proxy . I use it by building it into a container.
To be honest,
-
horizon-alpha doesn’t seem to handle Claude Code’s prompts very well. Qwen3-Coder flash (30B A3B) either. (tool calling issue.)
-
horizon-beta handles them quite well.
-
However, both models ask the user to make choices too often to be suitable for full automation. Compared to Sonnet, they don’t feel ideal for automated workflows.
PS.
The whole reason this started was because of Claude Code’s usage limits. LoL...