OCP – Use your Claude Pro/Max subscription as an OpenAI-compatible API($0 extra)(github.com)
github.com
OCP – Use your Claude Pro/Max subscription as an OpenAI-compatible API($0 extra)
https://github.com/dtzp555-max/openclaw-claude-proxy
5 comments
Nice using Calude to build tool to fool Claude :)
How does it decide which model to use per invocation
How does it decide which model to use per invocation
The caller specifies the model in the request body (just like a normal OpenAI API call). OCP maps it to the corresponding Claude CLI flag:
- claude-sonnet-4-6 → claude -p --model sonnet - claude-opus-4-6 → claude -p --model opus
If you don't specify, it defaults to Sonnet. There's no automatic model selection yet — that's coming in v4 with agent-aware routing (different agents get different models based on their role).
- claude-sonnet-4-6 → claude -p --model sonnet - claude-opus-4-6 → claude -p --model opus
If you don't specify, it defaults to Sonnet. There's no automatic model selection yet — that's coming in v4 with agent-aware routing (different agents get different models based on their role).
benh2477(1)
Works with anything that takes an OPENAI_BASE_URL — I use it with OpenClaw, OpenCode, and Cline running concurrently. Added a small CLI (ocp usage) that reads the rate-limit headers so you can check session/weekly utilization without opening the browser.
Setup is one command: node setup.mjs. Runs as a launchd/systemd daemon.