Repository navigation
Conversation
Contributor
|
Thanks for the pull request, @csells. It was closed automatically because it does not meet the requirements below yet. This is an automated check, not a review of the change. Contributor approval. bb reviews pull requests only from approved contributors, and you are not on the list yet. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to your pull request, and explain what it changes and why. A maintainer then adds you to the list and reopens the pull request. See CONTRIBUTING.md for details. |
ymichael
added a commit
that referenced
this pull request
Nov 10, 2026
## Human comments
## What was wrong
Two problems kept new Claude models out of the picker behind Account
Pooler routing:
1. With the pool's `ANTHROPIC_BASE_URL`/`ANTHROPIC_AUTH_TOKEN`, Claude
Code has no claude.ai login. It skips its served model catalog
(`[servedCatalog] off (not_claude_ai_auth)`), and its `initialize`
models are only the ones cached in `~/.claude.json` under an earlier
personal login (here Fable 5.1). No env flag brings the catalog back;
setting either variable alone is enough to get the stale list.
2. The Claude Code bridge parsed `model/list` params as `z.object({})`
and probed with its own process env. It dropped the `envVars` bb sends
with each request, so plugin-contributed settings, the pool's included,
never reached model discovery. A machine whose daemon had no Claude
settings got Claude Code's no-login public catalog, which is why some
pooled machines did show Fable 5.2; others showed the stale list.
## What changed
- **account-pool:** new `GET /claude/v1/models` hub route, forwarded to
Anthropic's `/v1/models` with a pooled account's credentials (the Claude
adapter strips the `claude/` prefix). The pool contributes
`BB_CLAUDE_MODELS_URL` pointing at it, and neutralizes it with the other
routing variables for isolated nested instances. The skill reference
documents it.
- **provider-claude-code:** `model/list` parses params with the
protocol's `modelListParamsSchema` and probes with the same env sessions
use (`buildSessionEnv(envVars)`). The 2-minute memo keeps one entry per
env set. When `BB_CLAUDE_MODELS_URL` is set, the bridge pages through
it, and the pooled accounts' list sets the picker rows: Claude Code's
default first, then the rest newest first, with the efforts from
`capabilities.effort`. Claude Code still supplies the default, its alias
entries (selected-only, for threads saved with `opus`,
`claude-fable-5-1[1m]`, ...), and descriptions for models both lists
share. A 404 (a parent pool without the route) keeps Claude Code's list.
Other failures, or an empty list, fail the listing, so a partial catalog
is never published.
- No server/daemon wire change: `envVars` was already part of
`model/list` params.
Differences from #7389, which has the same core idea: this lets the
accounts' list set the rows instead of appending it after Claude Code's
stale list; keeps the bridge memo (per env) instead of removing it; it
treats a 404 from an older parent pool as "no account catalog" instead
of failing the Claude list; and it leaves out the cross-provider
refresh/polling/SDK/CLI changes.
## How you verified
- New tests:
- Bridge: `model/list` passes each request's `envVars` to the probe and
caches per env. This failed before the parser fix.
- Account list: rows newest first after the default, Claude Code aliases
kept and models outside the account list dropped, pagination, effort
mapping, 404 fallback, and failure on 5xx or an empty list.
- Memo: one entry per env set.
- Pool: the route forwards to upstream `/v1/models` with the account
token. This fails without the prefix strip.
- `pnpm exec turbo run test typecheck
--filter=bb-plugin-provider-claude-code
--filter=bb-plugin-account-pool`: 441 + 394 tests pass. Lint is clean
for both plugins.
- Live, on a `pnpm start:worktree` server on a host with no Claude
login:
- With the parent pool on current main (404 on the new route), the
picker keeps Claude Code's 4 models with no error.
- With a stand-in parent pool that serves the route from Anthropic using
a real pooled OAuth token, the stand-in logged `GET
/claude/v1/models?limit=1000` from the worktree hub, and `bb provider
models claude-code` listed 15 models including `claude-fable-5-2`
(default still Opus 5.5). After the ordering change, the real bridge
against real Claude Code and Anthropic responses lists Opus 5.5
(default), Fable 5.2, Haiku 5.5, Sonnet 5.5, Fable 5.1, then older
models.
- Confirmed directly that Anthropic's `/v1/models` accepts a pooled
subscription OAuth token without the OAuth beta header.
Fixes #7329
🤖 Generated with [Claude Code](https://claude.com/claude-code)
> AGENT GENERATED
---------
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 discovery could disagree with execution and with other BB surfaces. Claude, Pi, and ACP discovery could omit contributed routing credentials; provider-local caches concealed fresh upstream catalogs; Codex read only the first model page. CLI reads could return an old catalog while a background refresh ran, open UI queries did not periodically revalidate, and session catalog events could overwrite shared discovery using an older credential context. Pooled Claude's missing Fable 5.2 in #7329 is one instance of these gaps.
What changed
Review note: GitHub froze this closed PR at its earlier head. The complete current implementation is in this comparison. The fork branch is updated; a maintainer must approve the contributor and reopen the PR before its Files changed view can track that branch.
bb provider models --refresh,--catalog, SDKrefresh: true, and a shared picker Refresh models control. Preserve existing--jsonarray output. Active UI queries revalidate every minute and subscribe to catalog changes; ordinary CLI/SDK reads wait when the catalog is stale. Preserve project routing for previews and refresh.The HTTP API gains an optional query and optional snapshot metadata; existing host-daemon wire fields are unchanged. This uses the existing bridge request contract, so no daemon protocol bump is needed. Includes upstream main
ba05ae88ede3d3eba9e1aedf0713d79339d2d229.New IDs exposed by a provider do not require a BB allowlist update. Upstream runtimes may still cache or bundle their own inventory. Without upstream push, active UI discovery can take the one-minute cache window plus the next one-minute poll and upstream request time; explicit refresh bypasses BB's cache freshness.
How you verified
SHARED_CATALOG_STAGING_OKusingclaude-fable-5-2.Fixes #7329