refactor(codex): keep native effort config at owner

This commit is contained in:
Dallin Romney
2026-08-21 18:13:35 -07:00
parent 915de54cb2
commit 3925bd89fa
2 changed files with 7 additions and 7 deletions
@@ -164,7 +164,6 @@ export function buildThreadStartParams(
environmentSelection?: CodexTurnEnvironmentParams[];
model?: string | null;
modelProvider?: string | null;
reasoningEffort?: string | null;
hostSystemAgentActive?: boolean;
restrictedToolSurfaceInheritedMcpServerNames?: readonly string[];
shellEnvironment?: Readonly<Record<string, string>>;
@@ -217,7 +216,6 @@ export function buildThreadStartParams(
options.restrictedToolSurfaceInheritedMcpServerNames,
shellEnvironment: options.shellEnvironment,
disableLoginShell: options.disableLoginShell,
reasoningEffort: options.reasoningEffort,
}),
...resolveCodexThreadEnvironmentSelection(options),
developerInstructions:
@@ -253,7 +251,6 @@ export function buildThreadResumeParams(
restrictedToolSurfaceInheritedMcpServerNames?: readonly string[];
shellEnvironment?: Readonly<Record<string, string>>;
disableLoginShell?: boolean;
reasoningEffort?: string | null;
preserveNativeModel?: boolean;
},
): CodexThreadResumeParams {
@@ -424,7 +421,6 @@ export function buildCodexRuntimeThreadConfigForRun(
restrictedToolSurfaceInheritedMcpServerNames?: readonly string[];
shellEnvironment?: Readonly<Record<string, string>>;
disableLoginShell?: boolean;
reasoningEffort?: string | null;
} = {},
): JsonObject {
const ringZeroActive =
@@ -486,7 +482,6 @@ export function buildCodexRuntimeThreadConfigForRun(
params.authoredContextTokenCap === undefined
? undefined
: { model_context_window: params.authoredContextTokenCap },
options.reasoningEffort ? { model_reasoning_effort: options.reasoningEffort } : undefined,
) ?? baseConfig;
const contextConfig = {
...runtimeConfig,
@@ -13,6 +13,7 @@ import {
import { CodexAppServerRpcError, type CodexAppServerClient } from "./client.js";
import type { CodexAppServerRuntimeOptions } from "./config.js";
import { buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key.js";
import { mergeCodexThreadConfigs } from "./plugin-thread-config.js";
import {
attestCodexPluginThreadApps,
discardUnattestedCodexPluginThread,
@@ -176,7 +177,12 @@ export async function materializePendingSupervisionBranch(
dynamicTools: params.dynamicTools,
appServer: params.appServer,
developerInstructions: params.developerInstructions,
config: params.config,
config: mergeCodexThreadConfigs(
params.config,
probeResponse.reasoningEffort
? { model_reasoning_effort: probeResponse.reasoningEffort }
: undefined,
),
nativeCodeModeEnabled: params.nativeCodeModeEnabled,
nativeProviderWebSearchSupport: params.nativeProviderWebSearchSupport,
nativeCodeModeOnlyEnabled: params.nativeCodeModeOnlyEnabled,
@@ -184,7 +190,6 @@ export async function materializePendingSupervisionBranch(
environmentSelection: params.environmentSelection,
model: nativeModel,
modelProvider: nativeModelProvider,
reasoningEffort: probeResponse.reasoningEffort,
hostSystemAgentActive: params.hostSystemAgentActive,
restrictedToolSurfaceInheritedMcpServerNames:
params.restrictedToolSurfaceInheritedMcpServerNames,