fix(ai): validate models server-side and fix reasoning detection (#1443)

This commit is contained in:
dancer 2026-03-03 15:56:05 +00:00 committed by GitHub
parent 49ba1d5f14
commit 99cd8699c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 9 deletions

View file

@ -110,13 +110,14 @@ const PurePreviewMessage = ({
if (type === "reasoning") {
const hasContent = part.text?.trim().length > 0;
const isStreaming = "state" in part && part.state === "streaming";
if (hasContent || isStreaming) {
if (hasContent) {
const isStreaming =
"state" in part && part.state === "streaming";
return (
<MessageReasoning
isLoading={isLoading || isStreaming}
key={key}
reasoning={part.text || ""}
reasoning={part.text}
/>
);
}