AI 0.2.1: Free models no longer break the endpoint form
AI 0.2.1 fixes the endpoint form. Free OpenRouter models, which report their price as a whole 0, crashed the form when their price was shown. Prices of any shape now display.
The provider dropdown on a new endpoint only lists providers that have an integration set up, instead of always offering OpenRouter even when it had none. When no integration exists at all, the full list is shown. If you switch integrations while models are still loading, the late answer is dropped, so the list cannot fill with another integration’s models.
In the model picker, the chosen model now sits at the top as Current Model, with the same details as the cards in the list below it and a button to clear it.
Full release notes: AI 0.2.1
0.2.1 · 12 May 2026
Fixed
format_price/1no longer crashes on JSON-integer pricing (free-tier0from OpenRouter); coerces viavalue * 1.0before:erlang.float_to_binary/2- Provider dropdown on
/admin/ai/endpoints/newno longer surfaces the mount-default"openrouter"as a dead-end option when the operator has no OpenRouter integration configured
Added
- Stale-fetch guard on
:fetch_models— if the operator switches integrations between Task scheduling and message delivery, the response is dropped instead of repopulating models for the wrong integration
Changed
- Quality sweep: 7 of 12 pre-existing credo findings closed (two
cond→if/elseconversions, five nested-module alias suggestions in tests) plus one dialyzer dead-pattern clause removed
AI 0.2.1. Install or update: {:phoenix_kit_ai, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.