mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
fix(vision-bridge): force bridge for opencode-go/zen models that overstate vision support (#2740)
Integrated into release/v3.8.4
This commit is contained in:
committed by
GitHub
parent
23f52d0b58
commit
e082f7a31c
@@ -3,14 +3,28 @@
|
||||
*/
|
||||
|
||||
const FORCED_VISION_BRIDGE_MODELS = new Set<string>([
|
||||
// Fallback list for models whose metadata is known to overstate native vision support.
|
||||
// opencode-go/opencode-zen providers: synced capabilities overstate vision support
|
||||
// (modalities_input includes "image" from provider catalog), but the actual backend
|
||||
// models used by these providers do not have native vision. Force Vision Bridge to
|
||||
// convert images to text descriptions for these models.
|
||||
"opencode-go/deepseek-v4-flash",
|
||||
"opencode-go/deepseek-v4-pro",
|
||||
"opencode-go/kimi-k2.6",
|
||||
"opencode-go/kimi-k2.5",
|
||||
"opencode-go/glm-5.1",
|
||||
"opencode-go/glm-5",
|
||||
"opencode-go/qwen3.6-plus",
|
||||
"opencode-go/qwen3.5-plus",
|
||||
"opencode-zen/deepseek-v4-flash",
|
||||
"opencode-zen/deepseek-v4-pro",
|
||||
]);
|
||||
|
||||
export function isVisionBridgeForcedModel(model: string | null | undefined): boolean {
|
||||
if (!model) return false;
|
||||
const normalizedModel = (model.includes("/") ? model.split("/").pop() || model : model)
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
const lowerModel = model.trim().toLowerCase();
|
||||
if (FORCED_VISION_BRIDGE_MODELS.has(lowerModel)) return true;
|
||||
// Also check just the model name (after /) for backward compatibility
|
||||
const normalizedModel = lowerModel.includes("/") ? lowerModel.split("/").pop() || lowerModel : lowerModel;
|
||||
return FORCED_VISION_BRIDGE_MODELS.has(normalizedModel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user