fix(ai-chat): tell a failed turn from a recovered one, and a model that cannot think from one we cannot read

- `turnFailed` marked a turn failed on any unsuccessful tool row, but a failing
  tool is handed back to the agent, which routinely recovers and answers. That
  put a Retry on turns that succeeded — and retrying re-runs the whole flow,
  side effects included. It now reads the turn's terminal row, and reports
  nothing while the turn is still streaming. `error` on a user row means what it
  means in the copilot: the request never produced an answer.
- The reasoning registry answered `supported: false` for every model on a
  provider family it has no rules for, so `customai` — which fronts any
  OpenAI-compatible endpoint — got "Not supported by this model" stated as a
  fact, its effort input hidden from the modal, and its stored value cleared to
  `''` on every model pick, shadowing the author's schema default for good.
  `ReasoningCapability` now carries `known`, and the composer neither claims
  anything nor touches the value where it cannot read the model.
- `flow-base.md`: a static provider field is not "shown read-only"; the composer
  draws no control for it at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QN7VboDEm9HAB1t4sMxMdE
This commit is contained in:
Guilhem Lemouel
2026-09-11 10:08:02 +02:00
co-authored by Claude Opus 5
parent b40219652f
commit 3678c8b51f
14 changed files with 152 additions and 59 deletions
+3 -2
View File
@@ -5265,8 +5265,9 @@ input, read by the agent.
**Wire the provider field by field, or the chat cannot change its model.** Each \`provider\` field fed
by a flow input becomes a control in the composer a provider picker, a model list, a thinking
slider while a field left static is fixed and shown read-only. \`user_attachments\` works the same
way: point it at an s3-object input and the composer gets a paperclip.
slider while a field left static is fixed, and the composer draws no control for it.
\`user_attachments\` works the same way: point it at an s3-object input and the composer gets a
paperclip.
\`\`\`json
{