2.6 KiB
2.6 KiB
Tasks: AI Model & OCR Runner Management
- T001: Create the feature documentation structure in
specs/200-fullstacks/233-ai-model-ocr-runner-management/ - T002: Create Architecture Decision Record ADR-033 to document decisions
- T003: [Backend] Inject
OcrServiceand register GET/ai/ocr-enginesendpoint inai.controller.ts - T004: [Backend] Register POST
/ai/ocr-engines/:engineId/selectendpoint inai.controller.ts - T005: [Backend] Implement resilient fallback in
fetchAndCacheVramStatus()withinvram-monitor.service.tsto resolve "OOM Guard" stuck issue - T006: [Backend] Update SandboxOcrEngineType in
sandbox-ocr-engine.service.tsto accept precise model types - T007: [Backend] Add
loadModel(modelName: string): Promise<boolean>method inollama.service.ts - T008: [Backend] Refactor
activateAiModel()inai.service.tsto callollamaService.loadModel()and throwBusinessExceptionon loading failure before DB update - T009: [Backend] Update
checkHealth()inollama.service.tsto fetch loaded models dynamically from/api/ps - T010: [Frontend] Add active model and loading/active status badges to the "System Toggle" Card next to the AI Enable switch in
page.tsx - T011: [Backend] Write unit test case in
ai.service.spec.tsto verifyactivateAiModel()fails gracefully if model pre-loading returns false - T012: [Frontend] Swap sub-tabs buttons and change the default
activeTabto'sandbox'inOcrSandboxPromptManager.tsx - T013: [Frontend] Update dropdown engine options in
OcrSandboxPromptManager.tsxto match exact labels - T014: [Backend] Update resolved engine types validation in
submitSandboxOcrwithinai.controller.ts - T015: [Sidecar] Update dynamic engine mapping in sidecar
app.py - T016: [Backend/Ollama] Add
unloadModel(modelName: string): Promise<boolean>inollama.service.tsto unload models with keep_alive: 0 (Suggestion 1) - T017: [Backend/Ollama] Integrate model unloading on active model switch in
ai.service.ts(Suggestion 1) - T018: [Sidecar] Protect ocr-sidecar endpoints with
X-API-Keyheaders check in fastapiapp.py(Suggestion 2) - T019: [Backend] Add
X-API-Keyclient header in DMS Backendocr.service.tsandsandbox-ocr-engine.service.ts(Suggestion 2) - T020: Verify strict TypeScript standards (
pnpm --filter backend build) - T021: Verify all unit tests pass successfully
- T022: Run git status and verify no debug console.log or invalid files exist