fix: reasoning model does not allow images (#1160)
This commit is contained in:
parent
1de811bdfd
commit
7327c9a18a
1 changed files with 6 additions and 2 deletions
|
|
@ -323,7 +323,7 @@ function PureMultimodalInput({
|
||||||
/>
|
/>
|
||||||
<PromptInputToolbar className="px-3 py-2 !border-t-0 !border-top-0 shadow-none dark:!border-transparent dark:border-0">
|
<PromptInputToolbar className="px-3 py-2 !border-t-0 !border-top-0 shadow-none dark:!border-transparent dark:border-0">
|
||||||
<PromptInputTools className="gap-2">
|
<PromptInputTools className="gap-2">
|
||||||
<AttachmentsButton fileInputRef={fileInputRef} status={status} />
|
<AttachmentsButton fileInputRef={fileInputRef} status={status} selectedModelId={selectedModelId} />
|
||||||
<ModelSelectorCompact selectedModelId={selectedModelId} />
|
<ModelSelectorCompact selectedModelId={selectedModelId} />
|
||||||
</PromptInputTools>
|
</PromptInputTools>
|
||||||
{status === 'submitted' ? (
|
{status === 'submitted' ? (
|
||||||
|
|
@ -360,10 +360,14 @@ export const MultimodalInput = memo(
|
||||||
function PureAttachmentsButton({
|
function PureAttachmentsButton({
|
||||||
fileInputRef,
|
fileInputRef,
|
||||||
status,
|
status,
|
||||||
|
selectedModelId,
|
||||||
}: {
|
}: {
|
||||||
fileInputRef: React.MutableRefObject<HTMLInputElement | null>;
|
fileInputRef: React.MutableRefObject<HTMLInputElement | null>;
|
||||||
status: UseChatHelpers<ChatMessage>['status'];
|
status: UseChatHelpers<ChatMessage>['status'];
|
||||||
|
selectedModelId: string;
|
||||||
}) {
|
}) {
|
||||||
|
const isReasoningModel = selectedModelId === 'chat-model-reasoning';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
data-testid="attachments-button"
|
data-testid="attachments-button"
|
||||||
|
|
@ -372,7 +376,7 @@ function PureAttachmentsButton({
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
fileInputRef.current?.click();
|
fileInputRef.current?.click();
|
||||||
}}
|
}}
|
||||||
disabled={status !== 'ready'}
|
disabled={status !== 'ready' || isReasoningModel}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue