Align Codex default identity and docs
This commit is contained in:
@@ -53,7 +53,7 @@ VisionCoder is also offering our users a limited-time <a href="https://coder.vis
|
||||
- OpenAI Codex support (GPT models) via OAuth login
|
||||
- Claude Code support via OAuth login
|
||||
- Amp CLI and IDE extensions support with provider routing
|
||||
- Streaming and non-streaming responses
|
||||
- Streaming, non-streaming, and WebSocket responses where supported
|
||||
- Function calling/tools support
|
||||
- Multimodal input support (text and images)
|
||||
- Multiple accounts with round-robin load balancing (Gemini, OpenAI, Claude)
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ VisionCoder 还为我们的用户提供 <a href="https://coder.visioncoder.cn" t
|
||||
- 为 CLI 模型提供 OpenAI/Gemini/Claude/Codex 兼容的 API 端点
|
||||
- 新增 OpenAI Codex(GPT 系列)支持(OAuth 登录)
|
||||
- 新增 Claude Code 支持(OAuth 登录)
|
||||
- 支持流式与非流式响应
|
||||
- 支持流式、非流式响应,以及受支持场景下的 WebSocket 响应
|
||||
- 函数调用/工具支持
|
||||
- 多模态输入(文本、图片)
|
||||
- 多账户支持与轮询负载均衡(Gemini、OpenAI、Claude)
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ GLM CODING PLANを10%割引で取得:https://z.ai/subscribe?ic=8JVLJQFSKB
|
||||
- OAuthログインによるOpenAI Codexサポート(GPTモデル)
|
||||
- OAuthログインによるClaude Codeサポート
|
||||
- プロバイダールーティングによるAmp CLIおよびIDE拡張機能のサポート
|
||||
- ストリーミングおよび非ストリーミングレスポンス
|
||||
- ストリーミング、非ストリーミング、および対応環境でのWebSocketレスポンス
|
||||
- 関数呼び出し/ツールのサポート
|
||||
- マルチモーダル入力サポート(テキストと画像)
|
||||
- ラウンドロビン負荷分散による複数アカウント対応(Gemini、OpenAI、Claude)
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
codexUserAgent = "codex-tui/0.118.0 (Mac OS 26.3.1; arm64) iTerm.app/3.6.9 (codex-tui; 0.118.0)"
|
||||
codexUserAgent = "codex_cli_rs/0.118.0 (Mac OS 26.3.1; arm64) iTerm.app/3.6.9"
|
||||
codexOriginator = "codex_cli_rs"
|
||||
codexDefaultImageToolModel = "gpt-image-2"
|
||||
)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -100,6 +101,15 @@ func TestApplyCodexWebsocketHeadersDefaultsToCurrentResponsesBeta(t *testing.T)
|
||||
if got := headers.Get("User-Agent"); got != codexUserAgent {
|
||||
t.Fatalf("User-Agent = %s, want %s", got, codexUserAgent)
|
||||
}
|
||||
if !strings.HasPrefix(codexUserAgent, codexOriginator+"/") {
|
||||
t.Fatalf("default Codex User-Agent = %s, want prefix %s/", codexUserAgent, codexOriginator)
|
||||
}
|
||||
if strings.HasPrefix(codexUserAgent, "codex-tui/") {
|
||||
t.Fatalf("default Codex User-Agent = %s, must not use stale codex-tui prefix", codexUserAgent)
|
||||
}
|
||||
if strings.Contains(codexUserAgent, "(codex-tui;") {
|
||||
t.Fatalf("default Codex User-Agent = %s, must not include stale codex-tui suffix", codexUserAgent)
|
||||
}
|
||||
if got := headers.Get("Originator"); got != codexOriginator {
|
||||
t.Fatalf("Originator = %s, want %s", got, codexOriginator)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user