fix(claude): preserve explicit model options
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
c03c49f265
commit
9fea543c3b
2 files changed
+8
-4
No files matched your search
@@ -34,6 +34,10 @@ describe("compileClaudeModelSelection", () => {
|
||||
compileClaudeModelSelection(selection("claude-opus-4-6", [{ id: "fastMode", value: true }]))
|
||||
.settings,
|
||||
).toEqual({ fastMode: true });
|
||||
expect(
|
||||
compileClaudeModelSelection(selection("claude-opus-4-6", [{ id: "fastMode", value: false }]))
|
||||
.settings,
|
||||
).toEqual({ fastMode: false });
|
||||
});
|
||||
|
||||
it("uses the model default SDK effort alongside prompt-injected effort", () => {
|
||||
|
||||
@@ -33,15 +33,15 @@ export function compileClaudeModelSelection(
|
||||
const rawEffort = getModelSelectionStringOptionValue(selection, "effort");
|
||||
const resolvedEffort = resolveClaudeEffort(capabilities, rawEffort);
|
||||
const effort = normalizeClaudeCliEffort(resolvedEffort, selection.model);
|
||||
const fastMode =
|
||||
supportsBoolean("fastMode") &&
|
||||
getModelSelectionBooleanOptionValue(selection, "fastMode") === true;
|
||||
const fastMode = supportsBoolean("fastMode")
|
||||
? getModelSelectionBooleanOptionValue(selection, "fastMode")
|
||||
: undefined;
|
||||
const thinking = supportsBoolean("thinking")
|
||||
? getModelSelectionBooleanOptionValue(selection, "thinking")
|
||||
: undefined;
|
||||
const settings = {
|
||||
...(typeof thinking === "boolean" ? { alwaysThinkingEnabled: thinking } : {}),
|
||||
...(fastMode ? { fastMode: true } : {}),
|
||||
...(typeof fastMode === "boolean" ? { fastMode } : {}),
|
||||
...(isClaudeUltracodeEffort(resolvedEffort) ? { ultracode: true } : {}),
|
||||
};
|
||||
const apiModelId = resolveClaudeApiModelId(selection);
|
||||
|
||||
Reference in new issue
Block a user