Skip to content

Desktop: model picker should follow the session model when changed externally #53372

Closed as not planned

Description

@hbassassi-oss

Problem

When two clients share one OpenCode server and session (e.g. the desktop app plus a phone companion through a local gateway), changing the session model via the API (POST /api/session/{id}/model) updates the server-side session model, but the desktop app's model picker keeps displaying - and sending - its own previously selected model. The pickers never converge.

Evidence (verified via the API)

  • POST /api/session/{id} succeeds; subsequent GET /api/session/{id} returns the new model.
  • Messages sent from the desktop window still carry the picker's old model (message.info.model), so turns keep running on it.
  • The picker display never refreshes to the session model: not on change, not on incoming SSE traffic - only when the user picks in it directly (which PATCHes the session model, so UI->server works, server->UI does not).

Why it matters

Any multi-client setup (phone companion, web client, API automation sharing a server) ends up with each client's picker showing a different model, and the desktop silently runs turns on a model the user believes was switched away from. The server already has a single source of truth (session.model); the desktop UI just does not follow it.

Request

Bind the desktop picker's displayed (and sent) model to session.model, refreshing live on the existing session.updated SSE event (or at minimum on window focus / session switch). No new plugin hook needed.

Notes

Activity

  1. added
    needs:compliance
    on Oct 5, 2026
  2. github-actions commented on Oct 5, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Please use the Bug Report template and include the report in its required Description field. The current body uses custom sections and does not include that required field. The existing Problem and Evidence content can be moved into it.

    Please edit this issue to address the above within 72 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  3. github-actions commented on Oct 8, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 72-hour window.

    Feel free to open a new issue that follows our issue templates.

  4. removed
    needs:compliance
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions