Tag gemini-2.5-pro as reasoning-class#28
Merged
Conversation
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
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:
Future-proof: prefix is `"gemini-2.5-pro"` so a hypothetical `gemini-1.5-flash` or `gemini-2.0-flash` variant correctly falls through to the non-reasoning ceilings.
No API call change — `generationConfig.temperature` + `maxOutputTokens` are both accepted by gemini-2.5-pro.
Test plan
🤖 Generated with Claude Code