{"record":{"id":"bdf06acf532274ea","repo":"FlowiseAI/Flowise","slug":"this-model-does-not-support-files","errorCode":null,"errorMessage":"This model does not support files","messagePattern":"This model does not support files","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/chatmodels/ChatGoogleGenerativeAI/FlowiseChatGoogleGenerativeAI.ts","lineNumber":199,"sourceCode":"                            fileUri: block.url\n                        }\n                    }\n                }\n            }\n            if (block.source_type === 'base64') {\n                return {\n                    inlineData: {\n                        mimeType: block.mime_type ?? '',\n                        data: block.data\n                    }\n                }\n            }\n            throw new Error(`Unsupported source type: ${block.source_type}`)\n        },\n\n        fromStandardFileBlock(block): FileDataPart | InlineDataPart | TextPart {\n            if (!isMultimodalModel) {\n                throw new Error('This model does not support files')\n            }\n            if (block.source_type === 'text') {\n                return {\n                    text: block.text\n                }\n            }\n            if (block.source_type === 'url') {\n                const data = parseBase64DataUrl({ dataUrl: block.url })\n                if (data) {\n                    return {\n                        inlineData: {\n                            mimeType: data.mime_type,\n                            data: data.data\n                        }\n                    }\n                } else {\n                    return {\n                        fileData: {","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/chatmodels/ChatGoogleGenerativeAI/FlowiseChatGoogleGenerativeAI.ts#L181-L217","documentation":"Thrown inside fromStandardFileBlock (line 199) when a file block is converted for a non-multimodal Gemini model. Same isMultimodalModel gate as image/audio; file ingestion requires a multimodal Gemini variant.","triggerScenarios":"A standard file content block is passed while isMultimodalModel is false.","commonSituations":"Text-only Gemini model selected while the chatflow includes file/PDF content.","solutions":["Switch to a multimodal, document-capable Gemini model (e.g., gemini-1.5-pro).","Remove file blocks from the message stream for this node, or extract file text upstream.","Confirm the model identifier maps to a file-capable variant."],"exampleFix":"// before: model='gemini-1.0' + file block -> throws\n// after:  model='gemini-1.5-pro' + file block -> supported","handlingStrategy":"validation","validationCode":"const MULTIMODAL_PREFIXES = ['gemini-1.5', 'gemini-2', 'gemini-3']\nfunction isMultimodalGemini(model: string): boolean {\n  return MULTIMODAL_PREFIXES.some((p) => model.startsWith(p))\n}\nfunction hasFileBlock(messages: BaseMessage[]): boolean {\n  return messages.some((m) => Array.isArray(m.content) && m.content.some((c) => (c as any).type === 'file'))\n}\nif (hasFileBlock(messages) && !isMultimodalGemini(model)) {\n  throw new Error(`Model ${model} cannot accept files`)\n}","typeGuard":"function hasFile(c: unknown): boolean {\n  return typeof c === 'object' && c !== null && (c as any).type === 'file'\n}","tryCatchPattern":"try {\n  await chatModel.invoke(messages)\n} catch (e) {\n  if (e instanceof Error && e.message === 'This model does not support files') {\n    // upgrade model or extract file text upstream\n  }\n  throw e\n}","preventionTips":["Use a multimodal Gemini variant for document/PDF inputs.","Extract plain text from files when targeting text-only models.","Keep the model-capability matrix current."],"tags":["gemini","multimodal","model-selection","files"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}