fix(agents): preserve reasoning replay from model metadata

Preserve OpenAI-compatible replay reasoning when the selected custom or self-hosted model already has reasoning metadata enabled.

The transcript policy now treats existing model metadata as the replay contract instead of requiring a new provider config knob, and the OpenAI-compatible serializer preserves reasoning_content for those routes while keeping stock OpenAI, Gemma 4, and known non-replayable OpenRouter safeguards.

Fixes #88068.
Replaces #88071.
This commit is contained in:
Peter Steinberger
2026-05-31 13:41:44 +01:00
committed by GitHub
parent 7a22515972
commit cf315ddef6
6 changed files with 149 additions and 6 deletions

View File

@@ -131,6 +131,8 @@ inter-session user turns that only have provenance metadata.
reasoning fields such as `reasoning` or `reasoning_content`.
- Current same-turn tool-call continuations keep the assistant reasoning block
attached to the tool call until the tool result has been replayed.
- Custom/self-hosted model entries with `reasoning: true` preserve replayed
reasoning metadata.
- Provider-owned exceptions can opt out when their wire protocol requires
replayed reasoning metadata.