@wengine-ai/ccr-provider-codex 1.0.9 → 1.0.10

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 CHANGED
@@ -1570,8 +1570,10 @@ function conversationKey(instructions, input, sessionId) {
1570
1570
  const parts = [];
1571
1571
  if (instructions) parts.push(instructions);
1572
1572
  for (const item of input) {
1573
- parts.push(JSON.stringify(item));
1574
- if (item?.role === "user") break;
1573
+ if (item?.role === "user") {
1574
+ parts.push(JSON.stringify(item));
1575
+ break;
1576
+ }
1575
1577
  }
1576
1578
  const digest = sha256Hex(sessionId + "\0" + parts.join("\0"));
1577
1579
  return [
@@ -1694,10 +1696,11 @@ function codexFinalizeBody(body, options = {}) {
1694
1696
  let { input } = finalizeInput(out.input);
1695
1697
  input = finalizeInstructions(out, input, options.modelInstructions);
1696
1698
  out.input = input;
1699
+ const stableInstructions = typeof options.modelInstructions === "string" && options.modelInstructions.trim() !== "" && out.instructions === options.modelInstructions ? out.instructions : "";
1697
1700
  if (typeof out.prompt_cache_key !== "string" || out.prompt_cache_key.trim() === "") {
1698
- const seed = typeof options.sessionId === "string" && options.sessionId ? options.sessionId : JSON.stringify([out.instructions ?? "", input[0] ?? null]);
1701
+ const seed = typeof options.sessionId === "string" && options.sessionId ? options.sessionId : "";
1699
1702
  out.prompt_cache_key = conversationKey(
1700
- typeof out.instructions === "string" ? out.instructions : "",
1703
+ stableInstructions,
1701
1704
  input,
1702
1705
  seed
1703
1706
  );
@@ -2585,7 +2588,7 @@ var codexLocales = {
2585
2588
  // src/plugin.ts
2586
2589
  var manifest = {
2587
2590
  name: "codex",
2588
- version: "1.0.9",
2591
+ version: "1.0.10",
2589
2592
  coreApi: "1",
2590
2593
  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."
2591
2594
  };
package/dist/plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
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.9",
3
+ "version": "1.0.10",
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",