Repository navigation
fix(quota): keep Argon out of the Gemini Pro quota group (2.5.1) - #75
Merged
Merged
Conversation
resolveQuotaGroup mapped every non-flash Gemini id to gemini-pro, so a soft quota check for gemini-4-argon-* read the Pro bucket: an exhausted Argon bucket blocked Argon requests, and a real Pro exhaustion could hide behind Argon. Argon now resolves to its own group and the three cached-quota builders store it separately.
Automated verification
typechecktestsbuild |
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.
Mismo fallo que CodeRabbit encontro en el PR #606 del upstream, presente tambien aca.
Problema
resolveQuotaGroupmapea todo Gemini que no sea flash agemini-pro:Con
soft_quota_threshold_percentpor debajo de 100, una peticion a Argon consultaba la cuota de Pro. Un Argon agotado bloqueaba Argon por el motivo equivocado, y un Pro agotado podia quedar oculto detras del numero de Argon.Ademas, ninguno de los tres constructores de
cachedQuotaguardaba Argon: el bucket se descartaba o se plegaba a Pro. El tipoQuotaGroupno lo contemplaba.Cambios
QuotaGroupgana"argon";resolveQuotaGroupresuelve Argon antes de la familia generica.cachedQuotalo almacenan aparte: grupos deretrieveUserQuotaSummary, modelos defetchAvailableModelsy el refresco del adaptador v2 (que ademas ahora tiene su propio minimo y reset para argon).Verificacion
npx tsc --noEmitlimpio.npx vitest run: 44 archivos, 1162 tests (+1), 25 todo.Gemini Models0.75 yGemini 4 Argon0.4,cachedQuota.argonqueda en 0.4 ygemini-proen 0.75.resolveQuotaGroupparagemini-4-argon-high/low.npm run buildydist/regenerado.Nota
Es latente mientras
soft_quota_threshold_percenteste en 100 (desactivado), pero el tipo y la cache ya quedan correctos para cuando se active.