Doctor: ElevenLabs probe reports the diagnosed cause and its remedy - #2053
Closed
hjbrandt wants to merge 1 commit into
Closed
Doctor: ElevenLabs probe reports the diagnosed cause and its remedy#2053hjbrandt wants to merge 1 commit into
hjbrandt wants to merge 1 commit into
Conversation
When the ElevenLabs TTS probe failed with quota_exceeded, Doctor printed the generic "set ELEVENLABS_VOICE_ID to an API-permitted voice" fix. The key and voice were fine; the monthly character quota was simply used up. The hint sent the operator to the wrong place. A probe result may now carry its own fixCmd, and probeAll prefers it over the capability's static one. All three diagnosed ElevenLabs causes use it: - quota_exceeded (new branch): detail shows ElevenLabs' own message (quota size, credits remaining); fix points at the plan or the monthly reset. - famous_voice_not_permitted: fix says to pick a premade/cloned voice. - paid_plan_required: fix says to upgrade the plan or pick a premade voice. The error-body parser lives in lib/ElevenLabsError.ts so it can be tested without running the CLI. It handles the 200-char truncation the probe applies to the body (a long message arrives as cut-off JSON) and returns null for non-JSON bodies so the caller falls back to its own wording. Verified on a real quota-exhausted account: bun Doctor.ts --network now prints "ElevenLabs quota exceeded — This request exceeds your quota of 34292. You have 0 credits remaining, ..." with the plan fix beneath it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
|
Ported with credit, adapted: per-probe fixCmd on the result, the quota branch with ElevenLabs' own message, regex inlined instead of a new lib file. Closing, next release. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
When the ElevenLabs TTS probe failed with
quota_exceeded, Doctor printed the generic fix:The key and voice id were fine. The monthly character quota was used up. The hint sent me to the wrong place, and the truncated JSON hid the number that explained it.
What this changes
fixCmd;probeAllprefers it over the capability's static one. Small, general, no behaviour change for probes that don't set it.quota_exceededbranch that shows ElevenLabs' own message and points at the plan or the monthly reset.famous_voice_not_permitted,paid_plan_required) set their own fix too, so the static voice-id hint never appears for a cause it doesn't fix.lib/ElevenLabsError.tsso it is testable without running the CLI. It copes with the 200-char truncation the probe applies (cut-off JSON) and returnsnullfor non-JSON bodies. Four contract tests beside it (bun test LifeOS/install/LIFEOS/TOOLS/lib/ElevenLabsError.test.ts). The install tree ships no tests today, so drop that file if you'd rather keep it that way.After
Real run on a quota-exhausted account:
Offline run (
bun Doctor.tswithout--network) is unchanged.bun build --target=bun Doctor.tscompiles.Related: #1461 (famous-voice 401), #1496 (
paid_plan_required).🤖 Generated with Claude Code
https://claude.ai/code/session_01VDugi9RvNY4JeCfDXKUkMA