Thinking: gate xhigh by model
This commit is contained in:
committed by
Peter Steinberger
parent
f50e06a1b6
commit
a3641526ab
@@ -31,7 +31,11 @@ import {
|
||||
DEFAULT_HEARTBEAT_ACK_MAX_CHARS,
|
||||
stripHeartbeatToken,
|
||||
} from "../auto-reply/heartbeat.js";
|
||||
import { normalizeThinkLevel } from "../auto-reply/thinking.js";
|
||||
import {
|
||||
formatXHighModelHint,
|
||||
normalizeThinkLevel,
|
||||
supportsXHighThinking,
|
||||
} from "../auto-reply/thinking.js";
|
||||
import type { CliDeps } from "../cli/deps.js";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import {
|
||||
@@ -366,6 +370,11 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
catalog: await loadCatalog(),
|
||||
});
|
||||
}
|
||||
if (thinkLevel === "xhigh" && !supportsXHighThinking(provider, model)) {
|
||||
throw new Error(
|
||||
`Thinking level "xhigh" is only supported for ${formatXHighModelHint()}.`,
|
||||
);
|
||||
}
|
||||
|
||||
const timeoutMs = resolveAgentTimeoutMs({
|
||||
cfg: cfgWithAgentDefaults,
|
||||
|
||||
Reference in New Issue
Block a user