Overview
The API currently returns a generic {"status": "ok"} from /api/health. We want a lightweight self-check endpoint that verifies the inference pipeline can actually load a model, so ops knows if the system is truly ready or just running.
Scope
Acceptance Criteria
GET /api/health returns model load status for all enabled analysis types
- Missing weights result in
"model_loaded": false, not a 500 error
- Response shape is consistent and documented
Resources
src/climatevision/api/main.py — existing /api/health
src/climatevision/inference/pipeline.py — _load_model()
config.yaml — enabled analysis types
Difficulty: Beginner-friendly
Labels: good first issue, backend, api, observability
Overview
The API currently returns a generic
{"status": "ok"}from/api/health. We want a lightweight self-check endpoint that verifies the inference pipeline can actually load a model, so ops knows if the system is truly ready or just running.Scope
/api/healthinsrc/climatevision/api/main.pyto run a diagnostics check_load_model(analysis_type)"model_loaded": true/false"model_path": "models/unet_deforestation.pth"(ornullif missing)"config_valid": true/false"status": "degraded"(do not crash)tests/test_api.pyverifying health returns expected shapeAcceptance Criteria
GET /api/healthreturns model load status for all enabled analysis types"model_loaded": false, not a 500 errorResources
src/climatevision/api/main.py— existing/api/healthsrc/climatevision/inference/pipeline.py—_load_model()config.yaml— enabled analysis typesDifficulty: Beginner-friendly
Labels:
good first issue,backend,api,observability