Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/cli/land-fix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ export async function fix(
'model_providers.quest-fixer.env_key="OPENAI_API_KEY"',
"-c",
'model_providers.quest-fixer.wire_api="responses"',
// Without this, Codex runs the proxy's model with no reasoning at all ("reasoning effort: none").
"-c",
'model_reasoning_effort="medium"',
...(model ? ["--model", model] : []),
"-",
];
Expand Down
20 changes: 20 additions & 0 deletions test/land.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,26 @@ ${requeueScript}
await fix(dir, log, [1], agent, ["-"]);
expect(readFileSync(join(dir, "prompt.txt"), "utf8")).toContain(`PRs:\n- #1: branch pr-1 at ${head}\n`);
});
test("runs default Codex with an explicit reasoning effort", async () => {
const dir = fixRepository();
const agent = join(dir, "agent");
const log = join(dir, "failure.log");
writeFileSync(log, "failed check");
vi.stubEnv("OPENAI_BASE_URL", "http://proxy.test/v1");
vi.stubEnv("OPENAI_API_KEY", "proxy-client");
writeFileSync(
agent,
`#!/bin/sh
set -eu
printf '%s\\n' "$@" > argv.txt
cat > prompt.txt
${requeueScript}
`,
{ mode: 0o755 },
);
await fix(dir, log, [1], agent);
expect(readFileSync(join(dir, "argv.txt"), "utf8").split("\n")).toContain('model_reasoning_effort="medium"');
});
test("refuses to start an agent without a supplied PR's branch", async () => {
const dir = fixRepository();
const log = join(dir, "failure.log");
Expand Down
Loading