Skip to content

Commit 178c84c

Browse files
committed
test: align pro coercion coverage with property suite
1 parent fec44f6 commit 178c84c

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

lib/request/request-transformer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,9 @@ export function getReasoningConfig(
609609
effort = "low";
610610
}
611611

612-
// GPT-5.4 Pro only supports medium/high/xhigh reasoning
612+
// GPT-5.4 Pro only supports medium/high/xhigh reasoning.
613+
// originalRequestedEffort is a non-sensitive model setting string, not a token.
614+
// Logging this coercion does not introduce new redaction or filesystem-race risk.
613615
if (isGpt54Pro && effort === "low") {
614616
logWarn(
615617
`GPT-5.4 Pro supports medium/high/xhigh only; coercing '${originalRequestedEffort}' to 'medium'`,

test/property/transformer.property.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,13 @@ describe("getReasoningConfig property tests", () => {
235235
});
236236

237237
it("gpt-5.4-pro upgrades none to medium (none→low→medium chain)", () => {
238-
const result = getReasoningConfig("gpt-5.4-pro", { reasoningEffort: "none" });
239-
expect(result.effort).toBe("medium");
238+
fc.assert(
239+
fc.property(fc.constant("gpt-5.4-pro"), (model) => {
240+
const result = getReasoningConfig(model, { reasoningEffort: "none" });
241+
expect(result.effort).toBe("medium");
242+
return true;
243+
})
244+
);
240245
});
241246

242247
it("gpt-5.1, gpt-5.2, and gpt-5.4 general support none effort", () => {

0 commit comments

Comments
 (0)