fix: treat multimodal image models as image mode
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-03-19 00:40:08 +08:00
parent 7ebfcfd4eb
commit f2f856eec4

View File

@ -2931,6 +2931,7 @@ export function CanvasChatPanel({
model.id !== "auto" &&
model.id !== modelsData?.agentModel?.id &&
model.isMultimodal &&
!model.supportsImageGen &&
!VIDEO_PROVIDER_TYPES.has(model.providerType)
),
[allModels, modelsData?.agentModel?.id]
@ -2945,6 +2946,7 @@ export function CanvasChatPanel({
currentModel &&
currentModel.id !== "auto" &&
currentModel.isMultimodal &&
!currentModel.supportsImageGen &&
!VIDEO_PROVIDER_TYPES.has(currentModel.providerType)
);
const isAgentModel =
@ -3914,6 +3916,7 @@ export function CanvasChatPanel({
requestModel &&
requestModel.id !== "auto" &&
requestModel.isMultimodal &&
!requestModel.supportsImageGen &&
!requestIsVideoModel
);
hiddenPromptRef.current = null;
@ -9978,6 +9981,7 @@ export function CanvasChatPanel({
nextModel &&
nextModel.id !== "auto" &&
nextModel.isMultimodal &&
!nextModel.supportsImageGen &&
!nextIsVideoModel
);
currentModelIdRef.current = value;