Skip to content

[ACP] session/new never populates the legacy models field, so clients that don't render config options show no model selector #64042

Open

Description

@guillaume-flambard

What happens

opencode acp (2.3.0) exposes the model only as a session config option (id: "model", category: "model"). The session/new result never includes the models field (currentModelId / availableModels) that ACP still documents as optional initial session state.

Consequence: a client that has not implemented session config options sees no model catalog and renders no model selector. Xcode 27.2 is one. With OpenCode registered as its ACP agent, the agent panel only shows Attachments and Send, so changing model means editing model in the project opencode.json and starting a new conversation. /models does not help: it is a TUI command, not an ACP command, so it is sent as a prompt.

Repro

  1. opencode acp, complete initialize.
  2. Send session/new with {"cwd": "<project>", "mcpServers": []}.
  3. The result has keys sessionId and configOptions only.
{
  "sessionId": "ses_...",
  "configOptions": [
    { "id": "model", "name": "Model", "category": "model", "type": "select",
      "currentValue": "opencode/deepseek-v4.1-flash-free", "options": [ "..." ] },
    { "id": "effort", "name": "Effort", "category": "thought_level", "type": "select", "currentValue": "default", "options": [ "..." ] },
    { "id": "mode", "name": "Session Mode", "category": "mode", "type": "select", "currentValue": "build", "options": [ "..." ] }
  ]
}

What would fix it here

Keep configOptions and also populate models, derived from the model option so the two shapes cannot disagree:

"models": {
  "currentModelId": "opencode-go/deepseek-v4.1-flash",
  "availableModels": [ { "modelId": "opencode-go/deepseek-v4.1-flash", "name": "..." } ]
}

The Session Config Options RFD expects agents to support both fields while clients migrate, and the session setup docs still list initial model state as optional result data.

Notes

  • session/set_config_option with configId: "model" already works and returns the full updated configOptions, so the capability exists; only the legacy discovery shape is missing.
  • If this is deliberate and the compat shape is considered dead, say so and I will take it to the client side instead. Either way the fact worth recording is that a config-options client gets a model list from this server, and a models-only client gets nothing.
  • macOS 27.2.1, OpenCode 2.3.0.

Activity

  1. opencodejr commented on Nov 15, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and the clear repro.

    You're asking opencode acp to also fill in the legacy models field (currentModelId / availableModels) next to configOptions, built from the model option. That way clients that don't render config options yet, such as Xcode 27.2, can still show a model selector.

    What I found: the current behaviour matches the ACP docs. They describe the model, effort and agent as session config options in the responses to session/new, session/load, session/resume and session/fork. In the code, session/new returns the session ID and configOptions only. I didn't find the legacy models field in the ACP code of any V2 release I checked. So I'm treating this as a request to add a compatibility path, not as a regression. The maintainers will consider it, including your question about whether dropping the legacy shape was deliberate.

    Related:

    For now, as you found, the workaround is to set model in opencode.json and start a new conversation.

  2. added
    area/ide-acp
    type/feature
    version/v2
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ide-acpplatform/macostype/featureversion/v2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions