Uh oh!
There was an error while loading. Please reload this page.
Adaptive batch size, guarded retry, and OpenRouter config fixes for enrich step - #456
Merged
Merged
Conversation
…nrich step Fix all OpenRouter models in baseline.json: add explicit context_window (131072/1048576/128000/40960) so LlamaIndex sees real values instead of its 3900 fallback. Bump gpt-oss-20b max_tokens 8192→65536 (balanced headroom: 65536 input + 65536 output within 131K context). Add adaptive batch sizing: batch_size=2 when context_window < 3000 (threshold below OpenRouter's 3900 fallback to avoid false positives). Add guarded retry: split once (MAX_RETRY_DEPTH=1) within 300s budget, then skip. Persist errors in raw JSON output. Report actual batches_succeeded instead of hardcoded 1. Document consequence-echoing, UUID format inconsistency, max_tokens overflow, and OpenRouter metadata fallback in OPTIMIZE_INSTRUCTIONS. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
neoneye
commented
Mar 30, 2026
MemberAuthor
Self-improve iteration — analysis 59Verdict: CONDITIONAL Wins (all 6 targeted issues resolved):
Remaining issues (not regressions):
No content regressions introduced. |
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
context_windowfor all 4 OpenRouter models (131072/1048576/128000/40960) — LlamaIndex defaults to 3900 for all OpenRouter models without thisbatch_size=2whencontext_window < 3000(threshold below OpenRouter's 3900 fallback to avoid false positives)batches_succeededinstead of hardcoded1Supersedes #453, #454, #455 which each had config or threshold bugs.
Test plan
batch_size=5(no model has context_window < 3000)calls_succeeded=2(ceil(7/5)=2, not 3-4)🤖 Generated with Claude Code