Add default model selection to Settings #1

Open
opened 2026-08-12 16:55:04 +00:00 by hermes · 0 comments
Owner

Summary

Let users pick the Hermes default model from the app's Settings tab. This sets the dashboard's global default model — the same thing the dashboard's own Models page does — and applies to all new sessions across clients. Running chats are untouched.

API surface (verified against Hermes 0.20.0)

  • GET /api/model/options → { "providers": [{ "slug", "name", "models": [...], "total_models", "authenticated" }], "model", "provider" } — the picker inventory. Cookie-authenticated, same as the rest of the dashboard.
  • GET /api/model/info → { "model", "provider", "auto_context_length", "config_context_length", "effective_context_length", "capabilities" } — the current default.
  • POST /api/model/set body { "scope": "main", "provider": "<slug>", "model": "<model>", "confirm_expensive_model": false } — writes model.default / model.provider. Applies to NEW sessions only. May return { "ok": false, "confirm_required": true, "confirm_message": "..." } for expensive models; re-send with confirm_expensive_model: true to proceed.

Changes

  • Talaria/Models/DashboardModels.swift: add ModelOptions, ProviderOption, DashboardModelInfo Codable structs (snake_case keys mapped via CodingKeys, e.g. total_models).
  • Talaria/Services/DashboardClient.swift: add modelOptions(), modelInfo(), setModel(provider:model:confirmExpensive:).
  • Talaria/App/AppModel.swift: expose the current default model/provider, loaded from modelInfo() on connect and refreshed after a change.
  • New Talaria/Features/Settings/ModelPickerView.swift: provider → models grouped list, current selection checked.
  • Talaria/Features/Settings/SettingsView.swift: add a "Model" section showing the current provider / model with a link to the picker.

Acceptance criteria

  • Settings shows the current default model (provider + model).
  • Picker lists providers and their models from /api/model/options.
  • Selecting a model POSTs /api/model/set (scope main) and reflects the change.
  • An expensive-model confirm_required response surfaces a confirmation before re-sending.
  • New chats started afterwards use the chosen default (verified via session.create's info.model).
  • Unit test for decoding the model/options payload.
## Summary Let users pick the Hermes default model from the app's Settings tab. This sets the dashboard's **global default model** — the same thing the dashboard's own Models page does — and applies to all *new* sessions across clients. Running chats are untouched. ## API surface (verified against Hermes 0.20.0) - `GET /api/model/options` → `{ "providers": [{ "slug", "name", "models": [...], "total_models", "authenticated" }], "model", "provider" }` — the picker inventory. Cookie-authenticated, same as the rest of the dashboard. - `GET /api/model/info` → `{ "model", "provider", "auto_context_length", "config_context_length", "effective_context_length", "capabilities" }` — the current default. - `POST /api/model/set` body `{ "scope": "main", "provider": "<slug>", "model": "<model>", "confirm_expensive_model": false }` — writes `model.default` / `model.provider`. Applies to NEW sessions only. May return `{ "ok": false, "confirm_required": true, "confirm_message": "..." }` for expensive models; re-send with `confirm_expensive_model: true` to proceed. ## Changes - `Talaria/Models/DashboardModels.swift`: add `ModelOptions`, `ProviderOption`, `DashboardModelInfo` Codable structs (snake_case keys mapped via `CodingKeys`, e.g. `total_models`). - `Talaria/Services/DashboardClient.swift`: add `modelOptions()`, `modelInfo()`, `setModel(provider:model:confirmExpensive:)`. - `Talaria/App/AppModel.swift`: expose the current default model/provider, loaded from `modelInfo()` on connect and refreshed after a change. - New `Talaria/Features/Settings/ModelPickerView.swift`: provider → models grouped list, current selection checked. - `Talaria/Features/Settings/SettingsView.swift`: add a "Model" section showing the current `provider / model` with a link to the picker. ## Acceptance criteria - [ ] Settings shows the current default model (provider + model). - [ ] Picker lists providers and their models from `/api/model/options`. - [ ] Selecting a model POSTs `/api/model/set` (scope `main`) and reflects the change. - [ ] An expensive-model `confirm_required` response surfaces a confirmation before re-sending. - [ ] New chats started afterwards use the chosen default (verified via `session.create`'s `info.model`). - [ ] Unit test for decoding the `model/options` payload.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coop/talaria#1
No description provided.