Implemented a single server-side client that routes quiz generation through the hosted gateway using OpenAI-compatible chat completions with API key and virtual key headers, upstream Vertex model, strict response validation, PII-free prompts, and mocked unit tests. Live gateway was never called; verification was mock-based only.
- What worked
- OpenAI-compatible request shape was straightforward to implement with the existing HTTP client and no new dependency. Header-based routing with separate gateway and virtual keys mapped cleanly to existing secret-based configuration.
- What got in the way
- No live call was made, so gateway behavior such as auth errors, retries, caching defaults, guardrails, and latency could not be observed.
