Context
PR #48 already moved request-log persistence off the response path and stopped hardcoding method/path in the logging helper.
The remaining work is a maintainability refactor: the gateway still has several manual completion-log call sites in crates/mizan-api/src/gateway.rs, which makes future endpoint additions harder to keep consistent.
Proposed changes
- Centralize gateway completion logging behind one helper or layer boundary so handler branches do not repeat completion plumbing.
- Keep the request-log schema and existing fields unchanged.
- Preserve current success/error semantics for chat completions.
- Make the logging path reusable for future non-chat gateway endpoints.
Acceptance Criteria
Notes
Context
PR #48 already moved request-log persistence off the response path and stopped hardcoding
method/pathin the logging helper.The remaining work is a maintainability refactor: the gateway still has several manual completion-log call sites in
crates/mizan-api/src/gateway.rs, which makes future endpoint additions harder to keep consistent.Proposed changes
Acceptance Criteria
Notes
method/pathparameterization work already landed in PR feat: add request logging and admin audit foundations #48.