Document 202 Accepted for detectVoiceActivity and detectCredits - #120
Document 202 Accepted for detectVoiceActivity and detectCredits#120hammerlabs wants to merge 2 commits into
Conversation
Plex returns `202 Accepted` (text/html body) for these async detection
triggers, but the spec documents only `200`. Speakeasy-generated SDK clients
(e.g. plex-api-client / plexpy) therefore treat the valid 202 as an unexpected
response and raise SDKError, even though the job was accepted and scheduled.
Verified live against PMS 1.43.2.10687-563d026ea — the current latest per
Plex's own updater as of 2026-06-13 (i.e. not an old-version quirk):
PUT /library/metadata/{ids}/voiceActivity -> 202
PUT /library/metadata/{ids}/credits -> 202
Sibling triggers (analyze, intro, addetect, chapterThumbs) return 200 and are
left unchanged. developer.plex.tv shows 200 only because those docs are
rendered from this spec, not from observed server behavior.
Adds a shared `#/components/responses/202` (Accepted) and references it from
the two affected operations alongside the existing 200.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe OpenAPI specification gains a new shared Changes202 Accepted Response Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
PUT /library/metadata/{ids}/voiceActivityandPUT /library/metadata/{ids}/creditsreturn202 Accepted(async — the detection job is scheduled, not completed inline), but the spec documents only200. Speakeasy-generated SDKs (e.g.plex-api-client/ plexpy) therefore treat the valid202as an unexpected response and raiseSDKError, even though the request succeeded:Evidence
Verified live against PMS
1.43.2.10687-563d026ea— the current latest per Plex's own updater (/updater/status), i.e. not an old-version quirk:PUT …/voiceActivity?force=1&manual=1PUT …/credits?force=1&manual=1PUT …/analyze,…/intro,…/addetect,…/chapterThumbsOnly the two endpoints in this PR return 202; the sibling triggers return 200 and are intentionally left alone.
Change
#/components/responses/202(Accepted,text/html) mirroring the existing200.detectVoiceActivityanddetectCreditsalongside the existing200.8 lines added, no other operations touched.
Verification
Regenerated the Python SDK from the patched spec with Speakeasy: the generated method changes from
match_response(http_res, "200", "*")tomatch_response(http_res, ["200", "202"], "*")and a livedetect_voice_activity()call now returns cleanly instead of raising.🤖 Generated with Claude Code
Summary by CodeRabbit
202 Acceptedresponses for credit detection and voice activity detection endpoints, indicating these operations are now documented as asynchronous requests.Greptile Summary
The API specification now documents that credit detection and voice-activity detection may return
202 Acceptedwhile processing continues asynchronously. Both operations retain their existing JSON success response contract.Confidence Score: 5/5
Safe to merge: the resolved specification exposes the intended asynchronous response contract for both operations.
No blocking failure remains.
What T-Rex did
Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile