Repository navigation
Fix Vercel personal budget always showing "No personal budget configured" - #4650
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYiF6FrNLHsyqZXK1MeD8t
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYiF6FrNLHsyqZXK1MeD8t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYiF6FrNLHsyqZXK1MeD8t
Preserve the documented native scope ID while accepting the prefixed user IDs reported by affected budget responses. Use the existing Spend label for money. Keep the explicit Team ID and credential-routing contract scoped to this fix. Cover both ID forms and clear the pre-existing TypeSafe line-length failure without changing its error message or runtime behavior. Co-authored-by: sf-jin-ku <jin.ku@sendbird.com>
# Conflicts: # CHANGELOG.md
|
Merged in ceb44d3, thanks @sf-jin-ku for the quick follow-up! Personal budgets now match both the user's native ID and the |
Summary
Bug fix for the Vercel personal AI Gateway budget shipped in v0.78.0 (#4623). With a valid access token, the card always showed "No personal budget configured" even when the user had a budget.
Root cause
GET /v2/userreturns the bare user ID (e.g.gW5f…), but budget rows identify users asusr_<id>. The plugin comparedscopeId === user.id, so it never found the user's own row. The fixtures used the same string on both sides, which hid the mismatch.Fixes
usr_-prefixed user ID. Test fixtures now mirror the real shapes: a bare ID from/v2/userandusr_…in budget rows.defaultTeamIdfrom/v2/user. A configured ID or slug still takes precedence. If neither exists, the refresh fails asmissingCredentialbefore any budget request."spent"catalog key, which translates as an exhausted quota. For example, a normal amount rendered as "할당량 고갈: $8.41" (ko) or "quota épuisé" (fr). It now uses the existing"Spend"key, which every catalog already translates as spend.api_key_missingfrom config validation, and an unconfigured auth result fromcodexbar diagnose vercel.PluginProviderSpecgainsalternateCredentialKey, and Vercel sets it toVERCEL_ACCESS_TOKEN.Testing
mainand passes with this change:/v2/userand/ai-gateway/budgets/listfrom a team using a default member budget. The plugin now reports$8.41 / $50.00, weekly, resetting Monday 00:00 UTC, where v0.78.0 showed "No personal budget configured". That data was used only for a local scratch check and is not committed.swift test --filter 'VercelBudgetPluginTests|VercelProviderSettingsTests|ConfigValidationTests|PluginProviderSpecTests|ProviderSettingsDescriptorTests|UserFacingLocalizationCoverageTests|LocalizationLanguageCatalogTests'→ 184 tests in 7 suites, all passed.make checkpasses, including the locale check.🤖 Generated with Claude Code
https://claude.ai/code/session_01GYiF6FrNLHsyqZXK1MeD8t