Skip to content

[fix] A cross-modality model switch keeps the warm sandbox - #6374

Merged
mmabrouk merged 1 commit into
release/v0.114.4from
fix/model-capabilities-volatile
Aug 31, 2026
Merged

[fix] A cross-modality model switch keeps the warm sandbox#6374
mmabrouk merged 1 commit into
release/v0.114.4from
fix/model-capabilities-volatile

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Context

Cold/warm audit finding 2. Even with the router keying fixed (#6364), switching between a vision model and a text-only model still destroyed the warm sandbox. The request field modelCapabilities (the resolved model's input modalities) sits in the session fingerprint and the harnessSession facet, and it changes with the model. So a cross-modality switch moved two facets, the mixed plan refused the live setModel route, and the runner rebuilt: fresh Daytona Secrets, the substitution race of #6362, about 15 seconds. The Pi catalog splits 249 text-and-image models against 163 text-only ones, so this is ordinary playground use.

The field is per-turn data: only the attachment-delivery chain reads it, from each incoming request, every turn. Nothing bakes it into the sandbox, the daemon, or the harness session.

Changes

Before: a model switch from claude-sonnet-5 (text+image) to a text-only model planned {model: apply-live, harnessSession: reopen-session} and rebuilt.

After: it plans {model: apply-live} and applies live on the running session.

modelCapabilities leaves configFingerprint and the harnessSession facet, with the reason documented in both places, exactly the treatment workflowRevision and isDraft got in step 1. Attachment behavior is unchanged: the chain keeps reading the incoming request's value each turn.

Tests

  • The per-turn-volatile test gains the field (it must move no facet); the old "changes the fingerprint" assertion is reversed, with the reason in the comment.
  • Full runner suite green (157 files / 2579 tests), typecheck clean.

What to QA

  • In the playground on a warm session, switch from a vision-capable model to a text-only model and send. The turn starts fast (no rebuild) and runs on the new model.
  • Regression: attach an image, switch to a text-only model, send. The attachment handling still follows the new model's modalities.

Stacked on #6372.

https://claude.ai/code/session_014s6jqKCsVKsNMmnrJVJkZt

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug labels Aug 30, 2026
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview Aug 31, 2026 3:51pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f1a3b21-fe36-4a87-b700-0855cf8f636d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk

Copy link
Copy Markdown
Member Author

lgtm

@mmabrouk mmabrouk added the lgtm This PR has been approved by a maintainer label Aug 30, 2026
@mmabrouk
mmabrouk force-pushed the fix/live-route-scoped-repair branch from a0755aa to 1deffd7 Compare August 31, 2026 14:56
@mmabrouk
mmabrouk force-pushed the fix/model-capabilities-volatile branch from dae0b25 to 7ca9a58 Compare August 31, 2026 14:56
@mmabrouk
mmabrouk force-pushed the fix/live-route-scoped-repair branch from 1deffd7 to e26c79e Compare August 31, 2026 15:28
@mmabrouk
mmabrouk force-pushed the fix/model-capabilities-volatile branch from 7ca9a58 to d870e9b Compare August 31, 2026 15:28
@mmabrouk
mmabrouk force-pushed the fix/live-route-scoped-repair branch from e26c79e to 8711e25 Compare August 31, 2026 15:44
@mmabrouk
mmabrouk force-pushed the fix/model-capabilities-volatile branch from d870e9b to 8028321 Compare August 31, 2026 15:44
Cold/warm audit finding 2. modelCapabilities is the resolved model's
input modalities: per-turn data the attachment chain reads from each
incoming request, baked into nothing. But it rode the fingerprint and
the harnessSession facet, and it changes WITH the model — so switching
between a vision model and a text-only model moved two facets, the
mixed plan refused the live setModel route, and the switch rebuilt the
warm sandbox (fresh Daytona Secrets, the substitution race, ~15s) for
nothing. The Pi catalog splits 249 text+image vs 163 text-only models,
so this hit ordinary playground use even after #6364.

Same treatment as workflowRevision/isDraft in step 1: out of the hash,
documented in the volatile list, pinned in both directions (the
per-turn-volatile test gains the field; the old changes-the-fingerprint
test is reversed with the reason).

Claude-Session: https://claude.ai/code/session_014s6jqKCsVKsNMmnrJVJkZt
@mmabrouk
mmabrouk force-pushed the fix/live-route-scoped-repair branch from 8711e25 to 4b9a592 Compare August 31, 2026 15:49
@mmabrouk
mmabrouk force-pushed the fix/model-capabilities-volatile branch from 8028321 to 63cd56e Compare August 31, 2026 15:49
@mmabrouk
mmabrouk changed the base branch from fix/live-route-scoped-repair to release/v0.114.4 August 31, 2026 16:36
@mmabrouk
mmabrouk merged commit 683f9fb into release/v0.114.4 Aug 31, 2026
43 of 44 checks passed
@mmabrouk mmabrouk mentioned this pull request Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant