Per-user monthly token quotas tracked in DynamoDB; tier field added to user profiles
dropthejase adds DynamoDB-backed per-user credits, a 429 gate in the API, and a tier field surfaced in the account settings sidebar. The credits modal was added and then removed in the same cluster - the enforcement path existed but the UI was never wired end-to-end.
A CreditsTable DynamoDB table (PAY_PER_REQUEST billing) is provisioned in CDK. The agent tracks usage via a Strands AfterModelCallEvent hook. The initial implementation increments a call counter (credits_used :one), but 5af54ad corrects this to accumulate totalTokens from the event's stop data instead. Calls are nearly free; tokens are what cost money. That change from call-count to token-count is the useful detail here - it's the right metering primitive.
The credits modal (CreditsExhaustedModal) is added and rendered in three chat pages, but 5969976 removes it after noting it was never wired. The props (creditsExhausted, creditsResetDate, dismissCreditsModal) are stripped from ChatView and useAssistantChat in the same commit. The enforcement path at the API level (429 on quota exceeded) remains, but the frontend signal to the user is gone. This is a feature that's half-done.
The tier column (text not null default 'Free') is added to user_profiles schema, the GET /user/profile response includes it, and the AppSidebar dropdown now displays "Free Tier" or "Pro Tier" based on the DB value. A content-type header fix (7ccf115) ensures profile PUT requests are parsed correctly, and a stopPropagation call fixes a sidebar dropdown toggle bug found while working in the same area.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?