Seamlessly connect Claude Code with Devin's extensive model catalog.
Project details
Cognition Claude Proxy allows Claude Code to effortlessly access Devin CLI's extensive model catalog. By translating APIs, it provides a robust solution for developers looking to leverage multiple models without the hassle of managing API keys. With easy setup and no extra configurations needed, it streamlines integration for a smoother experience.
cognition-claude-proxy is a robust local proxy solution that enables Claude Code — or any client utilizing the Anthropic API — to leverage Devin's extensive model catalog, which includes popular models such as SWE-2, GLM-5.2, DeepSeek V4.1 Flash, and over 200 others. This proxy effectively translates the Anthropic Messages API into the Connect-RPC format utilized by Devin, while also converting the streaming responses back into Anthropic SSE format.
The architecture of cognition-claude-proxy operates seamlessly as demonstrated in the flowchart below:
graph LR
CC[Claude Code] -->|POST /v1/messages\nAnthropic JSON| PX[Proxy :8765]
PX -->|Connect-RPC protobuf\nauthenticated| UP[Devin CLI backend\nserver.codeium.com]
UP -->|streaming events| PX
PX -->|Anthropic SSE| CC
PX -->|GET /v1/models| UP
style PX fill:#4d94ff,stroke:#333,stroke-width:2px
style CC fill:#e066ff,stroke:#333
style UP fill:#2eb82e,stroke:#333
For additional context, a plain-text flow representation is also available:
claude (ANTHROPIC_BASE_URL=http://localhost:8765)
-> POST /v1/messages (Anthropic Messages API, JSON)
-> proxy: translate to Connect-RPC protobuf
-> POST https://server.codeium.com (authenticated via local Devin CLI credentials)
<- Connect server-stream of events (text/thinking/tool-call/usage)
<- Anthropic SSE events (message_start/content_block_*/message_delta)
Authentication is streamlined, requiring only the local Devin CLI credentials stored in the corresponding configuration file. No separate API keys are necessary; if the devin command functions correctly, then dclaude is ready to use as well.
To initiate the proxy, clone the repository and navigate to the directory:
git clone https://github.com/coderexpert123/cognition-claude-proxy.git
cd cognition-claude-proxy
Then, start the proxy either through the wrapper or directly:
# Option A: using the wrapper (automatically starts the proxy)
bin\dclaude.bat -p "hello"
# Option B: starting the proxy manually
node src/server.js # starts on 127.0.0.1:8765
# then in another shell:
set ANTHROPIC_BASE_URL=http://localhost:8765
set ANTHROPIC_AUTH_TOKEN=test
claude -p "hello"
The dclaude.bat script facilitates model management by mapping tier aliases to specified models, ensuring clear and organized access to model capabilities:
| Tier | Alias | Model | Effort | Context |
|---|---|---|---|---|
| Orchestrate | fable | glm-5-2 | high | 200K |
| Deep-plan | opus | deepseek-v4-1-flash-max[1m] | max | 1M |
| Execute | sonnet | swe-2-max | max | 262K |
| Background | haiku | swe-2-medium | medium | 262K |
| Verify | (explicit) | glm-5-2 | high | 200K |
The proxy also supports customizable settings for context windows via a claude-settings.json file, allowing for flexibility based on the specific needs of users and conducive operation with multiple models.
The solution has been verified through successful end-to-end testing with real sessions of Claude Code, confirming the handling of text, thinking responses, tool calls, and multi-turn interactions. Users can obtain support for various troubleshooting scenarios as outlined, ensuring an efficient development experience.
Through its unique capabilities, cognition-claude-proxy serves as a powerful tool to harness the potential of advanced AI models, enabling more effective interactions and streamlined workflows.
Comments
0Start the conversation
Share the first comment.