Reduce batch size to 10 and tighten AI price check prompt
Still seeing stubs despite MaxTokens=8192 — smaller batches and explicit word limits in the prompt eliminate any remaining truncation risk. - BatchSize: 15 → 10 (~1200 output tokens per batch vs. potential 3000+) - Prompt: added 20-word cap on assumptions, 25-word cap on reasoning - Prompt: strengthened "nothing before or after the '['" instruction - Error log: now includes item IDs and first 300 chars of raw response so the next failure tells us exactly what Claude returned - JS timing: updated batch divisor from 25 → 10 to match actual batch size Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,14 +12,14 @@
|
||||
|
||||
// Estimate total seconds based on item count (roughly 12s per batch of 25, min 15s).
|
||||
function estimateDuration(itemCount) {
|
||||
var batches = Math.max(1, Math.ceil(itemCount / 25));
|
||||
return Math.max(15, batches * 12);
|
||||
var batches = Math.max(1, Math.ceil(itemCount / 10));
|
||||
return Math.max(15, batches * 10);
|
||||
}
|
||||
|
||||
// Messages keyed to approximate progress milestones (0–100).
|
||||
function messageAt(pct, batchCount) {
|
||||
if (pct < 10) return 'Loading catalog items…';
|
||||
if (pct < 20) return 'Sending items to Claude…';
|
||||
if (pct < 20) return 'Sending items for analysis…';
|
||||
if (batchCount <= 1) {
|
||||
if (pct < 75) return 'Analyzing your catalog with AI…';
|
||||
if (pct < 92) return 'Reviewing pricing data…';
|
||||
|
||||
Reference in New Issue
Block a user