fix: no token ceiling unless the budget forces one
Removing the caps rather than tuning them. Every number I picked was a number I invented, and 6000 was already tight enough to truncate a real replay article, which is the failure that was called out when the cap first went in. The coordinator now sends no max_tokens at all. The 402 handler supplies one only when openrouter says the budget cannot cover an open ended request, so the ceiling exists exactly when it has to and never otherwise. Verified unbounded is accepted against the live key before making this the default. The caps on the signal, augor, consolidation and graph workers are gone too. They were added to work around an empty account, not because any of them ever produced too much, and unlike the coordinator none of them detect truncation, so an invented ceiling there risked silently corrupting company facts. A budget failure in those is at least loud. The 220 token cap in crawlerClassifier is left alone, it predates this and bounds a genuinely tiny classification. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WnNxwxfXSbeNtjvtz5gayb
This commit is contained in:
@@ -101,10 +101,6 @@ Reply with just the number of the match, or "none" if none apply. No explanation
|
||||
model: llmConfig.cheapModel || llmConfig.llmModel || llmConfig.model,
|
||||
messages: [{ role: "user", content: prompt }],
|
||||
temperature: 0,
|
||||
// Same reason as the coordinator: an unbounded request gets a 402 for reserving
|
||||
// the whole output window. This one only ever replies with a number or "none",
|
||||
// the headroom is for models that think before answering.
|
||||
max_tokens: Math.max(256, Number(process.env.OPEN_ROUTER_GRAPH_MAX_TOKENS) || 2000),
|
||||
});
|
||||
|
||||
if (Date.now() < llmCooldownUntil) return null;
|
||||
|
||||
Reference in New Issue
Block a user