FlowiseAI/Flowise · error · Error

This model does not support files

Error message

This model does not support files

What it means

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.

Source

Thrown at packages/components/nodes/chatmodels/ChatGoogleGenerativeAI/FlowiseChatGoogleGenerativeAI.ts:199

                            fileUri: block.url
                        }
                    }
                }
            }
            if (block.source_type === 'base64') {
                return {
                    inlineData: {
                        mimeType: block.mime_type ?? '',
                        data: block.data
                    }
                }
            }
            throw new Error(`Unsupported source type: ${block.source_type}`)
        },

        fromStandardFileBlock(block): FileDataPart | InlineDataPart | TextPart {
            if (!isMultimodalModel) {
                throw new Error('This model does not support files')
            }
            if (block.source_type === 'text') {
                return {
                    text: block.text
                }
            }
            if (block.source_type === 'url') {
                const data = parseBase64DataUrl({ dataUrl: block.url })
                if (data) {
                    return {
                        inlineData: {
                            mimeType: data.mime_type,
                            data: data.data
                        }
                    }
                } else {
                    return {
                        fileData: {

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Switch to a multimodal, document-capable Gemini model (e.g., gemini-1.5-pro).
  2. Remove file blocks from the message stream for this node, or extract file text upstream.
  3. Confirm the model identifier maps to a file-capable variant.

Example fix

// before: model='gemini-1.0' + file block -> throws
// after:  model='gemini-1.5-pro' + file block -> supported
Defensive patterns

Strategy: validation

Validate before calling

const MULTIMODAL_PREFIXES = ['gemini-1.5', 'gemini-2', 'gemini-3']
function isMultimodalGemini(model: string): boolean {
  return MULTIMODAL_PREFIXES.some((p) => model.startsWith(p))
}
function hasFileBlock(messages: BaseMessage[]): boolean {
  return messages.some((m) => Array.isArray(m.content) && m.content.some((c) => (c as any).type === 'file'))
}
if (hasFileBlock(messages) && !isMultimodalGemini(model)) {
  throw new Error(`Model ${model} cannot accept files`)
}

Type guard

function hasFile(c: unknown): boolean {
  return typeof c === 'object' && c !== null && (c as any).type === 'file'
}

Try / catch

try {
  await chatModel.invoke(messages)
} catch (e) {
  if (e instanceof Error && e.message === 'This model does not support files') {
    // upgrade model or extract file text upstream
  }
  throw e
}

Prevention

When it happens

Trigger: A standard file content block is passed while isMultimodalModel is false.

Common situations: Text-only Gemini model selected while the chatflow includes file/PDF content.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/bdf06acf532274ea. Report an issue: GitHub.