Merge pull request #2717 from LiusCraft/feat/deepseek-vision-unsupported-error
feat: add DeepSeek vision unsupported error detection
This commit is contained in:
commit
490d90749c
1 changed files with 7 additions and 0 deletions
|
|
@ -56,5 +56,12 @@ func isVisionUnsupportedError(err error) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeepSeek and other strict providers reject the image_url field at the
|
||||||
|
// JSON schema level with an "unknown variant" error rather than a semantic
|
||||||
|
// "not supported" message.
|
||||||
|
if strings.Contains(msg, "unknown variant") && strings.Contains(msg, "image_url") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue