shared gateway를 어떻게 관찰하고 복구할까
사용자, team별 gateway auth와 provider key mapping을 분리하고 한 사용자가 다른 key, model quota를 선택하지 못하게 합니다. Key는 encrypted secret store에서 short-lived process에 주입하고 log, error, metrics에는 header와 prompt를 redaction합니다. Egress allowlist로 허용 provider만 연결하고 admin endpoint를 일반 client network에서 분리합니다.
trace에는 client request ID, chosen provider, model, transformation version, compression byte, hash, retry, fallback reason, provider usage와 estimated, actual cost를 남깁니다. 민감한 prompt 원문은 기본 log에서 제외하되 사용자가 opt-in한 debug artifact로 재현할 수 있게 합니다. 비용 dashboard는 cache, failed, retried request와 하위 tool 호출을 포함합니다.
pilot은 원본 direct와 9router를 같은 read-only task에 shadow 비교합니다. Tool argument, final test, first-token, p95, fallback, 재질문, token과 비용을 측정합니다. Provider outage, 429, malformed stream과 gateway restart를 주입해 pending request가 중복되지 않고 client가 model 변경을 알 수 있는지 확인합니다.
gateway 장애가 모든 개발을 막지 않도록 승인된 direct endpoint 또는 read-only fallback 구성과 config rollback을 둡니다. 품질 하락이 비용 절감보다 크거나 model provenance를 UI에 전달할 수 없고 key audit가 불완전하면 팀 공유로 넓히지 않습니다.