()
| 68 | * fake "I can't see images" reply and the chain falls through to the next backend. |
| 69 | */ |
| 70 | export 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 |
no test coverage detected