Skip to content

feat: Claude 2.1.241 protocol + official Grok/GPT backports - #4

Open
dofastted wants to merge 9 commits into
baseline/official-0.1.179from
feat/official-179-claude-241-grok-gpt
Open

feat: Claude 2.1.241 protocol + official Grok/GPT backports#4
dofastted wants to merge 9 commits into
baseline/official-0.1.179from
feat/official-179-claude-241-grok-gpt

Conversation

@dofastted

Copy link
Copy Markdown
Owner

Summary

  • Align Claude OAuth / SetupToken mimic with official CLI 2.1.241 (sdk-cli identity, UA, billing, betas, 1h/global expansion cache). Default system stays 3 blocks; no official 10k/16k prompt dump.
  • Backport official Wei-Shaw/sub2api Grok + GPT fixes in order: #5925 #5888 #6049 #6068 #5864 #5846 #5632 #5487.
  • This branch is based on official 0.1.179 (2bc139ab5) plus those cherry-picks, not the older fork main (b8f23c5). Histories have diverged; review as a lineage cutover, not a small patch.

Test plan

  • go test ./internal/pkg/xai ./internal/pkg/apicompat
  • Grok / ModelInput / compaction 422 / guardian / sticky / Claude 2.1.241 protocol tests
  • Hostdzire 23.80.83.15 image rollout + /health
  • After deploy: unofficial Claude request shows Agent SDK identity + sdk-cli billing; Grok 429/422 retry still works

Wei-Shaw and others added 9 commits August 23, 2026 16:02
fix(grok): 对齐官方目录与计费,并修复容量重试、Realtime 握手与媒体兼容
…bility

修复 OpenAI Responses/Codex 与 Grok 多路径兼容问题
修复 OpenAI Chat 动态系统消息导致账号亲和漂移
fix(openai): keep auto-review on parent account
fix(openai): avoid duplicate HTTP bridge replay
…d-tool-arguments

fix(apicompat): reject malformed tool-call arguments
…-name-empty

fix(apicompat): omit empty tool name on streamed arguments deltas
fix(apicompat): chat/completions 的 file part 转换为 Responses input_file,不再静默丢弃
Match official sdk-cli identity, UA, billing, betas, and expansion cache
without injecting the full 4-block system prompt.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dofastted

Copy link
Copy Markdown
Owner Author

Hostdzire 23.80.83.15 rollout complete.

  • Image: claude2api:e59b95c4a-claude241-grok (commit e59b95c4a)
  • Golden test against live DB snapshot: checksum=0 setup_failed=0 health={"status":"ok"}
  • Live: 127.0.0.1:8019/health → 200, container healthy
  • Previous image kept on disk: claude2api:b8f23c5-grok-models
  • Rollback anchors: predeploy-20260823T090300Z.pg.dump + docker-compose.yml.bak.predeploy-20260823T090300Z

Post-deploy smoke still recommended: unofficial Claude request should show Agent SDK identity + sdk-cli billing; Grok 429/422 retry path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants