fix(image): address review feedback - remove redundant regex and dead code
- Remove redundant /qwen-vl/, /qwen2-vl/, /qwen2\.5-vl/ patterns since /\bvl\b/ already matches these models via word boundaries - Add clarifying comment for the non-OpenRouter provider fallback path, explaining that OpenRouter returns early using isLikelyVisionModel
This commit is contained in:
parent
7f3c2a50e6
commit
8b135f3b45
@ -66,9 +66,6 @@ function isLikelyVisionModel(modelId: string): boolean {
|
||||
/llava/,
|
||||
/llama-3\.2.*vision/,
|
||||
/pixtral/,
|
||||
/qwen-vl/,
|
||||
/qwen2-vl/,
|
||||
/qwen2\.5-vl/,
|
||||
];
|
||||
return visionPatterns.some((pattern) => pattern.test(lower));
|
||||
}
|
||||
@ -337,6 +334,8 @@ export function resolveModelWithRegistry(params: {
|
||||
});
|
||||
}
|
||||
|
||||
// Fallback for non-OpenRouter providers with custom providerConfig or mock models.
|
||||
// OpenRouter returns early above using isLikelyVisionModel heuristic.
|
||||
const configuredModel = providerConfig?.models?.find((candidate) => candidate.id === modelId);
|
||||
const providerHeaders = sanitizeModelHeaders(providerConfig?.headers, {
|
||||
stripSecretRefMarkers: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user