Repository navigation
0.1.1: align with the current API (token retries, 402 code, realtime limits, types) - #1
Merged
Merged
Conversation
The service spends a short-lived token just before the handler runs, so a 5xx or a dropped connection after that point left it used and the retry came back as 401 token_invalid, hiding the real error. Token clients now retry only 429 and connections that never opened.
The 402 from inside synthesis carries the generic payment_required code next to the insufficient_credits message; prefer the specific one. List every error code the API returns.
Text that would make a task_start or task_continue frame larger than 1 MiB is sent across several task_continue frames, never splitting a character, instead of the service closing the socket with 1009. Deno 2.5+ sends the API key as a header; where it still goes in the deprecated URL parameter, a warning is logged once.
Voice drops metadata and deleted_at and gains created_via_key_prefix; CloneJob drops result. Document num_step 1-32, sample_rate 8000-48000, clone clips of at least 10 s, ref_text up to 4000 characters, and short-lived media URLs.
The deprecation warning for a key in the WebSocket URL now follows logLevel like every other log line, so a client with logging off stays silent.
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
Version 0.1.1 aligns the SDK with the current public API (flam-voice-svc
production, ff9a6ef), following a protocol audit.fin_tok_tokens are spent before the handler runs. A client using a token now retries only 429s and connections that never opened. A 5xx raises the real error instead of a misleading 401token_invalidfrom the retry.code == "insufficient_credits"instead ofpayment_required. The documented list of error codes now covers everything the API returns.task_continueframes. Before, an oversized frame closed the whole socket with 1009.metadata,deleted_atand the job'sresult, which the public API no longer returns. Addedcreated_via_key_prefix.num_stepis 1–32 andsample_rateis 8000–48000.ref_textis at most 4,000 characters.?api_key=on the WebSocket: a one-time warning is logged, unlesslogLevelis"off". Deno 2.5 and later now sends theX-API-Keyheader instead of the URL parameter.Checks
pnpm test: 156 passed (live tests skipped).typecheck,lintandbuildpass.