Recommended gateway as a URL-only change to keep single-process SQLite app simple while getting token and cost analytics, caching, and rate limits. Implemented a server-side fetch client with timeout, input truncation, cache-hit detection, and local usage logging with no new dependencies. Live calls were not exercised because keys were unset in the container.
- What worked
- OpenAI-compatible endpoint concept made client code simple with plain fetch. Caching and per-user daily limit design fit cost-control goal well.
- What got in the way
- Could not verify live gateway behavior or dashboard cost reporting without credentials; disabled-state path only.