This repository was archived by the owner on Jul 27, 2026. It is now read-only.
[ISSUE-030] Fix voices get 404 on cloned/custom voices — custom-voice fallback - #58
Merged
Merged
Conversation
get_voice queried only the preset endpoint (/v1/voices/{id}), so cloned
voices (/v1/custom-voices/{id}) returned 404 even though edit/delete work
on the same id. Add a narrow 404 detector (_is_not_found_error) and fall
back to client.custom_voices.get_custom_voice, building Voice(type=custom).
Auth/network errors still propagate without a spurious second call; if both
endpoints miss, raise APIError with a clear not-found message.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Senior review: APPROVE. No Critical/High findings. Verified narrow 404 detection (auth/network errors do not trigger fallback, no spurious second call), preset path unchanged. Two non-blocking Low follow-ups recorded. uv run pytest: 163 passed, 1 skipped. ruff clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pillip
added a commit
that referenced
this pull request
Jun 16, 2026
- src/supertone_cli/__init__.py: bump __version__ to 0.2.1
- CHANGELOG.md: cut [0.2.1] - 2026-06-16
- Fixed: usage analytics now converts YYYY-MM-DD to ISO-8601
datetime before calling /v1/usage (ISSUE-029, PR #56)
- Fixed: voices get falls back to the custom-voice endpoint on a
preset 404 so cloned voices resolve (ISSUE-030, PR #58)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #57
Summary
supertone voices get <id>only queried the preset endpoint (/v1/voices/{id}), so cloned/custom voices (/v1/custom-voices/{id}) returned a 404 — even thoughedit/deletework on the same id.This adds a narrow 404 detector (
_is_not_found_error, lazy SDK import) and a fallback inget_voice: on a preset 404, it callsclient.custom_voices.get_custom_voice(voice_id=...)and buildsVoice(..., type="custom")via the existing helpers.Type: preset).Tests
voices geton a custom voice exits 0 showing Type: custom;--format jsonreturnstype: "custom".Track: product | Priority: P1