Uh oh!
There was an error while loading. Please reload this page.
Adaptive batch size, guarded retry, and gpt-oss-20b config fix for enrich step - #455
Adaptive batch size, guarded retry, and gpt-oss-20b config fix for enrich step#455neoneye wants to merge 1 commit into
Conversation
…rich step Fix gpt-oss-20b config: max_tokens 8192→65536, add context_window=131072. The old 8192 truncated JSON output; previous attempts at 128000 left only 3072 input tokens causing BadRequestError. 65536 gives balanced headroom. Add adaptive batch sizing based on context_window (batch_size=2 when context_window < 6000). Add guarded retry: split once (MAX_RETRY_DEPTH=1) within 300s budget, then skip. Persist errors in raw JSON output for offline diagnosis. Report actual batches_succeeded instead of hardcoded 1. Document consequence-echoing, UUID format inconsistency, and max_tokens overflow in OPTIMIZE_INSTRUCTIONS. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
neoneye
commented
Mar 30, 2026
Self-improve iteration — analysis 58Verdict: CONDITIONAL Wins:
Regression — adaptive batch_size=2 fires for wrong models: gpt-oss-20b: 5/5 valid output, but 3/5 plan timeout (600s) Fix needed: Lower |
neoneye
commented
Mar 30, 2026
Closing — adaptive batch_size=2 incorrectly triggers for all OpenRouter models (context_window=3900 fallback). Will rework with SMALL_CONTEXT_THRESHOLD=3000 and explicit context_window for OpenRouter models. |
Summary
max_tokens8192→65536 (balanced: 65536 input headroom), add explicitcontext_window=131072. Previous attempts: 128000 left only 3072 input tokens causing BadRequestErrorbatch_size=2whencontext_window < 6000(probes model metadata, no API call)batches_succeededinstead of hardcoded1Supersedes #453 (num_output bug) and #454 (max_tokens=128000 too high).
Test plan
batch_size=5(context_window=131072 > 6000 threshold)🤖 Generated with Claude Code