@wengine-ai/ccr-provider-codex 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugin.js +6 -6
- package/dist/plugin.json +1 -1
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -54,7 +54,7 @@ var CODEX_CHATGPT_ORIGIN = "https://chatgpt.com";
|
|
|
54
54
|
var CODEX_RESET_CREDITS_PATH = "/backend-api/wham/rate-limit-reset-credits";
|
|
55
55
|
var CODEX_RESET_CONSUME_PATH = "/backend-api/wham/rate-limit-reset-credits/consume";
|
|
56
56
|
var CODEX_WHAM_USAGE_PATH = "/backend-api/wham/usage";
|
|
57
|
-
var CODEX_DEFAULT_CLIENT_VERSION = "0.
|
|
57
|
+
var CODEX_DEFAULT_CLIENT_VERSION = "0.170.0";
|
|
58
58
|
var CODEX_UPSTREAM_URL = `${CODEX_BACKEND_BASE}/responses`;
|
|
59
59
|
var CODEX_CLIENT_VERSION = CODEX_DEFAULT_CLIENT_VERSION;
|
|
60
60
|
var CODEX_ORIGINATOR = "codex_cli_rs";
|
|
@@ -77,14 +77,14 @@ function codexUserAgent(version = codexClientVersion(), platform = process.platf
|
|
|
77
77
|
const osName = platform === "darwin" ? "Mac OS X" : platform === "win32" ? "Windows NT" : "Linux";
|
|
78
78
|
return `codex_cli_rs/${version} (${osName}; ${arch})`;
|
|
79
79
|
}
|
|
80
|
-
function codexManagementHeaders(accessToken, accountId) {
|
|
80
|
+
function codexManagementHeaders(accessToken, accountId, version = codexClientVersion()) {
|
|
81
81
|
return {
|
|
82
82
|
Authorization: `Bearer ${accessToken}`,
|
|
83
83
|
...accountId ? { "chatgpt-account-id": accountId } : {},
|
|
84
84
|
"OpenAI-Beta": "responses=experimental",
|
|
85
85
|
originator: "codex_cli_rs",
|
|
86
|
-
version
|
|
87
|
-
"User-Agent": codexUserAgent(),
|
|
86
|
+
version,
|
|
87
|
+
"User-Agent": codexUserAgent(version),
|
|
88
88
|
Accept: "application/json",
|
|
89
89
|
// Same rationale as the token exchange: a compressed body without
|
|
90
90
|
// content-encoding hands undecodable bytes to text(); identity is plain.
|
|
@@ -337,7 +337,7 @@ async function fetchCodexModels(params) {
|
|
|
337
337
|
const url = `${params.base ?? CODEX_BACKEND_BASE}/models?client_version=${encodeURIComponent(version)}`;
|
|
338
338
|
const res = await params.fetchImpl(url, boundedFetchInit({
|
|
339
339
|
method: "GET",
|
|
340
|
-
headers: codexManagementHeaders(params.accessToken, params.accountId)
|
|
340
|
+
headers: codexManagementHeaders(params.accessToken, params.accountId, version)
|
|
341
341
|
}));
|
|
342
342
|
const text = await res.text().catch(() => "");
|
|
343
343
|
let json = null;
|
|
@@ -3085,7 +3085,7 @@ function replaceCodexTokenMaintenance(next) {
|
|
|
3085
3085
|
// src/plugin.ts
|
|
3086
3086
|
var manifest = {
|
|
3087
3087
|
name: "codex",
|
|
3088
|
-
version: "1.0.
|
|
3088
|
+
version: "1.0.15",
|
|
3089
3089
|
coreApi: "1",
|
|
3090
3090
|
description: "Codex subscription managed provider: chatgpt.com backend-api/codex data plane, browser OAuth login (PKCE, loopback 1455/1457 + paste), model sync, usage and admin routes."
|
|
3091
3091
|
};
|
package/dist/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"coreApi": "1",
|
|
5
5
|
"description": "Codex subscription managed provider: chatgpt.com backend-api/codex data plane, browser OAuth login (PKCE, loopback 1455/1457 + paste), model sync, usage and admin routes."
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wengine-ai/ccr-provider-codex",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Codex subscription provider plugin for claude-code-router: browser OAuth login, fixed-origin responses data plane, transformer, managed runtime, admin routes, config protector and UI card.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin.js",
|