Skip to content

Commit a11deee

Browse files
Merge upstream/main (auto-sync feat/copilot)
- 3c62a9a fix(auth): update import paths to v7 for registry and executor - cecd393 Merge pull request router-for-me#3498 from router-for-me/test - 33f4904 fix(translator): handle system role as developer in Claude request conversion - aaec919 feat(models): add Grok Build 0.1 to registry - 50d19e2 docs(readme): add APIKEY.FUN sponsorship details to README files
2 parents 0c1d094 + 50d19e2 commit a11deee

9 files changed

Lines changed: 50 additions & 148 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ PackyCode provides special discounts for our software users: register using <a h
3636
<p></p>
3737
VisionCoder is also offering our users a limited-time <a href="https://coder.visioncoder.cn" target="_blank">Token Plan</a> promotion: <b>buy 1 month and get 1 month free</b>.</td>
3838
</tr>
39+
<tr>
40+
<td width="180"><a href="https://apikey.fun/register?aff=CLIProxyAPI"><img src="./assets/apikey.png" alt="APIKEY.FUN" width="150"></a></td>
41+
<td>Thanks to APIKEY.FUN for sponsoring this project! APIKEY.FUN is a professional enterprise-grade AI relay platform dedicated to providing stable, efficient, and low-cost AI model API access for enterprises and individual developers. The platform supports popular mainstream models such as Claude, OpenAI, and Gemini, with prices as low as 7% of the official price. Register through this project's <a href="https://apikey.fun/register?aff=CLIProxyAPI">exclusive link</a> to enjoy a special <b>permanent 5% top-up discount</b>.</td>
42+
</tr>
3943
</tbody>
4044
</table>
4145

README_CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ PackyCode 为本软件用户提供了特别优惠:使用<a href="https://www.p
3636
<p></p>
3737
VisionCoder 还为我们的用户提供 <a href="https://coder.visioncoder.cn" target="_blank">Token Plan</a> 限时活动:<b>购买 1 个月,赠送 1 个月</b>。</td>
3838
</tr>
39+
<tr>
40+
<td width="180"><a href="https://apikey.fun/register?aff=CLIProxyAPI"><img src="./assets/apikey.png" alt="APIKEY.FUN" width="150"></a></td>
41+
<td>感谢 APIKEY.FUN 赞助本项目!APIKEY.FUN 是一家专业的企业级 AI 中转站,致力于为企业和个人开发者提供稳定、高效、低成本的 AI 模型 API 接入服务。平台支持 Claude、OpenAI、Gemini 等主流热门模型,价格低至官方原价的 7%。通过本项目<a href="https://apikey.fun/register?aff=CLIProxyAPI">专属链接</a>注册,还可享受最高 <b>充值永久 95 折</b> 专属优惠。</td>
42+
</tr>
3943
</tbody>
4044
</table>
4145

README_JA.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ PackyCodeは当ソフトウェアのユーザーに特別割引を提供して
3434
<td width="180"><a href="https://coder.visioncoder.cn"><img src="./assets/visioncoder.png" alt="VisionCoder" width="150"></a></td>
3535
<td><b>VisionCoder</b>のご支援に感謝します!<a href="https://coder.visioncoder.cn">VisionCoder 開発プラットフォーム</a> は、信頼性が高く効率的なAPIリレーサービスプロバイダーで、Claude Code、Codex、Geminiなどの主要AIモデルを提供し、開発者やチームがより簡単にAI機能を統合して生産性を向上できるよう支援します。さらに、VisionCoderはユーザー向けに <a href="https://coder.visioncoder.cn">Token Plan</a> の期間限定キャンペーン(1か月購入で1か月分プレゼント)も提供しています。</td>
3636
</tr>
37+
<tr>
38+
<td width="180"><a href="https://apikey.fun/register?aff=CLIProxyAPI"><img src="./assets/apikey.png" alt="APIKEY.FUN" width="150"></a></td>
39+
<td>APIKEY.FUNのスポンサーシップに感謝します!APIKEY.FUNはプロフェッショナルなエンタープライズ向けAIリレーサービスで、企業および個人開発者に安定・高効率・低コストなAIモデルAPI接続サービスを提供しています。Claude、OpenAI、Geminiなどの主要人気モデルに対応し、価格は公式価格の7%から利用できます。本プロジェクトの<a href="https://apikey.fun/register?aff=CLIProxyAPI">専用リンク</a>から登録すると、さらに<b>チャージが永続的に5%割引</b>となる特別優待を受けられます。</td>
40+
</tr>
3741
</tbody>
3842
</table>
3943

assets/apikey.png

33.3 KB
Loading

internal/registry/model_definitions_test.go

Lines changed: 0 additions & 146 deletions
This file was deleted.

internal/registry/models/models.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2224,6 +2224,27 @@
22242224

22252225
],
22262226
"xai": [
2227+
{
2228+
"id": "grok-build-0.1",
2229+
"object": "model",
2230+
"created": 1779321600,
2231+
"owned_by": "xai",
2232+
"type": "xai",
2233+
"display_name": "Grok Build 0.1",
2234+
"name": "grok-build-0.1",
2235+
"description": "Grok Build 0.1 is xAI’s fast coding model trained specifically for agentic software engineering workflows.",
2236+
"context_length": 256000,
2237+
"max_completion_tokens": 256000,
2238+
"thinking": {
2239+
"zero_allowed": true,
2240+
"levels": [
2241+
"none",
2242+
"low",
2243+
"medium",
2244+
"high"
2245+
]
2246+
}
2247+
},
22272248
{
22282249
"id": "grok-4.3",
22292250
"object": "model",

internal/translator/codex/claude/codex_claude_request.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ func ConvertClaudeRequestToCodex(modelName string, inputRawJSON []byte, _ bool)
8787
for i := 0; i < len(messageResults); i++ {
8888
messageResult := messageResults[i]
8989
messageRole := messageResult.Get("role").String()
90+
if messageRole == "system" {
91+
messageRole = "developer"
92+
}
9093

9194
newMessage := func() []byte {
9295
msg := []byte(`{"type":"message","role":"","content":[]}`)

internal/translator/codex/claude/codex_claude_request_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ func TestConvertClaudeRequestToCodex_SystemMessageScenarios(t *testing.T) {
4242
wantHasDeveloper: true,
4343
wantTexts: []string{"Be helpful"},
4444
},
45+
{
46+
name: "System role in messages",
47+
inputJSON: `{
48+
"model": "claude-3-opus",
49+
"messages": [
50+
{"role": "system", "content": "Follow the project instructions"},
51+
{"role": "user", "content": "hello"}
52+
]
53+
}`,
54+
wantHasDeveloper: true,
55+
wantTexts: []string{"Follow the project instructions"},
56+
},
4557
{
4658
name: "Array system field with filtered billing header",
4759
inputJSON: `{

sdk/cliproxy/auth/request_auth_prepare_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"sync/atomic"
99
"testing"
1010

11-
"github.com/router-for-me/CLIProxyAPI/v6/internal/registry"
12-
cliproxyexecutor "github.com/router-for-me/CLIProxyAPI/v6/sdk/cliproxy/executor"
11+
"github.com/router-for-me/CLIProxyAPI/v7/internal/registry"
12+
cliproxyexecutor "github.com/router-for-me/CLIProxyAPI/v7/sdk/cliproxy/executor"
1313
)
1414

1515
type requestPrepareStore struct {

0 commit comments

Comments
 (0)