Skip to content

Pi provider misparses slash-containing model IDs #4704

Closed

Description

@tomdale

The Pi provider can misinterpret a slash-containing raw model ID as a provider/model reference. When Pi resolves the same string as a raw model ID under another provider, BB rejects startup because the provider in Pi's reported model differs from the one BB expected.

Versions and environment

  • BB CLI 0.44.0 (desktop app)
  • Pi 0.87.1
  • macOS 26.7
  • BB provider: pi

Steps to reproduce

On a machine where Pi's model catalog includes the raw model ID openai/gpt-6-luna, served by vercel-ai-gateway:

  1. Confirm the catalog entry:
    bb provider models pi --environment "$BB_ENVIRONMENT_ID" --json
  2. Spawn a Pi thread with that raw model ID:
    bb thread spawn \
      --project <project-id> \
      --environment "$BB_ENVIRONMENT_ID" \
      --provider pi \
      --model openai/gpt-6-luna \
      --permission-mode full \
      --prompt 'Reply with exactly: OK' \
      --json
  3. Inspect the created thread:
    bb thread log <thread-id> --all --json

The catalog and model availability are provider/account dependent; use an equivalent slash-containing raw model ID if this exact model is not available.

Expected vs actual

Expected: BB resolves the model reference against Pi's catalog and starts the matching provider/model pair, or returns a clear resolution error.

Actual: startup fails with:

Pi did not start with model "openai/gpt-6-luna" (it chose "vercel-ai-gateway/openai/gpt-6-luna"). Check that the provider is authenticated.

The model ID is the same; the provider differs.

Evidence

Suggested fix

Resolve model references against Pi's catalog deterministically. Prefer an exact canonical provider/model match. Otherwise, allow a unique exact match against the entire raw model ID, including slashes; report ambiguity or no match instead of guessing. Pass the resolved provider and raw model ID to Pi explicitly, retaining BB's strict startup verification.

Add regression tests for canonical references, slash-containing raw IDs, ambiguous raw IDs, direct-route precedence, and cold versus warm catalog behavior.

What you ruled out

  • Using the canonical catalog value vercel-ai-gateway/openai/gpt-6-luna avoids this particular mismatch.
  • #1123 is related but distinct: it covers ambiguous bare model IDs shared by multiple providers. This report concerns a slash-containing raw ID parsed as a provider-qualified reference.

Suggested priority and effort

Medium: a valid raw model ID can fail at startup when it contains a slash. The canonical provider/model value is a workaround. The likely fix is localized to Pi model resolution and regression coverage.

Agent generated but every line reviewed and edited by me.

Activity

  1. added theissue type on Oct 2, 2026
  2. added
    providers
    provider-pi
    confirmed-repro
    on Oct 2, 2026
  3. bb-slop-cop commented on Oct 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    • Classification: Bug · Priority: Medium · Effort: Low. Applied providers, provider-pi, and confirmed-repro.
    • Reproduction and root-cause report: REPRODUCED · confidence: high. Repeated by the same agent in a second clean trusted checkout, using the production bridge with a synthetic catalog; no live account was accessed.
    • Root cause: BB splits a slash-bearing raw ID into a guessed provider/ID pair before catalog resolution. Pi can select the full raw ID under another provider, so strict startup verification rejects the mismatch.
    • Fix: Ready PR #4710 resolves exact catalog references and passes the provider/raw ID explicitly, retaining startup verification. 153 changed text lines across five files.
    • Verification: Raw-ID regression fails before the fix and passes afterward; all 14 regression cases pass. Full Pi suite: 178 passed, one skipped; typecheck, lint, and git diff --check pass.

    AGENT GENERATED

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

    confirmed-reproprovider-piproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions