Skip to content

v1.0.15

Choose a tag to compare

@sergebulaev sergebulaev released this 20 Aug 19:58
· 10 commits to main since this release

Code-review fixes (Pixfaro layer)

Independent review (Codex + agent) — all findings resolved:

  • Reuse one PixfaroClient — the wrappers built a fresh client per call, so the 6h LRU cache never hit and every illustrate/refine re-billed. Now a shared client persists the cache + HTTP session.
  • Credential-keyed — the shared client rebuilds if PIXFARO_TOKEN changes at runtime (no billing the old account / serving its cached images).
  • Robust retryPixfaroError.status_code drives retry classification instead of substring-matching the error body.
  • requests.Session — connection reuse across retries.
  • Cost-guard flag — results carry premium: true when a premium-priced model was used.

No API/behavior change for callers. Verified live (cache-hit confirmed) + codex review clean.