Skip to content

Pi keeps using previous model after model picker change until /compact #2160

Description

@iamhenry

Summary

In a Pi thread, changing the model in BB did not change the model Pi actually used. BB recorded GPT or Claude for new turns, but Pi continued sending requests to the previous Grok model until manual compaction; the next response then used GPT as selected.

Versions and environment

  • bb 0.39.1-nightly.32358956903.1 (packaged macOS app)
  • macOS 15.6.1
  • Built-in Pi provider with bundled Pi 0.84.0

Steps to reproduce

  1. Start a Pi thread with an xAI/Grok model.

  2. After the turn finishes, select an OpenAI/Codex model in BB's model picker.

  3. Send several normal new-turn prompts.

  4. Inspect only assistant metadata in the Pi bridge session:

    jq -r 'select(.type == "message" and .message.role == "assistant") | [.timestamp, .message.provider, .message.model] | @tsv' ~/.bb/pi-bridge-sessions/<thread-id>.jsonl | tail
  5. Run /compact, then send another prompt and inspect the metadata again.

Expected vs actual

Expected: turns after the picker change use the selected OpenAI/Codex model.
Actual: BB recorded openai-codex/gpt-5.6-sol for multiple new turns, while Pi assistant records remained xai/grok-4.6. Immediately after /compact, Pi assistant records changed to openai-codex/gpt-5.6-sol.

Evidence

  • BB client/turn/requested events repeatedly recorded the newly selected model.
  • The Pi session had only the initial Grok model_change; actual assistant messages remained Grok across later new turns.
  • Manual compaction was the synchronization boundary. The compaction itself appears to have used the stale Grok model, so it may also consume unintended quota.
  • No prompts, credentials, account data, local paths, or private thread IDs are included here.

What you ruled out

Suggested priority: High — users can unknowingly consume the wrong provider's quota. Starting a new thread is the safest workaround.

AGENT GENERATED: by GPT-5.6 Sol. Investigation report available from the reporter without private conversation content.

Metadata

Metadata

Assignees

Labels

confirmed-reproBug reproduced independently; see linked reportprovider-acpBuilt-in plugin: provider-acpprovider-piBuilt-in plugin: provider-piprovidersCross-provider bridges, models, login

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions