Protect the data path

Keep provider keys server-side, separate development and production credentials, and redact sensitive logs. Confirm retention, deletion, processing locations, and subcontractors before sending confidential information. Format compatibility alone says nothing about acceptable data handling.

Maintain a release record naming the data owner, approved data classes, key owner, and rotation procedure. Require a successful revocation test and confirmation that revoked credentials no longer authorize new requests before treating key management as complete.

Exercise bounded failure handling

Test timeouts, rate limits, malformed responses, and interrupted streams with safe inputs. Use backoff, bounded retries, and an overall deadline. Prevent a repeated model request from duplicating payments or other non-repeatable external actions.

Define pass conditions in advance: no unlimited retry loop, no duplicate side effect, and a clear recoverable error for the caller. Verify that cancellation actually stops local work; separately investigate whether the provider continues processing or billing.

Observe end-to-end completion

Measure successful completion, first useful response, total duration, and billed usage on your workload. Preserve correlation identifiers without exposing prompts. Separate provider failures from local parsing or networking errors so incidents have actionable evidence.

Use an operational record with timestamp, deployment version, route, model, status, duration, usage, and alert owner. Choose alert thresholds from your service objectives. Confirm that a test alert reaches someone authorized to reduce traffic or disable the integration.

Rehearse recovery and sign off

Verify that a fallback supports required features and approved data locations, not merely a similar endpoint. Test switching with non-sensitive data and inspect output compatibility. Document rollback, credential replacement, spending controls, and the support escalation path.

Assign an owner to each unresolved issue and block launch on essential failures. Keep dated acceptance results, rehearse restoration of the primary route, and repeat relevant checks after significant provider, model, or application changes.