Repository navigation
Conversation
Contributor
|
Thanks @lemonleks for the PR. This repo approves new contributors before it reviews their PRs, so this PR now closes on its own. That is expected. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to this PR, and explain what it changes and why. A maintainer then adds you to the allow list and can reopen the PR. |
ymichael
added a commit
that referenced
this pull request
Oct 23, 2026
## Human comments ## What was wrong omp and opencode namespace each model ID by the service that runs it, so one model can appear several times under the same name. For example, omp lists `openai/gpt-5.6-terra` (OpenAI API key) and `openai-codex/gpt-5.6-terra` (ChatGPT subscription) as "GPT-5.6 Terra" and "GPT-5.6-Terra". The picker already shows a grey source label from `AvailableModel.routeProviderId`, but nothing in the ACP path set that field, so these rows were indistinguishable. Picking the wrong one fails (for example, an API key with no credits left returns `credit_balance_exhausted`). #2062 reported this and was closed by #5266, but [the follow-up comment](#2062) confirms that the duplicate rows remained. ## What changed - `AcpDialect` gains an optional `presentModel(model)` hook. The bridge applies it to every model in `model/list` results (`packages/provider-bridge-acp/src/bridge/bridge.ts`). - The omp and opencode dialects set `routeProviderId` to the ID's first segment (`openrouter/anthropic/claude-sonnet-5.5` → `openrouter`) and strip that prefix from the name when the agent repeats it (opencode's `openai/GPT-4.1` → `GPT-4.1`). IDs without a `/` are unchanged. Other ACP agents are untouched. - Model IDs are unchanged, so selection, routing and search are unaffected. The picker renders the label the way it already does for Pi, with no app changes. - `routeProviderId` is an existing optional field, so there is no wire change and no `HOST_DAEMON_PROTOCOL_VERSION` bump. `AcpDialect` is part of the plugin SDK (`experimental_registerAcpDialect`), so third-party dialects can use the same hook. The SDK version on main (0.6.75) is already ahead of the published 0.6.73, so no bump is needed. This takes over the problem from #6115 by @lemonleks, who reported it and proposed labelling rows by ID namespace. That PR inferred the label inside the picker. This change has the omp and opencode adapters supply it instead, which avoids doubling opencode's name prefix and lets plugin dialects opt in. ## How you verified - New `bridge.test.ts` case: the omp and opencode dialects label `anthropic/…`, `openrouter/anthropic/…` and `openai/…` models and strip opencode's duplicated prefix. The generic `acp` dialect is left unchanged. - `pnpm exec turbo run typecheck lint test --filter=@bb/provider-bridge-acp`: all checks pass (538 tests). - `pnpm exec turbo run build:types typecheck --filter=@get-bb/plugin-sdk`: passes, and the bundled `AcpDialect` type includes `presentModel`. - Ran the omp dialect over a real omp 17.4.1 catalog (118 models). `openai/gpt-5.6-terra` gets the label `openai`, and `openai-codex/gpt-5.6-terra` gets `openai-codex`. Fixes #2062 > AGENT GENERATED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Model picker rows only displayed a source qualifier when a provider supplied
routeProviderId. ACP catalogs such as OMP can return identical display names for distinct, namespaced model IDs without that metadata. For example,anthropic/claude-sonnet-5-5andopenrouter/anthropic/claude-sonnet-5.5both appeared as “Claude Sonnet 5.5”, leaving users unable to distinguish the routes before selecting one.What changed
routeProviderIdprecedence, nested namespaces such asopenrouter/anthropic, and the existing display of unqualified model IDs.How you verified
pnpm exec turbo run test --filter=@bb/app -- ModelReasoningPicker.test.tsx— 65 tests passed, including the new single-source and search regressions and the existing explicit Pi route qualifier test.pnpm exec turbo run typecheck --filter=@bb/app— passed.sonnet5.5, distinguish Anthropic from OpenRouter, and select the Anthropic row. The initial qualifier change was checked at 1280px and in a 390px touch drawer; the conditional update was checked by filtering the mixed catalog down to OpenRouter models and confirming the qualifier remains. No generation request was sent.