Commit Graph
52 Commits
Author SHA1 Message Date
cyhhao adb77af1d9 fix: satisfy golangci-lint (nil checks, remove unused helpers) 2026-01-31 02:07:57 +08:00
cyhhao 3a34746668 refactor: stop rewriting tool descriptions; keep only system sentence rewrite 2026-01-31 02:01:51 +08:00
cyhhao fe17058700 refactor: limit OpenCode keyword replacement to tool descriptions 2026-01-31 01:40:38 +08:00
cyhhao 602bf9c017 Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-30 13:21:25 +08:00
cyhhao fa454b1b99 fix: align Claude Code system banner with opencode latest 2026-01-29 15:37:07 +08:00
cyhhao 8375094c69 fix(oauth): match Claude CLI accept header and beta set 2026-01-29 15:31:29 +08:00
cyhhao 91079d3f15 chore(debug): emit Claude mimic fingerprint on credential-scope error 2026-01-29 15:17:46 +08:00
cyhhao 63412a9fcc chore(debug): log Claude mimic fingerprint 2026-01-29 03:13:14 +08:00
cyhhao d98648f03b fix: rewrite OpenCode identity sentence to Claude Code 2026-01-29 03:03:40 +08:00
cyhhao c37fe91672 fix(oauth): update Claude CLI fingerprint headers 2026-01-29 02:52:26 +08:00
cyhhao 4d40fb6b60 fix(oauth): merge anthropic-beta and force Claude Code headers in mimic mode 2026-01-29 02:36:28 +08:00
cyhhao be3b788b8f fix: also prefix next system block with Claude Code banner 2026-01-29 02:03:54 +08:00
cyhhao 723e54013a fix(oauth): mimic Claude Code metadata and beta headers 2026-01-29 01:49:51 +08:00
cyhhao 4d566f68b6 chore: gofmt 2026-01-29 01:34:58 +08:00
cyhhao 31f817d189 fix: add newline separation for Claude Code system prompt 2026-01-29 01:28:43 +08:00
cyhhao 59231668c5 Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-29 01:16:36 +08:00
cyhhao ffe43f6098 Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-27 11:09:11 +08:00
cyhhao a161fcc89b Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-26 10:44:38 +08:00
cyhhao 65e69738cc Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-20 22:46:23 +08:00
cyhhao c8e2f614fa Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-20 13:53:32 +08:00
cyhhao 2f2e76f9c6 fix(gateway): gate streaming tool rewrites behind mimic 2026-01-19 16:20:24 +08:00
cyhhao dd7f21244b merge: resolve conflicts with main 2026-01-19 15:35:31 +08:00
cyhhao 49be9d08f3 fix(网关): OAuth 请求统一 user_id 与指纹 2026-01-19 15:02:00 +08:00
cyhhao bba5b3c037 fix(网关): OAuth 请求统一 user_id 与指纹 2026-01-19 15:01:32 +08:00
cyhhao 26298c4a5f fix(openai): emit OpenAI-compatible SSE error events 2026-01-19 13:53:39 +08:00
cyhhao eb7d830296 fix(网关): 修复流式 tool 输入参数转换 2026-01-19 03:57:33 +08:00
cyhhao 02db4c7671 fix(网关): 修复流式 tool 输入参数转换 2026-01-19 03:53:08 +08:00
cyhhao a05b8b56e3 fix(网关): SSE 缓冲 input_json_delta 反向转换 2026-01-19 03:46:31 +08:00
cyhhao eca3898410 fix(网关): SSE 缓冲 input_json_delta 反向转换 2026-01-19 03:46:09 +08:00
cyhhao 6901b64fce merge: sync upstream changes 2026-01-17 18:30:16 +08:00
cyhhao 32c47b1509 fix(gateway): satisfy golangci-lint checks 2026-01-17 18:16:34 +08:00
cyhhao 8917a3ea8f fix(网关): 修复 golangci-lint 2026-01-17 00:27:36 +08:00
cyhhao 0c011b889b fix(网关): Claude Code OAuth 补齐 oauth beta 2026-01-16 23:38:09 +08:00
cyhhao 0962ba43c0 fix(网关): 补齐非 Claude Code OAuth 兼容 2026-01-16 23:38:09 +08:00
cyhhao b8c48fb477 fix(网关): 区分 Claude Code OAuth 适配 2026-01-16 23:38:09 +08:00
cyhhao 2a7d04fec4 fix(网关): 对齐 Claude OAuth 请求适配 2026-01-16 23:36:57 +08:00
cyhhao bd854e1750 fix(网关): Claude Code OAuth 补齐 oauth beta 2026-01-16 23:15:52 +08:00
cyhhao 65fd0d15ae fix(网关): 补齐非 Claude Code OAuth 兼容 2026-01-16 00:42:31 +08:00
cyhhao c11f14f3a0 fix(gateway): drain upstream after client disconnect 2026-01-15 21:51:14 +08:00
cyhhao 98b65e67f2 fix(gateway): avoid injecting invalid SSE on client cancel 2026-01-15 21:42:13 +08:00
cyhhao c579439c1e fix(网关): 区分 Claude Code OAuth 适配 2026-01-15 19:17:07 +08:00
cyhhao 46e5ac9672 fix(网关): 对齐 Claude OAuth 请求适配 2026-01-15 18:54:42 +08:00
cyhhao 675e61385f Merge branch 'main' of github.com:Wei-Shaw/sub2api 2026-01-12 22:36:14 +08:00
cyhhao 67acac1082 fix: adjust OpenCode OpenAI example store placement 2026-01-12 22:31:43 +08:00
cyhhao aa1a3b9a74 fix: update OpenCode use-key examples 2026-01-11 20:29:32 +08:00
cyhhao abbde130ab Revert Codex OAuth fallback handling 2026-01-11 18:43:47 +08:00
cyhhao 80c1cdf024 fix(lint): trim unused codex helpers 2026-01-10 22:45:29 +08:00
cyhhao 1a641392d9 Merge up/main 2026-01-10 21:57:57 +08:00
cyhhao 36b817d008 Align OAuth transform with OpenCode instructions 2026-01-10 20:53:16 +08:00
cyhhao eb06006d6c Make Codex CLI passthrough 2026-01-10 03:12:56 +08:00
cyhhao 7a06c4873e Fix Codex OAuth tool mapping 2026-01-09 18:35:58 +08:00
cyhhao 5b8d4fb047 feat(openai): add AI SDK content format compatibility for OAuth accounts
- Add normalizeInputForCodexAPI function to convert AI SDK multi-part
  content format to simplified format expected by ChatGPT Codex API
- AI SDK sends: {"content": [{"type": "input_text", "text": "..."}]}
- Codex API expects: {"content": "..."}
- Only applies to OAuth accounts (ChatGPT internal API)
- API Key accounts remain unchanged (OpenAI Platform API supports both)
2026-01-09 00:34:49 +08:00