Repository navigation
Conversation
Pioneer.ai removed the free tier. Before: https://web.archive.org/web/20260516140358/https://pioneer.ai/pricing After: https://pioneer.ai/pricing
Collaborator
|
The |
hummern
force-pushed
the
fix/reka-flash-reasoning-budget
branch
from
September 15, 2026 14:32
ec5a26c to
2fa8787
Compare
Contributor
Author
Contributor
Author
|
Superseded — fix already merged via #13531. |
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
Fixes #13198.
reka-flash-3always runs a reasoning phase, so a caller-set undersizedmax_tokens(e.g.256) is consumed entirely byreasoning_contentand the upstream returns empty content withfinish_reason: length. A transparent OpenAI-compatible proxy forwards that reasoning-only, empty-content response to the client, which can surface as huge garbage output (e.g. Hermes Agent's forwarded reasoning onto Telegram).ensureThinkingBudget()(#6912) already floors undersized budgets for reasoning models, but it only fired when the client explicitly opted into reasoning. reka-flash-3 reasons unconditionally.Change
RegistryModel.alwaysReasons(boolean): true when an upstream always reasons regardless of client opt-in. Set it onreka-flash-3.DefaultExecutor.ensureThinkingBudget()treatsalwaysReasons === trueas implicit reasoning opt-in, so a tiny callermax_tokensgets the 4096 floor.Repro → fixed
Tests
tests/unit/clinepass-thinking-budget.test.ts— 9/9 pass; the newalwaysReasonscases fail without the fix (sabotage-verified).tests/unit/provider-models-config.test.ts— 12/12 pass.tests/unit/provider-models-route.test.ts— 59/59 pass.npx tsc --noEmit -p tsconfig.typecheck-core.json— clean (exit 0).Related
Reviewer note
The two eslint errors in the touched files (
shared.ts:791,default.ts:5) are pre-existing baseline warnings on lines I did not modify, not introduced by this diff.