Widget bundle served compressed, and session spend limits return 402
The <speechify-agent> bundle is now served compressed
GET /v1/widget/agents.js was served uncompressed. It now negotiates
compression like every other text response, cutting the transfer from roughly
676 kB to roughly 190 kB for every visitor of every page carrying the widget.
No embed change is required.
The bundle also now carries X-Content-Type-Options: nosniff and
Cross-Origin-Resource-Policy: cross-origin, so it loads on pages that set
a cross-origin embedder policy.
POST /v1/agents/{agent_id}/sessions returns 402 when a spend limit is reached
Sessions refused because the API key reached its spend cap, or the workspace
reached its spend budget, previously returned 500 internal_error. They now
return 402 with the same codes the other agent endpoints already use, so a
client can tell the three funding states apart and act on them.
spend_cap_exceeded— the authenticating API key hit its own monthly ceiling. Raise the key’s cap.spend_budget_exceeded— the workspace hit its monthly budget. Raise the budget in workspace settings.payment_required— the account is out of credits. Top up the balance.
The endpoint’s documented responses now also list 400 and 429, both of
which it already returned.