mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
fix(vision-bridge): force bridge for tokenrouter deepseek models (#3946)
Integrated into release/v3.8.27
This commit is contained in:
@@ -17,6 +17,11 @@ const FORCED_VISION_BRIDGE_MODELS = new Set<string>([
|
||||
"opencode-go/qwen3.5-plus",
|
||||
"opencode-zen/deepseek-v4-flash",
|
||||
"opencode-zen/deepseek-v4-pro",
|
||||
// tokenrouter provider: upstream models overstate vision support.
|
||||
// Force Vision Bridge so images are routed through the configured
|
||||
// vision model instead of being passed through to text-only backends.
|
||||
"tokenrouter/deepseek-v4-pro",
|
||||
"tokenrouter/deepseek-v4-flash",
|
||||
]);
|
||||
|
||||
export function isVisionBridgeForcedModel(model: string | null | undefined): boolean {
|
||||
|
||||
@@ -39,6 +39,14 @@ test("isVisionBridgeForcedModel does not blanket-force GPT-family models", () =>
|
||||
assert.strictEqual(isVisionBridgeForcedModel("openai/gpt-4o-mini"), false);
|
||||
});
|
||||
|
||||
test("isVisionBridgeForcedModel forces tokenrouter deepseek models (text-only backend, #3946)", () => {
|
||||
// These route through a Fireworks text-only backend that overstates vision
|
||||
// support at the provider level, so they must be force-bridged or raw image
|
||||
// data leaks to a backend that cannot process it.
|
||||
assert.strictEqual(isVisionBridgeForcedModel("tokenrouter/deepseek-v4-pro"), true);
|
||||
assert.strictEqual(isVisionBridgeForcedModel("tokenrouter/deepseek-v4-flash"), true);
|
||||
});
|
||||
|
||||
test("getVisionBridgeConfig returns defaults when no settings provided", () => {
|
||||
const config = getVisionBridgeConfig({});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user