mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
feat: add DeepSeek vision unsupported error detection
Add detection for 'unknown variant' + 'image_url' error pattern used by DeepSeek and other strict providers when vision is not supported. These providers reject the image_url field at the JSON schema level rather than returning a semantic 'not supported' message.
This commit is contained in:
@@ -56,5 +56,12 @@ func isVisionUnsupportedError(err error) bool {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user