Repository navigation
fix: show quota auth expired message for Kiro social auth accounts (closes #588) - #620
Merged
decolua merged 2 commits intoApr 17, 2026
Conversation
idbara
pushed a commit
to idbara/9router
that referenced
this pull request
Apr 23, 2026
…loses decolua#588) (decolua#620) * fix: add multi-model support for Factory Droid CLI tool (closes decolua#521) * fix: show quota auth expired message for Kiro social auth accounts (closes decolua#588)
luckystart79-lang
pushed a commit
to luckystart79-lang/minirouter
that referenced
this pull request
May 2, 2026
…loses decolua#588) (decolua#620) * fix: add multi-model support for Factory Droid CLI tool (closes decolua#521) * fix: show quota auth expired message for Kiro social auth accounts (closes decolua#588)
caothu159
pushed a commit
to diepxuan/9router
that referenced
this pull request
May 14, 2026
…loses decolua#588) (decolua#620) * fix: add multi-model support for Factory Droid CLI tool (closes decolua#521) * fix: show quota auth expired message for Kiro social auth accounts (closes decolua#588)
7 tasks done
diegosouzapw
pushed a commit
to diegosouzapw/OmniRoute
that referenced
this pull request
Jun 21, 2026
…ccounts
A Kiro connection added via /api/oauth/kiro/social-exchange (Google or
GitHub social-login device flow) carries a token format that AWS
CodeWhisperer's GetUsageLimits API routinely rejects with 401/403 even
when /messages still works. The quota card was throwing the raw upstream
error blob ("Failed to fetch Kiro usage: Kiro API error (401): {...}"),
which is noisy and unhelpful.
getKiroUsage now detects the social-auth carveout from providerSpecificData
({ authMethod: "imported", provider: "Google" | "Github" } — exactly what
social-exchange/route.ts persists) and returns the same friendly
"Kiro quota API authentication expired. Chat may still work." message
that legacy social-auth users already see. Builder-ID / IDC / kiro-cli
imports keep the existing throw-on-failure behavior so transient upstream
errors don't get silently masked.
TDD: kiro-iam-profilearn-usage.test.ts gets two new cases — the social-auth
path resolves to the friendly message (RED before the fix), and the
non-social Builder-ID path still throws on 401/403 (guards against the
fix overreaching).
Inspired-by: decolua/9router#620
Co-authored-by: Anurag Saxena <anuragg.saxenaa@gmail.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
When adding a new Kiro account via Google/GitHub social auth, the usage page showed a generic message instead of the specific auth expired message.
Root Cause
getKiroUsage handled authMethod idc specifically but had no specific handling for Google/GitHub social auth. Both trigger sawAuthError but social auth fell through to the generic fallback.
Fix
Added a specific condition for social auth authMethod google or github that returns the same message users with old accounts see: Kiro quota API authentication expired. Chat may still work.
Closes #588