Bump confer / triangulate token budgets for OpenAI + Gemini#27
Merged
Conversation
Follow-up to PR #26. Same MAX_TOKENS truncation pattern is hitting triangulate on gpt-5 and both confer + triangulate on gemini-2.5-pro: reasoning tokens count against `max_completion_tokens`, the visible answer gets cut mid-emission. New _PROVIDER_TOKEN_BUDGETS entries (all 6144): - openai.triangulate (was 2048 reasoning-default) - gemini.confer (was 1500 non-reasoning ceiling) - gemini.triangulate (was 1500 non-reasoning ceiling) Notable side-finding (logged as a follow-up, NOT fixed here): gemini-2.5-pro is NOT currently tagged in `PROVIDER_CAPS["gemini"]["reasoning_prefixes"]`, so non-overridden purposes (debate, synth, audit) fall through to the SMALLER non-reasoning ceilings (1500 / 1024 / 768) instead of the reasoning default of 2048. The provider-specific override in this PR short-circuits that for confer + triangulate, but if the user starts hitting caps on gemini debate / synth / audit, the right fix is adding `"reasoning_prefixes": ("gemini-2.5-pro",)` to the gemini PROVIDER_CAPS entry. Out of scope for this PR. Tests: - openai.triangulate = 6144 - gemini.confer = 6144, gemini.triangulate = 6144 - gemini.debate falls through to 1500 (the non-reasoning ceiling, documenting the follow-up gap explicitly) Full suite (38 scripts) passes. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2 tasks
fxspeiser
added a commit
that referenced
this pull request
Jun 1, 2026
Closes the follow-up flagged in PR #27. gemini-2.5-pro burns reasoning tokens just like gpt-5 and claude-opus-4-7 — it should have been in PROVIDER_CAPS["gemini"]["reasoning_prefixes"] from day one. Effects of the tag: - `_is_reasoning_model("gemini", "gemini-2.5-pro")` now returns True. - `_budget_for_purpose` picks the reasoning-class ceilings (2048) for every non-overridden purpose instead of falling through to the smaller non-reasoning ceilings: debate: 1500 -> 2048 synth: 1024 -> 2048 audit: 768 -> 2048 moderator/orchestrate/plan/review/coordinate: already 2048 confer + triangulate keep the PR #27 override at 6144. - Prompt adapters now strip "think step by step" / "think out loud" preambles before sending to gemini-2.5-pro (already shipped in PR #19; matches behavior for the other reasoning families). Future-proof: the prefix is "gemini-2.5-pro" so a hypothetical gemini-1.5-flash / gemini-2.0-flash variant correctly falls through to the non-reasoning ceilings (verified in the test). No change to the Gemini API call itself — `generationConfig.temperature` + `maxOutputTokens` are both accepted by gemini-2.5-pro. Tests (scripts/test_provider_token_budgets.py): - `_is_reasoning_model("gemini", "gemini-2.5-pro")` is True - gemini debate / synth / audit all = 2048 (reasoning default) - gemini confer / triangulate stay = 6144 (PR #27 override) - A hypothetical non-reasoning gemini still falls through correctly Full suite (38 scripts) passes. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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 free
to 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
Follow-up to PR #26. Same MAX_TOKENS truncation pattern is hitting `triangulate` on gpt-5 and both `confer` + `triangulate` on gemini-2.5-pro.
New `_PROVIDER_TOKEN_BUDGETS` entries (all 6144):
Follow-up worth tracking: gemini-2.5-pro is NOT currently tagged in `PROVIDER_CAPS["gemini"]["reasoning_prefixes"]`, so non-overridden purposes (`debate`, `synth`, `audit`) fall through to the smaller non-reasoning ceilings (1500 / 1024 / 768) instead of the 2048 reasoning default. This PR's per-provider override short-circuits that for confer + triangulate, but if cap-hitting shows up on gemini debate/synth/audit, the right fix is adding `"reasoning_prefixes": ("gemini-2.5-pro",)` to the gemini caps entry.
Test plan
🤖 Generated with Claude Code