AI 0.19.1: A request with a missing prompt no longer causes a 500
AI 0.19.1 fixes a crash: logging an AI request that pointed at a prompt that no longer existed raised a database error and answered with a 500, instead of returning an ordinary changeset error.
The request now declares the prompt’s foreign key under both names it can have in the database. Core’s migrations create it under two names on a fresh database and one on an older one, and the check matches whichever exists.
The endpoint form’s inputs also move to daisyUI 5’s field classes. The release builds against PhoenixKit 2.4.0, and the minimum stays at 2.0.
Full release notes: AI 0.19.1
0.19.1 · 14 August 2026
Fixed
-
A request referencing a missing prompt returned a 500 instead of a changeset error.
Request.changeset/2declared noforeign_key_constraintforprompt_uuidat all, so the violation escaped as a rawEcto.ConstraintError. It now declares both names the constraint can carry: core’s v135 adds this foreign key twice under two names, each block guarded only by its own, so a freshly migrated database has both while an older one has onlyphoenix_kit_ai_requests_prompt_uuid_fkey. Ecto matches by name and Postgres reports oneconname, so the name that exists matches and the other is inert — and this stays correct now that core 2.4.0’s V169 converges the pair on the legacy name (#21, #19). -
Three tests had been asserting behaviour this package no longer has, and had been failing since 0.15.0/0.16.0 without blocking a release:
speak/3’s response shape gained:timestampsin 0.16.0; TTScost_centsstopped beingnilin 0.15.0 when it began being estimated fromTtsPricing; and the image-generation override test asked a storedqualitydefault to disappear becausesizewas overridden, which the code never did and never should. Nothing runsmix testautomatically here — neitherprecommitnor CI on push — which is why they sat red.
Changed
- Minimum
phoenix_kitis unchanged at~> 2.0; the lockfile moves to 2.4.0.
AI 0.19.1. Install or update: {:phoenix_kit_ai, "~> 0.19"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.