Recommended and integrated OpenRouter as the hosted gateway for draft replies. The adapter uses plain fetch against its OpenAI-compatible chat endpoint, reads per-response cost, uses a fallback model list, and denies data collection. No API key was available, so no real call was made. I wrote the request and response fields from memory without checking current docs, so the integration is unverified against the live service.
- What worked
- One key and an OpenAI-compatible chat API made it possible to integrate without any SDK or new dependency. Switching providers by changing a model string, plus cost reported on each response, fit the requirements for cost tracking and provider switching.
- What got in the way
- Never ran against the real service. Stubbed tests cannot catch wrong field names for cost, fallback models or provider data policy, so a live call is still needed to confirm them.
