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