fix(web): check list add vision_input

This commit is contained in:
zhaoying
2026-04-20 18:39:59 +08:00
parent 10a655772f
commit 2c2ed0ebf3
4 changed files with 16 additions and 2 deletions

View File

@@ -106,6 +106,18 @@ function validateNode(type: string, config: Record<string, any>): CheckError[] {
if (isInvalid) errors.push({ key: specialKey, message: '' })
})
// llm: vision_input required when vision is enabled
if (type === 'llm') {
const vision = get('vision')
if (vision === true || vision === 'true') {
const visionInput = get('vision_input')
console.log('vision', vision, isEmpty(visionInput))
if (isEmpty(visionInput)) {
errors.push({ key: 'llm.vision_input', message: '' })
}
}
}
// http-request body.data (binary) — not a top-level required field, check separately
if (type === 'http-request') {
const body = get('body')