Repository navigation
You're out of credits #5127
Copy link
Copy link
Description
hi
today, a new error appeared that I can't get rid of.
the agent refuses to work because it thinks I don't have enough balance, but that's not true.
Moreover, it doesn't even reach the point of using the key, according to the openrouter key statistics.
as you can see, it was used 40 minutes ago, but I just tried to tell it to keep going.
I also recreated the keys without any limits, but it didn't help.
In another agent system, everything works without any errors.
Today, I received another strange error indicating that I exceeded the daily limit of $10, which is not true because I don't have that much money in my balance.
output, 100% error in your application!!!
I'm using the desktop version for Windows 0.63.0
Implementation Plan
Triage Assessment
- Valid bug: User on desktop v0.63.0 (Windows) with OpenRouter BYOK hits
cost budget exceeded: Day spend USD 10.0136 >= limit USD 10.0000. - NOT a duplicate of Managed inference says "out of credits" while the account shows $5.25 in promotional credits #4357 (which was managed promotional credit spendability — different root cause, different code path).
- Contributor
samrusaniidentified the correct root cause (local daily cost-budget enforcement) and has offered to implement pending policy confirmation.
Proposed Scope
- In-scope: Resolve the policy question (should BYOK requests bypass the local daily cost limit?), then either (a) scope enforcement by routing/funding mode so BYOK bypasses the limit, or (b) correct the error message to reflect that the limit applies to BYOK too and surface the applicable budget setting.
- Non-goal: Managed credit balance issues (tracked by other issues).
Implementation Steps
- Policy decision: Confirm whether BYOK requests should bypass the local daily cost limit (
OPENHUMAN_DAILY_SPEND_LIMIT/ local budget enforcement). If yes, scope enforcement to managed routes only. If no, proceed to step 2. - If BYOK should bypass: Trace the spend-tracking path in
src/openhuman/inference/or the budget-checking code. Gate budget enforcement behind a check that the request uses managed routing. Add a unit test. - If BYOK should honor the limit: Update the error message from the misleading managed-credits exhaustion text to a budget-specific message that names the applicable setting. Update
src/openhuman/channels/providers/web_errors.rsif the error comes through that path. - Add regression test covering the chosen behavior.
Verification
cargo test -p openhumanpasses.- Configure OpenRouter BYOK, send chat turns, confirm no budget error until/unless the daily limit applies as intended.
- Configure managed routing, confirm budget enforcement still works as before.
Risks and Open Questions
- The policy question must be resolved by a maintainer before implementation proceeds.
samrusanirequested maintainer confirmation in the issue comments. - The exact file where the daily cost budget is enforced needs to be confirmed — may be in
src/openhuman/inference/or the provider layer.
Acceptance Criteria
- Policy decision documented in the issue (BYOK bypasses or honors local daily budget)
- Implementation matches the policy decision
- Error message is accurate and actionable regardless of the policy choice
- Unit/integration tests cover the new behavior
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
gitmeatarru commentedon Jul 22, 2026
llm settings
samrusani commentedon Jul 22, 2026
I would like to work on this, pending confirmation of the intended budget behavior.
The screenshots show Use Your Own Models with OpenRouter selected, while the underlying error is
model error: limit exceeded: cost budget exceeded: Day spend USD 10.0136 >= limit USD 10.0000. This appears to be OpenHuman local daily cost-budget enforcement, rather than the managed-credit balance described by the chat response.Could a maintainer confirm which contract is intended?
Once that behavior is confirmed, I can prepare the narrow fix with happy-path and failure/edge tests.