Add per-chat model selection #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Let users change the model for an individual chat: pick at chat creation, and switch it mid-session from the composer. This is distinct from the global default (see the Settings feature) — it overrides only that one session.
API surface (verified against Hermes 0.20.0)
session.createacceptsmodel(+ optionalprovider) as a pinned per-session override — never a global write. The response'sinfo.model/info.providerecho it back. Also supportsreasoning_effortandfast.config.setwith{ "key": "model", "value": "<model>" or "<model> --provider <slug>", "session_id": "<runtimeSessionID>" }(orslash.exec/model <x>). Session-scoped; deferred to the next turn if a turn is streaming (deferred: true); may returnconfirm_requiredfor expensive models.session.create/session.resumeresult'sinfo.model/info.provider, and from thesession.infoWS event.session.resumedoes NOT accept amodelparam — useconfig.setto change an existing session.Changes
Talaria/Features/Chat/ChatView.swift:ModelPickerViewsheet scoped to the chat.ChatViewModel: addselectedModel/selectedProvider; pass them insession.create; addswitchModel(...)issuingconfig.set; handle thesession.infoevent (currently falls through todefault: breakinhandle()) to read/refresh the live model.session.create/session.resumeresult'sinfoon connect so resumed chats show the correct model.ModelPickerViewfrom the Settings feature.Acceptance criteria
session.create).config.setand applies to the next turn.deferred(streaming) andconfirm_required(expensive) responses are handled.session.info).session.infopayload decode / model extraction.