FlowiseAI/Flowise · error · Error

Input Type must be selected for Cohere models.

Error message

Input Type must be selected for Cohere models.

What it means

init() guard: Cohere embedding models on Bedrock (modelId starting with 'cohere') require an input_type (search_document/search_query/classification/clustering) in the request body. Without it Bedrock rejects the call, so the node fails fast.

Source

Thrown at packages/components/nodes/embeddings/AWSBedrockEmbedding/AWSBedrockEmbedding.ts:136

        async listModels(): Promise<INodeOptionsValue[]> {
            return await getModels(MODEL_TYPE.EMBEDDING, 'AWSBedrockEmbeddings')
        },
        async listRegions(): Promise<INodeOptionsValue[]> {
            return await getRegions(MODEL_TYPE.EMBEDDING, 'AWSBedrockEmbeddings')
        }
    }

    async init(nodeData: INodeData, _: string, options: ICommonObject): Promise<any> {
        const iRegion = nodeData.inputs?.region as string
        const iModel = nodeData.inputs?.model as string
        const customModel = nodeData.inputs?.customModel as string
        const inputType = nodeData.inputs?.inputType as string
        const endpointHost = (nodeData.inputs?.endpointHost as string)?.trim()
        const effectiveModel = customModel || iModel
        if (!effectiveModel) throw new Error('Model ID is required')

        if (effectiveModel.startsWith('cohere') && !inputType) {
            throw new Error('Input Type must be selected for Cohere models.')
        }

        const obj: BedrockEmbeddingsParams = {
            model: effectiveModel,
            region: iRegion
        }

        /**
         * Long-term credentials specified in embedding configuration are optional.
         * Bedrock's credential provider falls back to the AWS SDK to fetch
         * credentials from the running environment.
         * Supports STS AssumeRole when a Role ARN is configured in the credential.
         */
        const credentialConfig = await getAWSCredentialConfig(nodeData, options, iRegion)
        if (credentialConfig.credentials) {
            obj.credentials = credentialConfig.credentials
        }

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Select an Input Type in the node UI when using a Cohere embed model.
  2. Default to 'search_document' for indexing workloads if unspecified.
  3. Validate model+inputType together at the editor layer.
  4. When migrating from Titan, re-configure the inputType field explicitly.

Example fix

// before
if (effectiveModel.startsWith('cohere') && !inputType) {
    throw new Error('Input Type must be selected for Cohere models.')
}

// after
const effectiveInputType = effectiveModel.startsWith('cohere') ? (inputType || 'search_document') : inputType
if (effectiveModel.startsWith('cohere') && !effectiveInputType) {
    throw new Error('Input Type must be selected for Cohere models.')
}
Defensive patterns

Strategy: validation

Validate before calling

const COHERE_INPUT_TYPES = ['search_document', 'search_query', 'classification', 'clustering'] as const
if (effectiveModel.startsWith('cohere')) {
    const t = COHERE_INPUT_TYPES.includes(inputType) ? inputType : 'search_document'
    // use t in the request body
}

Type guard

type CohereInputType = 'search_document' | 'search_query' | 'classification' | 'clustering'
function isCohereInputType(v: unknown): v is CohereInputType {
    return ['search_document', 'search_query', 'classification', 'clustering'].includes(v as string)
}

Prevention

When it happens

Trigger: effectiveModel is a Cohere embed model (e.g. cohere.embed-english-v3) and nodeData.inputs.inputType is empty/undefined.

Common situations: Switching from Titan to Cohere without re-selecting inputType, a flow import that dropped the inputType field, or UI conditionally hiding inputType until model change.

Related errors


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