mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-17 20:09:05 +02:00
fix(runner): preserve native Codex reasoning effort
Keep selected and saved effort in the existing native builder while excluding Codex effort from other providers. Update the existing builder contract and regression controls. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
cae179c214
commit
d16eccf109
2 files changed
+9
-2
No files matched your search
@@ -118,6 +118,11 @@ describe("buildCodexLocalConfig", () => {
|
||||
});
|
||||
|
||||
describe("buildPaperclipRunnerConfig", () => {
|
||||
it.each(["", "max"])("preserves or overrides saved native Codex reasoning effort (%s)", thinkingEffort => {
|
||||
const values = makeValues({ thinkingEffort, adapterSchemaValues: { provider: "codex", modelReasoningEffort: "high" } });
|
||||
expect(buildPaperclipRunnerConfig(values).modelReasoningEffort).toBe(thinkingEffort || "high");
|
||||
expect(buildPaperclipRunnerConfig({ ...values, adapterSchemaValues: { provider: "acpx", acpxAgent: "claude", modelReasoningEffort: "high" } })).not.toHaveProperty("modelReasoningEffort");
|
||||
});
|
||||
it.each([undefined, false, true])("preserves Dot attachment consent in create/import forms: %s", value => {
|
||||
const config = buildPaperclipRunnerConfig(makeValues({ adapterType: "paperclip_runner", adapterSchemaValues: { provider: "openai_dot", dotAttachmentAccess: value } }));
|
||||
expect(config.dotAttachmentAccess).toBe(value === true);
|
||||
@@ -142,6 +147,7 @@ describe("buildPaperclipRunnerConfig", () => {
|
||||
codexPermissionMode: "never",
|
||||
lifecycleMode: "per_turn",
|
||||
model: "gpt-5.4",
|
||||
modelReasoningEffort: "high",
|
||||
timeoutSec: 0,
|
||||
graceSec: 15,
|
||||
});
|
||||
@@ -149,7 +155,6 @@ describe("buildPaperclipRunnerConfig", () => {
|
||||
"engine",
|
||||
"agentCommand",
|
||||
"stateDir",
|
||||
"modelReasoningEffort",
|
||||
"search",
|
||||
"fastMode",
|
||||
"dangerouslyBypassApprovalsAndSandbox",
|
||||
|
||||
@@ -76,6 +76,7 @@ export function buildCodexLocalConfig(v: CreateConfigValues): Record<string, unk
|
||||
export function buildPaperclipRunnerConfig(v: CreateConfigValues): Record<string, unknown> {
|
||||
const config = buildCodexLocalConfig(v);
|
||||
const schemaValues = normalizeLegacyRunnerProvider({ ...(v.adapterSchemaValues ?? {}) });
|
||||
const codexReasoningEffort = config.modelReasoningEffort ?? schemaValues.modelReasoningEffort ?? schemaValues.reasoningEffort;
|
||||
for (const unsupportedKey of [
|
||||
"engine",
|
||||
"agentCommand",
|
||||
@@ -232,7 +233,8 @@ export function buildPaperclipRunnerConfig(v: CreateConfigValues): Record<string
|
||||
...schemaValues,
|
||||
provider,
|
||||
...(provider === "codex"
|
||||
? { model: resolvePaperclipRunnerModel("codex", config.model) }
|
||||
? { model: resolvePaperclipRunnerModel("codex", config.model),
|
||||
...(codexReasoningEffort !== undefined ? { modelReasoningEffort: codexReasoningEffort } : {}) }
|
||||
: {}),
|
||||
codexPermissionMode: "never",
|
||||
opencodePermissionMode: resolvePaperclipRunnerPermissionMode(
|
||||
|
||||
Reference in new issue
Block a user