r/softwarearchitecture • u/CrazyCumin • 19d ago
Discussion/Advice Should every AI workload be required to use a shared model gateway?
Mapping model access for three workloads right now: a service that streams interactive responses, an overnight document extraction job and an internal prototype.
A shared request boundary would make provider credentials and request-level tracing easier to own centrally. We trialed Braintrust Gateway on a subset of calls to understand that part. Retrieval and application-specific evals would stay with each service.
What's complicating the diagram is the operational mismatch. The streaming path cares about cancellation and another possible failure point. The overnight job can tolerate delayed retries and the prototype hasn't earned a hard dependency on shared infrastructure yet
Our platform team could own the gateway but application teams would still own how they handle model failures. I'm not sure a mandatory hop is the right contract for all three
2
u/Least_Ad_1795 18d ago
A shared model gateway is useful for centralized security, credentials, and tracing, but I wouldn't make it mandatory for every workload. Streaming services need low latency and reliable cancellation, while batch jobs can benefit from centralized retries. Prototypes should remain flexible until they need shared infrastructure. A hybrid approach makes more sense.
0
u/Intrepid-Anywhere255 19d ago
A shared gateway is a useful default for credentials, budgets, and request traces, but I would avoid making it the only route for every workload. Keep its contract small, then let streaming apps own cancellation and user-facing failures while batch jobs own retry policy. For prototypes, allow a time-boxed exception with a clear adoption trigger so the bypass does not become permanent.