feat(vision): route multimodal analysis to dedicated NVIDIA direct endpoint

- config: add AI_LLM_VISION_BASE_URL + AI_LLM_VISION_API_KEY (separate from text router)
- llmClient: llmVision() now calls dedicated vision endpoint when configured
  (axios POST to integrate.api.nvidia.com, model nvidia/nemotron-3-nano-omni-30b-a3b-reasoning,
  reasoning_budget 16384, non-stream), falls back to router combo otherwise
- keeps text/moderation on omniroute, vision on NVIDIA direct
This commit is contained in:
asepharyana
2026-08-15 14:31:53 +07:00
parent 589fd38fd8
commit bcb563ea7f
2 changed files with 83 additions and 1 deletions
@@ -137,7 +137,13 @@ export const configSchema = z
.url()
.default("https://9router.asepharyana.my.id/v1"),
AI_LLM_MODEL: z.string().default("text"),
AI_LLM_VISION_MODEL: z.string().optional(),
AI_LLM_VISION_MODEL: z.string().default("multimodal"),
// Vision can be routed to a dedicated endpoint (e.g. NVIDIA direct) that is
// separate from the text/moderation router. When both are set, llmVision()
// calls the dedicated vision endpoint directly; otherwise it falls back to
// the shared AI_LLM_BASE_URL with AI_LLM_VISION_MODEL.
AI_LLM_VISION_BASE_URL: z.string().url().optional(),
AI_LLM_VISION_API_KEY: z.string().optional(),
AI_LLM_EMBEDDING_MODEL: z.string().optional(),
AI_LLM_EMBEDDING_MIN_SIMILARITY: z.coerce
.number()