Files
esh-pfi-infrastructure/stacks/gateway-chat
vh 9fe7479ddc fix(gateway-chat): honor UI endpoint/model/voice for TTS + standard-audio playback
The TTS path was hardwired to the parked zonos-gateway: it force-reverted the
endpoint field back to zonos :8890 on load, hardcoded model=ext-tts, and decoded
the response as Zonos-specific raw float32 PCM @ 44.1kHz. Result: quoted-text TTS
was dead once zonos was parked, and pointing the field elsewhere silently failed.

- Honor the interface: set endpoint/model/voice defaults only when a field is
  empty; never rewrite a user-typed value (removed the zonos auto-revert regex).
- Add a TTS model field (ttsModel); send the UI's model instead of hardcoding.
- Playback: request standard OpenAI /v1/audio/speech mp3 and decode via
  audioCtx.decodeAudioData (handles wav/mp3/ogg/flac from any endpoint).
- Defaults: endpoint = LiteLLM ext-tts alias (fleet TTS gateway), voice = nova.
2026-08-12 17:31:04 -07:00
..

gateway-chat

Persistent static-serve of tools/gateway-chat.html — the zero-dependency web chat for smoking models on the LiteLLM gateway (10.250.50.70:4000). It auto-discovers every gateway model via /v1/models (the ↻ control — new models just appear), takes system prompts, streams responses (renders reasoning_content), and supports image upload for vision models (Qwopus, image-judge). It deliberately never sends a tools field, sidestepping the vLLM empty-tools 400.

  • Host: ana-docker (non-GPU)
  • URL: http://10.250.50.70:8091
  • Image: nginx:alpine (tiny static server — no GPU, no DB)
  • Served file: conf/index.html → mounted read-only at /usr/share/nginx/html/index.html

The served file mirrors tools/gateway-chat.html

The canonical/editable source is the repo's tools/gateway-chat.html (also openable file:// or via python3 -m http.server -d tools). conf/index.html here is the deployed copy. After editing the tool, re-sync + redeploy:

cp tools/gateway-chat.html stacks/gateway-chat/conf/index.html
scripts/deploy-stack.sh ana-docker gateway-chat --conf

No restart needed — the file is bind-mounted, so nginx serves the new content on the next request. (Restart only if you want a forced reload.)

Deploy

scripts/deploy-stack.sh ana-docker gateway-chat            # compose + conf
ssh ana-docker 'cd /opt/docker/compose/gateway-chat && docker compose up -d'

Set the gateway base URL + an API key in the page's sidebar (persists in localStorage), then hit ↻ to load the model list.