Skip to content

Commit 5c3038e

Browse files
mpstatonclaude
andcommitted
chore(prompt-runner): crawl web-search budget 8 → 5 — the cost dial turns down
Operator ruling after burning $20 of credits fast: server-side searches bill twice (per-search fee + results injected as input tokens), and the find-the-page + confirm pattern rarely needs more than five. Crawls that would want more are better served by the 🔍 search.fire door (SearXNG free / Exa cheap, zero Anthropic tokens). Still env-overridable via CRAWL_MAX_WEB_SEARCHES. Files changed: - services/prompt-runner/src/crawl.ts Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RW28dw3kQAKXr2ZNefCukE
1 parent e0c7c39 commit 5c3038e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

services/prompt-runner/src/crawl.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ import { buildRequest } from './request';
1717
// the Opus enrichment default. Overridable like CHAT_MODEL.
1818
const CRAWL_MODEL = process.env.CRAWL_MODEL ?? 'claude-sonnet-4-6';
1919
const CRAWL_MAX_TOKENS = Number(process.env.CRAWL_MAX_TOKENS ?? 4096);
20-
// Per-crawl web-search budget — each search bills; 8 is plenty for the
21-
// find-the-page + confirm pattern the crawl prompts describe. Uncapped,
22-
// a crawl of a huge publisher searched open-endedly (see request.ts).
23-
const CRAWL_MAX_WEB_SEARCHES = Number(process.env.CRAWL_MAX_WEB_SEARCHES ?? 8);
20+
// Per-crawl web-search budget — each search bills AND its results come back
21+
// as input tokens, so this cap is the crawl's main cost dial. Dropped 8 → 5
22+
// (operator ruling 2026-07-27, after $20 of credits went fast): the
23+
// find-the-page + confirm pattern rarely needs more, and a crawl that would
24+
// have needed 6+ is usually better served by the 🔍 search.fire door
25+
// (SearXNG/Exa, no Anthropic tokens). Uncapped, a crawl of a huge publisher
26+
// searched open-endedly (see request.ts).
27+
const CRAWL_MAX_WEB_SEARCHES = Number(process.env.CRAWL_MAX_WEB_SEARCHES ?? 5);
2428

2529
export type CrawlTarget = 'links' | 'streams' | 'team';
2630

0 commit comments

Comments
 (0)