v0.1.9
The release that makes client.models.run work against the live Comfy Router service, with billing-safe retries and typed Router errors.
Highlights
models.run reaches Router's real route. POST {COMFY_ROUTER_BASE_URL}/v2/models/{provider}/{model} with the partner model's own native JSON as the body, returning the provider's payload as-is. The previous envelope-style call answered 404 against the live service. COMFY_ROUTER_BASE_URL (default https://api.comfy.org) selects the Router deployment, separate from COMFY_BASE_URL; the model argument is the canonical {provider}/{model} id, validated locally.
Typed Router errors on every status. A Router error keeps its own error_type bucket regardless of HTTP status, and models.run raises the matching typed exception — except NotEnabled fires on a not-yet-enrolled account, InvalidInput, ModelNotFound, ConcurrencyLimitExceeded, RateLimited and the rest all catch as themselves instead of surfacing as status-derived aliases. The v2 jobs/assets surface decodes exactly as before.
Billing-safe automatic retry. On by default for models.run: a fresh Idempotency-Key per logical call, sent on every attempt, so a retried call is collected rather than billed twice. Connect-phase failures and paced 429s retry; deterministic refusals don't; unknown-outcome failures (5xx, timeouts) only with retry_possibly_in_flight=True. 60-second elapsed budget, jittered backoff, configurable via Comfy(retry=RetryPolicy(...)) or off with NO_RETRY.
Recoverable failures. Every failed-call exception carries .idempotency_key (replay it to collect an already-billed generation: client.models.run(model, arguments, idempotency_key=exc.idempotency_key)) and .request_id (the server's X-Comfy-Request-Id, the id to quote in a support request).
Credential hygiene. Documented key resolution (api_key= then COMFY_API_KEY), a local MissingApiKey instead of a wasted 401 round trip against Comfy Cloud, keys attached to exactly the two configured origins and never a third, and repr() that never renders a credential.
Full detail in CHANGELOG.md.