Significantly increase AI tool budgets now that the Verification Harness prevents runaway loops
This commit is contained in:
@@ -53,16 +53,15 @@ type TurnIntent =
|
|||||||
|
|
||||||
const TOOL_BUDGETS: Record<TurnIntent, number> = {
|
const TOOL_BUDGETS: Record<TurnIntent, number> = {
|
||||||
conversational: 1, // Must be at least 1 so the LLM gets called for a text reply
|
conversational: 1, // Must be at least 1 so the LLM gets called for a text reply
|
||||||
// Investigative questions ("is the auth connected?", "what's the test user?")
|
// With the Verification Harness and Anti-Stall Governor now unconditionally enabled,
|
||||||
// routinely need to read several files THEN synthesize an answer. Budgets of
|
// we no longer need to rely on artificially tight tool budgets to prevent infinite loops.
|
||||||
// 5/8 were cutting these off at the cap before the model could answer
|
// The system will intelligently halt if it detects a stall or unfixable error, so we can
|
||||||
// (telemetry showed 100% round_cap on these turns). Raised so a read-only
|
// safely give the AI a massive runway to complete complex tasks.
|
||||||
// investigation can actually finish.
|
status_check: 40,
|
||||||
status_check: 16,
|
diagnose: 60,
|
||||||
diagnose: 22,
|
small_fix: 40,
|
||||||
small_fix: 18,
|
feature_build: 80,
|
||||||
feature_build: 40,
|
deploy: 40,
|
||||||
deploy: 25,
|
|
||||||
autonomous: 150,
|
autonomous: 150,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1507,13 +1506,7 @@ export async function POST(request: Request) {
|
|||||||
const mutated = assistantToolCalls.some((tc) =>
|
const mutated = assistantToolCalls.some((tc) =>
|
||||||
MUTATION_TOOLS.includes(tc.name),
|
MUTATION_TOOLS.includes(tc.name),
|
||||||
);
|
);
|
||||||
if (
|
if (!aborted && mutated && activeProject?.id && activeMcpToken) {
|
||||||
|
|
||||||
!aborted &&
|
|
||||||
mutated &&
|
|
||||||
activeProject?.id &&
|
|
||||||
activeMcpToken
|
|
||||||
) {
|
|
||||||
emit({ type: "phase", phase: "verify", label: "Verifying & fixing" });
|
emit({ type: "phase", phase: "verify", label: "Verifying & fixing" });
|
||||||
const previewUrl = extractPreviewUrl(messages);
|
const previewUrl = extractPreviewUrl(messages);
|
||||||
const verifyExec: ToolExecutor = async (name, args) =>
|
const verifyExec: ToolExecutor = async (name, args) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user