Summary
Bug fixes for Sprint 22 plus translation GPU infrastructure improvements.
Bug Fixes
-
#363 (closed): GPU-to-CPU fallback no longer permanently mutates
this.backend/this.backendType. Per-request CPU fallback uses a localcpuBackendvariable instead. -
#506 (closed): Added
timeout=aiohttp.ClientTimeout(total=30)to all 7aiohttp.ClientSession()calls ingenieai_chatqna.py(3) andgenieai_dataprep_arangodb.py(4). -
#508 (closed): Replaced hardcoded placeholder URL
https://<HOST>/<PORT>withBACKEND_SERVICE_URLenv var ingenieai_chatqna.py. -
#510 (closed): Downgraded sensitive logs from
logger.infotologger.debugingenieai_chatqna.py(3 occurrences) andgenieai_dataprep_arangodb.py(2 occurrences).
Additional Fixes
- Downgraded UserProvisioning PII log (
name,email,realm_access,resource_access) fromlogger.infotologger.debug. - Added
VLLM_TRANSLATION_MODEL_IDto backend service environment indocker-compose.yaml. Previously the backend hardcodedgoogle/gemma-3-4b-itas default, ignoring the env var. Now it matches the model loaded invllm-translation-guardrail. - GPU backend (
gpu-translate-backend.js): AddedfetchModelInfo()to query/v1/modelsat init and discover the model'smax_model_len.formatRequest()now calculatesmax_tokens = max_model_len - 128instead of hardcoded 4096, preventing 400 errors on models with smaller context windows (e.g. gemma-3-1b-it with 1024 tokens).
Infrastructure
- Added
LOG_LEVELenv var support:- Backend shared-lib logger (
components/shared/lib/logger.js) readsLOG_LEVELfrom env (default:info) - Document-repository (
components/document-repository/src/config/appConfig.js) also readsLOG_LEVELfrom env (default:info) - Added
LOG_LEVELto bothbackendanddocument-repositoryservice environments indocker-compose.yaml - Added to Ansible
env.j2template (Section 7: Backend Service Configuration) - Documented
log_levelindeploy/ansible/README.md(covers both backend and document-repository) - Documented in
envtemplate
- Backend shared-lib logger (
Files Changed
| File | Change |
|---|---|
components/gov-chat-backend/services/translation-service.js |
#363 (closed): Local CPU fallback variable |
components/gov-chat-backend/services/translation/gpu-translate-backend.js |
fetchModelInfo + dynamic max_tokens |
components/gov-chat-backend/services/user-provisioning-service.js |
PII log downgraded to debug |
components/shared/lib/logger.js |
LOG_LEVEL env var support |
docker-compose.yaml |
VLLM_TRANSLATION_MODEL_ID + LOG_LEVEL for backend and document-repository |
env |
LOG_LEVEL documentation |
genie-ai-overlay/chatqna/genieai_chatqna.py |
#506 (closed) timeouts, #508 (closed) URL fix, #510 (closed) log downgrade |
genie-ai-overlay/dataprep/genieai_dataprep_arangodb.py |
#506 (closed) timeouts, #510 (closed) log downgrade |
deploy/ansible/templates/env.j2 |
LOG_LEVEL in Section 7 |
deploy/ansible/README.md |
log_level variable documentation |
Ansible Deployment
No new env vars were added that aren't already in the Ansible env.j2 template:
-
VLLM_TRANSLATION_MODEL_ID— already inenv.j2line 143 (Section 10: Translation Model) -
LOG_LEVEL— added toenv.j2Section 7 (Backend Service Configuration) and documented in README
Both backend and document-repository consume LOG_LEVEL from the generated .env file.
Test plan
-
GPU translation works without falling back to CPU (model ID matches, max_tokens within context limit) -
OPEA services start without hanging (aiohttp timeouts) -
No PII or sensitive data in INFO-level logs -
File read URL correct in RAG chat with file context (#508 (closed) — needs RAG pipeline running) -
Verify LOG_LEVEL=debug produces debug output in backend logs -
Verify LOG_LEVEL=debug produces debug output in document-repository logs
Edited by david-full