fix(core): lower failed reasoning to text (#35735)

This commit is contained in:
Kit Langton 2026-07-07 09:49:17 -04:00 committed by GitHub
commit e3a39b214f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View file

@ -120,12 +120,12 @@ const assistant = (message: SessionMessage.Assistant, model: ModelV2.Ref) => {
const content = message.content.flatMap((item): ContentPart[] => {
if (item.type === "text") return [{ type: "text", text: item.text }]
if (item.type === "reasoning")
return sameModel
return reuseProviderMetadata
? [
{
type: "reasoning",
text: item.text,
providerMetadata: reuseProviderMetadata ? providerMetadata(model.providerID, item.state) : undefined,
providerMetadata: providerMetadata(model.providerID, item.state),
},
]
: item.text.length > 0