svrnty-vision/src/svrnty_vision/routers/vlm.py
Svrnty 2a90c3f884 feat: initial scaffold — FastAPI shell + stub vision routers
Phase 4a of the BTE refactor (audit 2026-05-24 §3 V). svrnty-vision is a
sovereign HTTP gateway in front of four vision capabilities — VLM (Spark 2
Qwen3-VL), FLUX image gen (Spark 1 ComfyUI), palette extraction, and
background removal. This commit lays only the scaffold: FastAPI app,
/healthz, four 501-stub routers, pydantic-settings config, pytest smoke.

Real implementations land in Phase 4b. BTE code is untouched in 4a.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 13:25:57 -04:00

18 lines
567 B
Python

"""VLM (vision-language model) analysis — stub until Phase 4b moves Qwen3-VL code."""
from fastapi import APIRouter, HTTPException, status
router = APIRouter(prefix="/vlm", tags=["vlm"])
@router.post("/analyze")
async def analyze() -> None:
"""Analyze an image with a vision-language model.
Phase 4a: stub. Phase 4b: proxies to Spark 2 (Qwen3-VL via vLLM).
"""
raise HTTPException(
status_code=status.HTTP_501_NOT_IMPLEMENTED,
detail="vlm.analyze not implemented in Phase 4a — see BTE-REFACTOR-EXECUTION-PLAN Phase 4b",
)