Skip to content
Closed
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
9 changes: 9 additions & 0 deletions apps/server/src/claudeModelOptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ describe("compileClaudeModelSelection", () => {
).toEqual({ fastMode: false });
});

it("treats unset fast mode as Normal so clients that omit it reuse the same query", () => {
const unset = compileClaudeModelSelection(selection("claude-opus-4-6", []));
const normal = compileClaudeModelSelection(
selection("claude-opus-4-6", [{ id: "fastMode", value: false }]),
);
expect(unset.settings).toEqual({ fastMode: false });
expect(unset.queryIdentity).toBe(normal.queryIdentity);
});

it("uses the model default SDK effort alongside prompt-injected effort", () => {
expect(
compileClaudeModelSelection(
Expand Down
4 changes: 3 additions & 1 deletion apps/server/src/claudeModelOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ export function compileClaudeModelSelection(
const rawEffort = getModelSelectionStringOptionValue(selection, "effort");
const resolvedEffort = resolveClaudeCatalogEffort(catalog, selection.model, rawEffort);
const effort = normalizeClaudeCatalogEffort(catalog, resolvedEffort, selection.model);
// Unset means Normal, as the web composer sends it. Keeping the two apart
// would make a live process look reconfigured when only the client changed.
const fastMode = supportsBoolean("fastMode")
? getModelSelectionBooleanOptionValue(selection, "fastMode")
? (getModelSelectionBooleanOptionValue(selection, "fastMode") ?? false)
: undefined;
const thinking = supportsBoolean("thinking")
? getModelSelectionBooleanOptionValue(selection, "thinking")
Expand Down
Loading