Skip to content

Make OpenCode custom models and agents clear and selectable #1093

Description

@SawyerHood

Problem

Users cannot tell how BB maps OpenCode models and agents into its execution controls.

BB already discovers ACP session models and applies a selected model with session/set_model. OpenCode custom models should therefore appear under acp-opencode when OpenCode advertises them.

However, several gaps make this flow unclear or incomplete:

  • The BB guide does not explain how to select an OpenCode custom model.
  • The guide does not explain the difference between an OpenCode model and an OpenCode agent.
  • BB parses ACP config options, but it only uses model and thought_level.
  • BB ignores the ACP mode option, which can represent OpenCode agents.
  • The customModels fallback only accepts static provider IDs.
  • That fallback rejects acp-opencode and other dynamic ACP provider IDs.

A user with a custom primary agent, such as an orchestrator, can mistake it for a model. BB gives no useful path for that case.

Current code

  • packages/agent-runtime/src/acp/bridge/model-catalog.ts maps ACP model options.
  • packages/agent-runtime/src/acp/bridge/bridge.ts applies ACP model changes.
  • packages/config/src/bb-app-managed-config.ts limits customModels.providerId to the static provider enum.
  • packages/templates/src/templates/bb-guide-providers.md documents ACP providers, but not this selection flow.

Proposed result

BB should give users one clear OpenCode selection flow.

  • Show all custom models that OpenCode advertises.
  • Let users select a custom OpenCode primary agent when ACP exposes it as a mode.
  • Explain that models and agents are different selections.
  • Add a supported fallback for a custom model that an ACP agent does not advertise.
  • Make the CLI guide show the exact discovery commands.

Example:

bb provider models acp-opencode --environment "$BB_ENVIRONMENT_ID"
bb thread spawn --provider acp-opencode --model <provider/model>

Acceptance criteria

  • A custom OpenCode model appears in the BB model picker.
  • The same model appears in bb provider models acp-opencode.
  • A selected model reaches OpenCode before the first prompt.
  • A custom OpenCode primary agent can be selected when ACP advertises it.
  • The guide explains models, agents, discovery, and fallback behavior.
  • Tests cover custom models, ACP mode selection, and dynamic ACP provider IDs.

Related issues

Issue #365 covers model-list failure recovery. This issue covers discovery and selection.

Issue #1086 covers Pi extension models. This issue covers OpenCode and generic ACP controls.

Activity

  1. added theissue type on Aug 7, 2026
  2. iamhenry commented on Aug 9, 2026

    @iamhenry
    Contributor

    any insight on what the priority for this feature is?

  3. SawyerHood commented on Aug 9, 2026

    @SawyerHood
    CollaboratorAuthor

    it is medium priority right now!

    next week i'm going to round up all of the ACP / Pi / Opencode bugs and try to tackle them

  4. iamhenry commented on Aug 9, 2026

    @iamhenry
    Contributor

    Great thx looking forward to it! I'm hoping that ACP stuff also include the session context window usage. 🙏🏽

  5. added
    opencode
    enhancement
    on Aug 10, 2026
  6. added
    providers
    provider-acp
    and removed
    enhancement
    on Aug 18, 2026
  7. changed the issue type fromtoon Aug 18, 2026
  8. iamhenry commented on Aug 21, 2026

    @iamhenry
    Contributor

    any update on this? would love to have custom agent support for opencode

  9. iamhenry commented on Sep 23, 2026

    @iamhenry
    Contributor

    Gentle bump @SawyerHood

  10. added a commit that references this issue on Oct 10, 2026
    fe1a02d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opencodeprovider-acpproviders

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions