-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug
OpenClaw's error pattern matching in pi-embedded-helpers scans assistant response text for billing-related keywords and incorrectly flags legitimate responses as billing errors.
Trigger Patterns
The ERROR_PATTERNS.billing check matches against:
- Exact strings:
"payment required","insufficient credits","credit balance","plans & billing" - Regex:
/\b402\b/ - Combo:
"billing"+ any of"upgrade","credits","payment","plan"
Reproduction
- Ask the agent to list issues from a project tracker (e.g. Linear) where issue titles contain phrases like "Show Credit Balance" or "only allow some models for some billing plans"
- The assistant's response contains these phrases in the issue titles
isBillingErrorMessage()matches on the assistant text and replaces the entire response with: "⚠️ API provider returned a billing error — your API key has run out of credits or has an insufficient balance..."
Expected Behavior
The billing error detection should only apply to API error responses, not to the assistant's generated content. The assistant's reply text should never be scanned for these patterns.
Suggested Fix
Scope isBillingErrorMessage() to only check actual API/provider error payloads rather than scanning the full assistant message text.
Environment
- OpenClaw 2026.2.6-3
- Channel: Slack
- Model: claude-opus-4-6
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working