/**
 * Alibaba Cloud Model Studio Node - Version 1
 * Discriminator: resource=image, operation=analyze
 */


interface Credentials {
  alibabaCloudApi: CredentialReference;
}

/** Take in images and answer questions about them */
export type LcAlibabaCloudV1ImageAnalyzeParams = {
  resource: 'image';
  operation: 'analyze';
/**
 * The model to use for image analysis
 * @default qwen3-vl-flash
 */
    modelId?: 'qwen3-vl-flash' | 'qwen3-vl-plus' | Expression<string>;
/**
 * How to provide the image for analysis
 * @default url
 */
    inputType?: 'url' | 'binary' | Expression<string>;
/**
 * The URL of the image to analyze
 * @displayOptions.show { inputType: ["url"] }
 */
    imageUrl: string | Expression<string>;
/**
 * Input Data Field Name
 * @hint The name of the input field containing the binary file data to be processed
 * @displayOptions.show { inputType: ["binary"] }
 * @default data
 */
    binaryPropertyName?: string | Expression<string>;
/**
 * The question or instruction about the image
 */
    question: string | Expression<string>;
/**
 * Whether to return a simplified version of the response instead of the raw data
 * @default true
 */
    simplify?: boolean | Expression<boolean>;
/**
 * Options
 * @default {}
 */
    visionOptions?: {
    /** Controls randomness in the output. Lower values make output more focused and deterministic.
     * @default 1
     */
    temperature?: number | Expression<number>;
    /** Maximum number of tokens to generate
     * @default 2000
     */
    maxTokens?: number | Expression<number>;
  };
};

export interface LcAlibabaCloudV1ImageAnalyzeSubnodeConfig {
  tools?: ToolInstance[];
}

export type LcAlibabaCloudV1ImageAnalyzeNode = {
  type: '@n8n/n8n-nodes-langchain.alibabaCloud';
  version: 1;
  credentials?: Credentials;
  isTrigger: true;
  config: NodeConfig<LcAlibabaCloudV1ImageAnalyzeParams> & { subnodes?: LcAlibabaCloudV1ImageAnalyzeSubnodeConfig };
};