Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,16 +475,16 @@ The class and `.code` (`rate_limit_exceeded`) are identical for both — only
the message tells them apart:

- **Requests per minute** — `Rate limit exceeded: your account allows 60
requests per minute. Rejected requests count toward the limit too, so wait
for the next minute window (up to 60 sec) rather than retrying right away.
To raise your limit, contact info@sonilo.com.` Calls are going out too fast.
The counter runs on a fixed 60-second window, so back off past the window
boundary instead of retrying inside it.
requests per minute. Please retry after 1 minute. To raise your limit,
please contact info@sonilo.com.` Calls are going out too fast. The counter
runs on a fixed 60-second window and rejected requests count toward it too,
so a retry inside the window cannot succeed — a full minute always clears
it, whatever your phase within the window.
- **Concurrent generations** — `Too many concurrent generations: 5 of 5 in
progress. Wait for one to finish before starting another. To raise your
limit, contact info@sonilo.com.` Every generation slot is busy. Waiting
alone frees nothing — retry when one of your own in-flight generations
finishes, not on a timer.
progress. Please wait for one to finish before starting another. To raise
your limit, please contact info@sonilo.com.` Every generation slot is busy.
Waiting alone frees nothing — retry when one of your own in-flight
generations finishes, not on a timer.

The numbers are the account's own limits; `account.services()` reports them
as `rpm_limit` and `concurrency_limit`. Email info@sonilo.com to raise
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "sonilo"
version = "0.11.1"
version = "0.11.2"
description = "Official Python client for the Sonilo API"
readme = "README.md"
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions sonilo-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ That is the one 402 a retry can never fix.
Two separate limits return `HTTP 429`, and they want opposite handling. The CLI prints the API's
own sentence, so the wording says which one you hit:

sonilo: HTTP 429: Rate limit exceeded: your account allows 60 requests per minute. Rejected requests count toward the limit too, so wait for the next minute window (up to 60 sec) rather than retrying right away. To raise your limit, contact info@sonilo.com. (rate_limit_exceeded)
sonilo: HTTP 429: Too many concurrent generations: 5 of 5 in progress. Wait for one to finish before starting another. To raise your limit, contact info@sonilo.com. (rate_limit_exceeded)
sonilo: HTTP 429: Rate limit exceeded: your account allows 60 requests per minute. Please retry after 1 minute. To raise your limit, please contact info@sonilo.com. (rate_limit_exceeded)
sonilo: HTTP 429: Too many concurrent generations: 5 of 5 in progress. Please wait for one to finish before starting another. To raise your limit, please contact info@sonilo.com. (rate_limit_exceeded)

The first means calls are going out too fast. The counter runs on a fixed 60-second window and
rejected calls count toward it too, so wait the window out instead of retrying inside it. The
Expand Down
2 changes: 1 addition & 1 deletion sonilo-cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "sonilo-cli"
version = "0.8.1"
version = "0.8.2"
description = "Command-line interface for the Sonilo API: generate music and sound effects from text or video"
readme = "README.md"
license = "MIT"
Expand Down
9 changes: 4 additions & 5 deletions tests/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,11 @@ def test_429_without_header_has_no_retry_after():
"message",
[
"Rate limit exceeded: your account allows 60 requests per minute. "
"Rejected requests count toward the limit too, so wait for the next "
"minute window (up to 60 sec) rather than retrying right away. "
"To raise your limit, contact info@sonilo.com.",
"Too many concurrent generations: 5 of 5 in progress. Wait for one to "
"finish before starting another. To raise your limit, contact "
"Please retry after 1 minute. To raise your limit, please contact "
"info@sonilo.com.",
"Too many concurrent generations: 5 of 5 in progress. Please wait for "
"one to finish before starting another. To raise your limit, please "
"contact info@sonilo.com.",
],
)
def test_429_carries_the_message_through_verbatim(message):
Expand Down
Loading