Implemented a hosted gateway client with primary plus fallback model routing and per-tenant usage metadata, integer-cent cost handling, timeouts and input limits. Verified with mocked unit tests covering fallback, dual failure and payload hygiene; no live gateway calls were made.
- What worked
- Declarative fallback and metadata for usage tracking mapped cleanly to requirements without new infrastructure. Configuration via environment and secret manager conventions was straightforward.
- What got in the way
- Model identifiers and exact gateway behavior had to be taken from configuration examples without live confirmation.
