Repository navigation
fix(server): text generation no longer falls back to a model that cannot generate text - #40699
Conversation
…not generate text The fallback predicate checked only the provider, so it could pick a model whose snapshot reports supportsTextGeneration: false; it now applies the same model check as the selected instance.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…provider Settings resolution can hand text generation the thread default model when the configured provider is disabled. When that model cannot generate text and no other provider qualifies, the fallback skipped the whole instance and kept the unusable model. It now tries other instances first, then the instance's other models, such as its default text generation model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceConfigured an extension-only Pi model as the thread default, with disabled Codex selected for text generation. Started the same Replay thread with automatic title generation, then ran Thread actions → Regenerate title twice. Real Pi snapshots marked the extension model
Seed script · Identical browser actions · Base runtime transcript · Head runtime transcript Base dispatched to the unsupported extension model and failed. Head completed automatic title generation and both manual regenerations successfully. |
**v0.1.12-nightly.20261122.5085** · 20 changes from 10 contributors - **Reliable image sends.** Messages now wait for images to finish uploading before sending. - **Rich text pasting.** Paste text from Microsoft Word and other rich text apps into the composer instead of attaching an image. - **Provider refresh.** Refresh providers to find newly installed Claude or Codex without restarting the server on macOS and Linux. - **Scheduled task drafts.** Clicking outside the scheduled task editor no longer discards your draft. ### Plus 16 more bug fixes and performance improvements. <details> <summary>Full changelog</summary> ## What's Changed * perf(shared): Windows command lookups reuse PATH listings across requests by @juliusmarminge in pingdotgg/t3code#40634 * fix(mcp): t3_thread_wait no longer has parents poll a task's first run by @navidnadali in pingdotgg/t3code#40633 * fix(server): reveal no longer opens Explorer's default folder for a missing file by @juliusmarminge in pingdotgg/t3code#40637 * fix(server): a steer that missed its turn keeps its place in the queue by @navidnadali in pingdotgg/t3code#40622 * fix(web): wrapped prompt suggestion no longer overlaps the composer toolbar by @juliusmarminge in pingdotgg/t3code#40654 * fix(server): refuse ref switches while a thread works in the shared checkout by @gbrasil720 in pingdotgg/t3code#38271 * fix(server): label speaker notes in OpenDocument attachments by @geezoria in pingdotgg/t3code#38542 * fix(server): folder discovery skips the walk when t3.json ignores the whole project by @juliusmarminge in pingdotgg/t3code#40664 * fix(server): checkpoint repository scopes walk the project folder once per turn by @Sidreyas in pingdotgg/t3code#40671 * fix(server,cursor): preserve inline handoff when a failed Cursor turn drops its prompt by @MIT-Consulting in pingdotgg/t3code#40670 * perf(web): Markdown renders with Words as static islands under one shared tooltip; remark leaves the web app by @juliusmarminge in pingdotgg/t3code#27866 * fix(web): pasting text copied from Word inserts the text instead of an image by @juliusmarminge in pingdotgg/t3code#40686 * fix(web): wait for image uploads before sending by @Yash-Singh1 in pingdotgg/t3code#40672 * fix(server): provider refresh finds CLIs installed after launch on macOS and Linux by @juliusmarminge in pingdotgg/t3code#40693 * fix(mobile): replace undefined text-foreground-subtle token with text-foreground-muted by @MIT-Consulting in pingdotgg/t3code#40676 * fix(antigravity): a long shell command keeps its start, not its last 8,000 characters by @juliusmarminge in pingdotgg/t3code#40702 * fix(server): setup script output no longer ends in half an emoji by @tiliakoos in pingdotgg/t3code#40701 * fix(server): text generation no longer falls back to a model that cannot generate text by @tiliakoos in pingdotgg/t3code#40699 * fix(client-runtime): typing a bare Windows drive lists its folders by @brunobola in pingdotgg/t3code#40682 * fix(web): a click outside the scheduled task editor no longer discards the draft by @Jardo-51 in pingdotgg/t3code#40708 ## New Contributors * @gbrasil720 made their first contribution in pingdotgg/t3code#38271 * @MIT-Consulting made their first contribution in pingdotgg/t3code#40670 * @brunobola made their first contribution in pingdotgg/t3code#40682 **Full Changelog**: pingdotgg/t3code@v0.1.12-nightly.20261122.5071...v0.1.12-nightly.20261122.5085 </details> Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.12-nightly.20261122.5085


Problem
When the selected text generation provider is unusable, the fallback can run a model whose provider snapshot reports
supportsTextGeneration: false. The selected-instance check already treats such a model as unusable; the fallback predicate inTextGeneration.generatechecks only the provider. Pi is a fallback driver and marks models outside its text generation inventory this way (packages/provider-pi/src/server/status.ts).Change
The fallback predicate now applies the same model check as the selected-instance check, so a candidate model that cannot generate text is skipped and the next candidate (for example the same instance's default text generation model) is used. One condition, server only, no contract change.
Scope
A small fix for an obvious bug, so no issue. The gap was recorded as pre-existing in the merged #39870 ("The fallback candidate check uses provider-level text generation capability only and does not reject a candidate whose chosen model reports supportsTextGeneration: false"), raised there by CodeRabbit and left out of that change.
Verification
Added one row,
not installed, fallback model cannot generate text, to the existingtext generation preflighttable inapps/server/src/textGeneration/CodexTextGeneration.test.ts: the primary is not installed and the fallback's thread default model reportssupportsTextGeneration: false.Without the fix,
vp test run src/textGeneration/CodexTextGeneration.test.ts -t preflight: 1 failed, 11 passed. The fallback ran the model that cannot generate text instead of the instance's default:With the fix: that file 35 passed, and
vp test run src/textGeneration/8 files, 113 tests passed.vp run check:changed upstream/main: format, lint, knip, graphql, typecheck (3 packages) and tests (2 files) all pass.Not checked: the running app and a real Pi instance with a model outside its text generation inventory.
Claude Opus 5.5 via T3 Code