@ccpocket/bridge 1.81.1 → 1.81.2

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.
@@ -367,5 +367,6 @@ export declare class CodexProcess extends EventEmitter<CodexProcessEvents> {
367
367
  private extractToolUseId;
368
368
  private handleServerRequestResolved;
369
369
  }
370
+ export declare function normalizeCodexReasoningEffortForModel(model: unknown, value: CodexStartOptions["modelReasoningEffort"]): CodexStartOptions["modelReasoningEffort"];
370
371
  /** Validate the app-server ThreadGoal payload at the process boundary. */
371
372
  export declare function parseCodexGoal(value: unknown): CodexGoal;
@@ -179,9 +179,9 @@ export class CodexProcess extends EventEmitter {
179
179
  this._runtimeModel = sanitizedModel;
180
180
  this.startModel = sanitizedModel;
181
181
  }
182
- if (modelReasoningEffort !== undefined) {
183
- this._runtimeModelReasoningEffort =
184
- normalizeReasoningEffort(modelReasoningEffort);
182
+ const requestedReasoningEffort = modelReasoningEffort ?? this._runtimeModelReasoningEffort;
183
+ if (requestedReasoningEffort !== undefined) {
184
+ this._runtimeModelReasoningEffort = normalizeCodexReasoningEffortForModel(this.model, requestedReasoningEffort);
185
185
  }
186
186
  console.log(`[codex-process] Model changed to: ${this.model}` +
187
187
  (this._runtimeModelReasoningEffort
@@ -473,7 +473,7 @@ export class CodexProcess extends EventEmitter {
473
473
  this.lastTokenUsage = null;
474
474
  this.startModel = sanitizeCodexModel(options?.model);
475
475
  this._runtimeModel = undefined;
476
- this._runtimeModelReasoningEffort = options?.modelReasoningEffort;
476
+ this._runtimeModelReasoningEffort = normalizeCodexReasoningEffortForModel(this.startModel, options?.modelReasoningEffort);
477
477
  this._runtimeServiceTier =
478
478
  options?.serviceTier === undefined
479
479
  ? undefined
@@ -1014,9 +1014,7 @@ export class CodexProcess extends EventEmitter {
1014
1014
  }
1015
1015
  const threadConfig = {};
1016
1016
  const requestedModel = sanitizeCodexModel(options?.model);
1017
- const requestedReasoningEffort = options?.modelReasoningEffort
1018
- ? normalizeReasoningEffort(options.modelReasoningEffort)
1019
- : undefined;
1017
+ const requestedReasoningEffort = normalizeCodexReasoningEffortForModel(requestedModel, options?.modelReasoningEffort);
1020
1018
  if (requestedModel)
1021
1019
  threadParams.model = requestedModel;
1022
1020
  if (options?.serviceTier !== undefined) {
@@ -1429,9 +1427,7 @@ export class CodexProcess extends EventEmitter {
1429
1427
  const requestedModel = sanitizeCodexModel(this._runtimeModel) ??
1430
1428
  sanitizeCodexModel(options?.model);
1431
1429
  const requestedReasoningEffort = this._runtimeModelReasoningEffort ??
1432
- (options?.modelReasoningEffort
1433
- ? normalizeReasoningEffort(options.modelReasoningEffort)
1434
- : undefined);
1430
+ normalizeCodexReasoningEffortForModel(requestedModel, options?.modelReasoningEffort);
1435
1431
  if (requestedModel)
1436
1432
  params.model = requestedModel;
1437
1433
  if (requestedReasoningEffort) {
@@ -2878,7 +2874,11 @@ function normalizeSandboxMode(value) {
2878
2874
  return "workspace-write";
2879
2875
  }
2880
2876
  }
2881
- function normalizeReasoningEffort(value) {
2877
+ export function normalizeCodexReasoningEffortForModel(model, value) {
2878
+ if (sanitizeCodexModel(model) === "gpt-6-astra" &&
2879
+ (value === "none" || value === "minimal")) {
2880
+ return "low";
2881
+ }
2882
2882
  return value;
2883
2883
  }
2884
2884
  function extractReasoningEfforts(raw) {