mirror of
https://github.com/NikkeTryHard/zerogravity.git
synced 2026-04-25 07:05:58 +03:00
[GH-ISSUE #2] Claude Code compatible wrapper #1
Labels
No labels
bug
enhancement
enhancement
notice
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zerogravity#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rmffo on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/NikkeTryHard/zerogravity/issues/2
What do you want?
If you can and have time, please make this proxy wrapped into claude code compatible
Use Case
To be able to use claude code with this awesome proxy
Alternatives Considered
Currently, i am using another proxy to hit this proxy. So ClaudeCode -> CLIProxyPlus -> zerogravity.
Or just opencode, if i am lazy to bootup 2 proxy xD.
@NikkeTryHard commented on GitHub (Feb 19, 2026):
Sure! Does that setup work in claude code?
@DarKWinGTM commented on GitHub (Feb 19, 2026):
It's not claude code compatible.
@NikkeTryHard commented on GitHub (Feb 19, 2026):
@DarKWinGTM can you please share traces and logs? Open an issue regarding this. Thx!
@NikkeTryHard commented on GitHub (Feb 19, 2026):
what happened? does it hang?
@DarKWinGTM commented on GitHub (Feb 19, 2026):
I try to setup it working with Claude Code But not work.
Claude code have antropic-compatible.
Example payload
POST /v1/messages?beta=true HTTP/1.1
Accept: application/json
Authorization: Bearer <REDACTED_API_KEY>
Content-Type: application/json
User-Agent: claude-cli/<REDACTED_VERSION> (external, cli)
X-Stainless-Arch: arm64
X-Stainless-Lang: js
X-Stainless-OS: MacOS
X-Stainless-Package-Version: <REDACTED_VERSION>
X-Stainless-Retry-Count: 0
X-Stainless-Runtime: node
X-Stainless-Runtime-Version: <REDACTED_NODE_VERSION>
X-Stainless-Timeout: 600
anthropic-beta: claude-code-20250219,interleaved-thinking-2025-05-14,context-management-2025-06-27,prompt-caching-scope-2026-01-05
anthropic-dangerous-direct-browser-access: true
anthropic-version: 2023-06-01
x-app: cli
Connection: keep-alive
Host: localhost:8317
Accept-Encoding: gzip, deflate, br, zstd
Content-Length: 950
{
"model":"gpt-5.1-codex-mini(low)",
"messages":[{"role":"user","content":[{"type":"text","text":"....................."}]}],
"system":[
{"type":"text","text":"You are Claude Code, Anthropic's official CLI for Claude."},
{"type":"text","text":"Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON
object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false)."}
],
"tools":[],
"metadata":{
"user_id":"<REDACTED_USER_ID>account__session<REDACTED_SESSION_ID>"
},
"max_tokens":32000,
"temperature":1,
"output_config":{
"format":{
"type":"json_schema",
"schema":{
"type":"object",
"properties":{
"isNewTopic":{"type":"boolean"},
"title":{"anyOf":[{"type":"string"},{"type":"null"}]}
},
"required":["isNewTopic","title"],
"additionalProperties":false
}
}
},
"stream":true
}
HTTP/1.1 200 OK
Access-Control-Allow-Headers: *
Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
Access-Control-Allow-Origin: *
Cache-Control: no-cache
Connection: keep-alive
Content-Type: text/event-stream
Date: <REDACTED_DATE>
Transfer-Encoding: chunked
event: message_start
data: {"type":"message_start","message":{"id":"<REDACTED_RESPONSE_ID>","type":"message","role":"assistant","model":"gpt-5.1-codex-mini","stop_sequence":null,"usage":{"input_tokens":0,"o
utput_tokens":0},"content":[],"stop_reason":null}}
event: content_block_start
data: {"type":"content_block_start","index":0,"content_block":{"type":"thinking","thinking":""}}
event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"..."}}
event: content_block_stop
data: {"type":"content_block_stop","index":0}
event: content_block_start
data: {"type":"content_block_start","index":1,"content_block":{"type":"text","text":""}}
event: content_block_delta
data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"{"isNewTopic": true, "title": "..."}"}}
event: content_block_stop
data: {"type":"content_block_stop","index":1}
event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"input_tokens":91,"output_tokens":48}}
event: message_stop
data: {"type":"message_stop"}
@NikkeTryHard commented on GitHub (Feb 19, 2026):
added anthropic messages api. please test with claude code!
@DarKWinGTM commented on GitHub (Feb 19, 2026):
Thank you let me check.
@DarKWinGTM commented on GitHub (Feb 19, 2026):
It's working, But have some issue with tool argument, am not sure.
@NikkeTryHard commented on GitHub (Feb 19, 2026):
can you make a new issue with ur version and os and all that? thx
@DarKWinGTM
@DarKWinGTM commented on GitHub (Feb 19, 2026):
Sure