fix(chat): avoid false daily usage limit message on 429#2953
fix(chat): avoid false daily usage limit message on 429#2953louis030195 merged 2 commits intoscreenpipe:mainfrom
Conversation
|
Good approach with
They still do Can you update all 6 occurrences to use |
Triage UpdateStatus: In Progress - Needs Additional Work Context: This PR addresses issue #2941 (false daily usage limit message). Review Feedback SummaryBased on @louis030195's comment, the helper is only used in 2 of 6 places that do quota checks. The remaining locations with inline patterns are:
These still have the old Action Required@Flamki - Please update all 6 occurrences to use Recommendation
Triaged by pipe-github-issue-triage |
|
Addressed this review item in commit What changed:
So all quota-check branches now use the shared helpers (no remaining inline Validation:
|
Summary
Fixes a false-positive daily limit wall in Pi chat error handling.
Root Cause
Two error paths in
standalone-chat.tsx(message_start/message_endandagent_end) treated generic HTTP 429 as a daily-limit condition. This mislabeled transient or model rate-limit responses as "daily usage limit reached" for paid-model users.Changes
classifyQuotaError(errorStr)helper to separate:daily:credits_exhausted,daily_limit_exceeded,daily_cost_limit_exceededrate: generic429and rate-limit markersbuildRateLimitMessage(errorStr)helper to keep rate-limit messaging consistent.message_start/message_endandagent_enderror branches to use the classifier.Impact
429now shows a rate-limit message instead of the daily-limit wall.Validation
bunx tsc --noEmit --pretty false(inapps/screenpipe-app-tauri)bun run teststill has existing baseline failures unrelated to this patch (multiplebun:testimport-resolution suites and pre-existing assertion failures intext-overlayanduse-frame-ocr-data).Closes #2941