MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / resolveLocalVisionModel

Function resolveLocalVisionModel

src/tools/vision/vision-analyze.ts:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68 * fake "I can't see images" reply and the chain falls through to the next backend.
69 */
70export function resolveLocalVisionModel(): string | undefined {
71 const env = process.env.QODEX_LOCAL_VISION_MODEL;
72 if (env) return env;
73 const cfg = getActiveConfig() as any;
74 const r = cfg?.roles?.vision;
75 if (r?.model && r.provider === 'openai') return r.model as string;
76 const primary = cfg?.defaults?.model;
77 if (typeof primary === 'string' && looksVisionCapable(primary)) return primary;
78 return undefined;
79}
80
81/**
82 * Resolve a vision model served by ANY configured OpenAI-compatible provider — the

Callers 2

callLocalFunction · 0.85
executeMethod · 0.85

Calls 2

getActiveConfigFunction · 0.85
looksVisionCapableFunction · 0.85

Tested by

no test coverage detected