Add Claude Support
Would it be possible to add Claude Pro support, or other models that have "monthly payment" plans? I don't always care which model handles my task, so if I'm out of codex I'd be happy to load balance onto Opus.
It's definitely possible even if they don't want to deal with the ownership of OAUTH spoofing.
I used CLIProxyAPI to get my claude account hooked up. Then I even added OmniRoute/OpenRouter un-pooled so everything flows through one key on Cursor depending on the model. (Cursor claude models add as custom model with a prefix before the model to route it through the OpenAI key)
I also don't want to keep switching models anymore so thinking Ill add a toggle to use Opus or Fable in the Codex pool as stickied.
OpenRouter was super unnecessary, the free models aren't worth it and with Omniroute you can go deeper on the free-maxing.
Codex-lb shines with it's simplicity and specialization, but maybe they could better implement what I did and sideload CLIProxyAPI as an option for a single account? CLIProxyAPI can pool too I think.
It seems like @andrewmalov has a fork of codex-lb that adds Claude support: https://github.com/Soju06/codex-lb/compare/main...andrewmalov:codex-lb:main
But it doesn't seem to have a proper quota model, it just focuses on API keys. The fork caches only the seven API-key-style anthropic-ratelimit-* headers, not the subscription anthropic-ratelimit-unified-5h-utilization / -7d-utilization signals.
Would you be interested in a PR or more discussions on this?
It seems like @andrewmalov has a fork of codex-lb that adds Claude support: main...andrewmalov:codex-lb:main
But it doesn't seem to have a proper quota model, it just focuses on API keys. The fork caches only the seven API-key-style anthropic-ratelimit-* headers, not the subscription anthropic-ratelimit-unified-5h-utilization / -7d-utilization signals.
Would you be interested in a PR or more discussions on this?
I figured they wouldn't want the fragilitiy of adding it natively. I too been doing this for over a month with the costs built in. Just needs controls to setup through UI. I also use Omniroute, openrouter, and ollama cloud for testing. I use a bunch of harnesses so model aliases and name routing also is there. It's not perfect and it DOES NOT LOAD BALANCE BETWEEN CODEX<-->CLAUDE ACCOUNTS but it works great for model selection and I have sifted through Cursor handling as well (force small outputs on custom models for example nerfing Anthropic responses silently). I hate how something like Omniroute had broken claude fable handling and can't keep up with the changes. This never had that problem with CLIProxyAPI. Most people wouldn't even have noticed how it's broken, I almost didnt. That's why I watch the routing very carefully and did NOT want to add native Claude auth and handling if we didn't need to. I didn't even glance at the licenses but I can understand why the contributors wouldn't want another load balancer that technically also handles codex accounts to be sideloaded with their app. Worst case, I built an ugly monster that works until they natively support it.
Thanks for the ping, and for the sharp analysis of the fork — you're right that subscription-plan balancing hinges on the anthropic-ratelimit-unified-5h/-7d-utilization signals rather than the API-key-style headers, which is exactly what makes Claude support a quota-model port and not a header swap.
That said, I intend to keep codex-lb Codex-only. Nearly everything in the hot path is upstream-specific — the OAuth flow, the model registry/catalog semantics, the quota-window modeling, the Responses/WebSocket bridging — and a second upstream family would roughly double that surface while making every incident harder to isolate. Cross-provider aggregation composes better as a layer in front (as @vitalNohj describes with CLIProxyAPI) than folded into the balancer itself.
So to answer the direct question: I wouldn't be able to accept a native-Claude PR here, and I'd rather say that up front than have you invest in one. Forks like @andrewmalov's are exactly the right vehicle for this, and I'm happy to answer questions about codex-lb internals (account lifecycle, usage snapshotting, routing) to support that work.
Sending in my hopes that we do end up adding claude support