BUILD & OPERATE
Docs / Architecture
Deployment patterns
Choose an integration shape by considering trust boundaries, network paths, operational ownership, and failure handling.
Map the request path
Before selecting a deployment pattern, draw the path from the user action to the model provider and back. Include the application, gateway or orchestration layer, identity system, secrets store, telemetry destination, and any retrieval or tool services. Mark which systems process sensitive data and which network boundaries a request crosses. This diagram helps expose hidden dependencies before they become deployment surprises.
Decide which component owns authentication, authorization, request validation, retries, and response shaping. These responsibilities should be clear even if multiple services participate. In particular, keep provider credentials on a trusted server side and enforce application permissions before context is sent or a tool action is taken.
Consider common integration shapes
A direct application-to-provider integration can be simple for a small service, but each application then owns provider settings, credentials, and operational behavior. A shared gateway can centralize routing and telemetry, though it becomes a dependency that needs capacity planning, access controls, and an owner. A private-network or customer-managed pattern may address particular deployment requirements while adding setup and maintenance responsibilities.
These shapes are not interchangeable promises. Actual availability, network support, data residency, and isolation depend on the chosen infrastructure and provider agreements. Document what the design provides, what remains the customer’s responsibility, and which assumptions need confirmation before implementation.
Plan for environments and failure
Separate development, testing, and production configuration. Use test credentials and non-sensitive examples where possible. Ensure a developer’s experiment cannot change a shared production route. Record configuration changes and define how to restore a known-good version. A deployment should identify which workloads are affected and who can pause or reverse the change.
Decide how the application behaves when the gateway, provider, or network is unavailable. Timeouts should fit the interaction; retries should be bounded and safe. If a feature can degrade gracefully, define the fallback experience in advance. Do not return stale or partial output as current without making that state clear to the user.
Verify the operating model
Review credentials, network rules, access logs, service ownership, backup or recovery needs, and incident contacts for the chosen pattern. Test an unavailable dependency and confirm that errors are visible and actionable. Observe a normal request end to end, including its route, timing, and normalized outcome. Check that diagnostic data follows the same access and retention rules as other operational records.