You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pi bridge: bare model ids from bb's own spawns fail at thread.start ("Ambiguous Pi model") #1123
A Pi thread spawned with a bare model id (e.g. gpt-5.6-terra) fails at thread.start with:
Ambiguous Pi model "gpt-5.6-terra": served by azure-openai-responses, cloudflare-ai-gateway, github-copilot, openai, openai-codex, opencode. Prefix it with the provider you want.
(or Failed to resolve Pi model "..." on older Pi catalogs). Two aspects of this feel like bugs rather than the documented don't-guess policy:
1. bb itself produces the bare ids
The error is easy to hit without the user ever typing a model name: in our case a Codex parent thread spawned Pi worker threads, and the model id carried over to the spawn was the bare gpt-5.6-terra. Selections stored before #1037 have the same shape. So the "prefix it" advice targets a string the user never wrote.
2. The failure is deferred from spawn to start
bb thread spawn accepts the unresolvable model without complaint; the thread only errors when it is started — in our case days later, inside automation, where the error surfaced as silently dead worker threads. Validating the model against the provider catalog at spawn time (or at least warning) would catch this where the caller can react.
Suggestion: resolve ambiguity via the sole authenticated provider
resolveConfiguredModel in packages/agent-runtime/src/pi/bridge/sdk-session.ts refuses to guess between providers serving the same id, on the (sound) rationale that substituting a vendor would send workspace content and billing somewhere the user never chose. But when exactly one of the matching providers has credentials configured (modelRuntime.hasConfiguredAuth), the others could never serve the request at all — picking the sole authenticated provider sends nothing anywhere the user hasn't already signed in to. In practice this makes bare ids from stored selections and cross-provider spawns Just Work on single-account machines, while genuinely ambiguous cases (two authed providers) still error.
We're running this as a small patch on our fork — happy to send it as a PR if you want it: amadad@c26b696
Activity
Resolve bare Pi models through sole authenticated provider (#1169)
Resolve bare Pi models through sole authenticated provider (get-bb#1169)