@ccpocket/bridge 1.80.0 → 1.80.1

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.
@@ -6,6 +6,7 @@ import { dirname, join } from "node:path";
6
6
  import { rm, writeFile } from "node:fs/promises";
7
7
  import { createCodexTransport, buildCodexSpawnSpec, } from "./codex-transport.js";
8
8
  import { codexCliJoinTarget } from "./codex-app-server-config.js";
9
+ import { normalizeCodexServiceTierForClient, normalizeCodexServiceTierForRpc, } from "./codex-service-tier.js";
9
10
  import { resolvePlatformPath } from "./path-utils.js";
10
11
  export { buildCodexSpawnSpec };
11
12
  const DEFAULT_CODEX_MODEL = "gpt-5.5";
@@ -186,7 +187,7 @@ export class CodexProcess extends EventEmitter {
186
187
  }
187
188
  /** Update Codex speed for the next turn without restarting the thread. */
188
189
  setServiceTier(serviceTier) {
189
- this._runtimeServiceTier = normalizeServiceTier(serviceTier);
190
+ this._runtimeServiceTier = normalizeCodexServiceTierForRpc(serviceTier);
190
191
  console.log(`[codex-process] Speed changed to: ${this.serviceTier}`);
191
192
  }
192
193
  /**
@@ -453,7 +454,7 @@ export class CodexProcess extends EventEmitter {
453
454
  this._runtimeServiceTier =
454
455
  options?.serviceTier === undefined
455
456
  ? undefined
456
- : normalizeServiceTier(options.serviceTier);
457
+ : normalizeCodexServiceTierForRpc(options.serviceTier);
457
458
  this._approvalPolicy = options?.approvalPolicy;
458
459
  this._approvalsReviewer =
459
460
  options?.approvalsReviewer === undefined
@@ -996,7 +997,7 @@ export class CodexProcess extends EventEmitter {
996
997
  if (requestedModel)
997
998
  threadParams.model = requestedModel;
998
999
  if (options?.serviceTier !== undefined) {
999
- threadParams.serviceTier = normalizeServiceTier(options.serviceTier);
1000
+ threadParams.serviceTier = normalizeCodexServiceTierForRpc(options.serviceTier);
1000
1001
  }
1001
1002
  if (requestedReasoningEffort) {
1002
1003
  // app-server applies reasoning effort on thread start via config overrides,
@@ -1094,7 +1095,7 @@ export class CodexProcess extends EventEmitter {
1094
1095
  : requestedReasoningEffort
1095
1096
  ? { modelReasoningEffort: requestedReasoningEffort }
1096
1097
  : {}),
1097
- serviceTier: normalizeServiceTierForClient(resolvedSettings.serviceTier ?? options?.serviceTier),
1098
+ serviceTier: normalizeCodexServiceTierForClient(resolvedSettings.serviceTier ?? options?.serviceTier),
1098
1099
  ...(resolvedSettings.networkAccessEnabled !== undefined
1099
1100
  ? { networkAccessEnabled: resolvedSettings.networkAccessEnabled }
1100
1101
  : {}),
@@ -2893,18 +2894,6 @@ function extractServiceTiers(raw) {
2893
2894
  }
2894
2895
  return tiers;
2895
2896
  }
2896
- function normalizeServiceTier(value) {
2897
- const normalized = value.trim();
2898
- return !normalized || normalized === "standard" || normalized === "default"
2899
- ? null
2900
- : normalized;
2901
- }
2902
- function normalizeServiceTierForClient(value) {
2903
- if (typeof value !== "string")
2904
- return "standard";
2905
- const normalized = value.trim();
2906
- return !normalized || normalized === "default" ? "standard" : normalized;
2907
- }
2908
2897
  function sanitizeCodexModel(value) {
2909
2898
  if (typeof value !== "string")
2910
2899
  return undefined;