Summary
Add a non-destructive model-switch escape hatch that creates a new conversation branch containing portable textual context while excluding incompatible native attachments from that branch's active provider projection.
This builds on the target-context projection introduced by #76. It must not mutate or delete the original branch, its messages, or its attachment registry.
Motivation
When every attachment in a conversation is incompatible with the requested model, merely suspending all files can make the remaining conversation misleading, while /new discards useful textual discussion. Users need a middle path:
Keep current model
Branch without files
Start a blank chat
Required semantics
- Fork from the current session position using Pi's existing branch/session machinery.
- Preserve portable text, tool history and summaries that remain meaningful without the native inputs.
- Establish an explicit compatibility boundary in the new branch.
- Exclude selected incompatible attachment/native-state identities from the new branch's active projection.
- Preserve the original branch unchanged and navigable.
- Never synthesize a file summary, conversion or placeholder claiming the target model saw the file.
- Make exclusions visible in branch metadata,
/files, exports and SDK/RPC results.
UX
Offer Branch without files when a model-switch portability report finds all attachments incompatible, and optionally for partial incompatibility.
Before committing, show:
New branch for Azure OpenAI / gpt-5
Preserved
✓ conversation text
✓ results.xlsx
Excluded from this branch context
✗ demo.mp4 — video input unsupported
The user can confirm or cancel. Switching back to the original branch restores its original model/context state.
Non-goals
Acceptance criteria
Dependency
Depends on #76.
Summary
Add a non-destructive model-switch escape hatch that creates a new conversation branch containing portable textual context while excluding incompatible native attachments from that branch's active provider projection.
This builds on the target-context projection introduced by #76. It must not mutate or delete the original branch, its messages, or its attachment registry.
Motivation
When every attachment in a conversation is incompatible with the requested model, merely suspending all files can make the remaining conversation misleading, while
/newdiscards useful textual discussion. Users need a middle path:Required semantics
/files, exports and SDK/RPC results.UX
Offer
Branch without fileswhen a model-switch portability report finds all attachments incompatible, and optionally for partial incompatibility.Before committing, show:
The user can confirm or cancel. Switching back to the original branch restores its original model/context state.
Non-goals
/new.Acceptance criteria
/files, JSON/HTML export and SDK/RPC inspection expose the branch exclusions.Dependency
Depends on #76.