/
/
/
# What does this implement/fix?
The four bundled AI Radio host personas were only ever written to disk
on a fresh install, so anyone who upgraded never got them and anyone who
deleted one could not get it back. This exposes them over the API as
templates the frontend can offer when adding a host.
Hosts also gain an optional language. Until now both the written script
and the spoken clip followed the server-wide locale, so a Dutch server
could not have an English host.
- Add `ai_radio/hosts/presets/list`, returning each bundled preset as
`{host, sections}` built from the existing preset compiler. Templates
only: it never writes to stored hosts, sections or disk.
- Add an optional per-host `language`; empty means "follow the server
locale", so hosts already on disk keep working unchanged.
- Apply that language to the AI query's locale instruction and to the
TTS engine, both resolved from the host the clip belongs to.
- Leave the existing "engine rejected the language, retry with its
default voice" fallback in place, so it now also covers a host-chosen
language.
**Related issue (if applicable):**
- n/a
**Companion frontend PR:**
https://github.com/music-assistant/frontend/pull/2474
## Types of changes
<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) derives
the label from the ticked box and applies it automatically; the
release-notes generator uses that same label to slot this change
into the next release notes.
-->
- [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix`
- [ ] New feature (non-breaking change which adds functionality) —
`new-feature`
- [x] Enhancement to an existing feature — `enhancement`
- [ ] New music/player/metadata/plugin provider — `new-provider`
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected) — `breaking-change`
- [ ] Refactor (no behaviour change) — `refactor`
- [ ] Documentation only — `documentation`
- [ ] Maintenance / chore — `maintenance`
- [ ] CI / workflow change — `ci`
- [ ] Dependencies bump — `dependencies`
## Checklist
- [x] The code change is tested and works locally.
- [x] `pre-commit run --all-files` passes.
- [x] `pytest` passes, and tests have been added/updated under `tests/`
where applicable.
- [ ] For changes to shared models, the companion PR in
`music-assistant/models` is linked.
- [x] For changes affecting the UI, the companion PR in
`music-assistant/frontend` is linked.
- [x] I have read and complied with the project's [AI
Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md)
for any AI-assisted contributions.
- [ ] I have [raised a PR against the documentation
repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md)
targeting the main or beta branch as appropriate.