Audience: AI platform teams, FinOps engineers, cloud architects, compliance officers, and auditors responsible for multi-model AI deployments on AWS Bedrock.
Scope: This guide covers Bedrock Gateway and Smart Routing. For the broader Amazon Quick/SageMaker/Bedrock compliance profile, see the three-way crosswalk.

The question Smart Routing creates. Smart Routing sends a request to a cheaper model. The output looks fine. Six weeks later, an Article 12 audit asks: which model processed this specific customer's loan decision on October 14? Smart Routing made the routing choice, but that decision is not in your compliance records. It is in AWS operational logs that you may or may not have retained. Every routed request is a governance event -- and right now, most organizations have no structured record of which model actually ran.

1. What Bedrock Gateway and Smart Routing Do

AWS introduced two services that reshape how organizations manage AI model access and cost:

Bedrock Gateway

A centralized model access layer that sits between users and foundation models. Gateway provides organizational controls -- spending limits per user or group, IAM-based model access policies, and a unified catalog that spans Bedrock-hosted models, third-party endpoints, and self-hosted infrastructure. Administrators can set budget caps, enforce approval workflows for expensive models, and monitor consumption across the entire organization from a single console.

Smart Routing

An automatic model selection layer that evaluates incoming requests and routes them to the most cost-effective model capable of producing comparable output quality. AWS reports 40-50% cost savings in internal testing. Smart Routing analyzes prompt characteristics -- complexity, expected output length, domain -- and selects from a pool of approved models based on quality benchmarks and pricing.

Why These Are Governance-Significant

Both services change two fundamental questions in AI operations: which model runs and how much it costs. AWS positions these services as infrastructure for enterprise AI management. From a witness perspective, every routing decision, budget threshold, and model substitution is an event that may warrant evidence.

Gateway and Smart Routing create operational efficiency. SWT3 records what those systems did, when, and why -- producing evidence that may be relevant for auditors, regulators, and internal governance teams.

2. Bedrock Gateway: Centralized Access Governance

Bedrock Gateway consolidates model access management into a single organizational layer. Rather than individual teams managing their own Bedrock endpoints, API keys, and budgets, Gateway provides centralized control with several governance-relevant capabilities:

Model Catalog Control

Administrators define which models are available to which teams. A research group may have access to large frontier models while a customer-service team is restricted to smaller, cost-effective options. The catalog spans Bedrock-native models, third-party models accessed via API, and models self-hosted on SageMaker or EC2 -- creating a single registry regardless of deployment topology.

Spending Limits and Budget Alerts

Per-user, per-group, and per-IAM-role spending limits can be configured with threshold alerts at configurable percentages. When a team hits 80% of its monthly budget, Gateway can notify administrators, throttle requests, or block access entirely depending on policy configuration.

Identity Integration

Gateway integrates with Okta, Microsoft Entra, and AWS IAM Identity Center for identity-based model access. This means model permissions follow the same identity governance as other enterprise resources -- joiners get model access through group membership, leavers lose it automatically.

Witnessable Events

From a governance evidence perspective, Gateway produces several event types that may warrant witness anchors:

Gateway creates a single pane of glass for model management. But the glass itself produces operational records that auditors may ask about -- particularly when regulatory frameworks require evidence of access control, cost management, or model inventory.

3. Smart Routing: The Quality Equivalence Problem

Smart Routing picks the cheapest model that can deliver comparable quality. The operative word is "comparable" -- and that word carries the entire governance burden.

The Core Question

When Smart Routing substitutes a less expensive model, the organization needs to answer: Can you prove the cheaper model's output was equivalent? The 40-50% savings figure is attractive to any FinOps team. But it raises immediate auditor questions: "Which model actually processed this request? Was quality assessed before or after substitution? Who approved the quality threshold?"

Quality Degradation Risk

Cost savings at the expense of accuracy may be acceptable for some workloads (summarization, classification) and unacceptable for others (medical diagnosis support, legal analysis, financial risk scoring). Without evidence of the routing decision and its quality assessment, an organization cannot distinguish between cost optimization and quality degradation after the fact.

Model Substitution Without Audit Trail

If Smart Routing replaces Model A with Model B and no record exists of that substitution, the organization has a gap in its operational record-keeping. This is particularly relevant under:

Governance Scenario Table

Scenario Governance Question Without Evidence With SWT3
Model downgrade Did cheaper model meet quality threshold? No record AI-DEL.1 + AI-INF.1
Budget breach Who approved spending above limit? CloudTrail only AI-COST.1 + AI-AUDIT.1
Context truncation Did truncation affect output quality? Unknown AI-CTX.1
Routing failure Was fallback model authorized for this workload? Unclear AI-DEL.2 + AI-MDL.8
Quality dispute Which model produced the contested output? Ambiguous AI-INF.1 + AI-AUDIT.1

4. Cost Witnessing (AI-COST.1)

AI-COST.1 records per-inference resource consumption, creating a witness trail that connects model usage to organizational budgets. In a Bedrock Gateway environment, cost evidence serves multiple audiences:

Per-Inference Cost Records

Each inference carries a resource footprint -- input tokens, output tokens, compute seconds, and API call costs. AI-COST.1 witnesses these values as immutable records, allowing organizations to reconstruct cost profiles for any time period, model, or team.

Budget Threshold Events

When spending hits 80%, 90%, or 100% of an allocated budget, the threshold crossing itself is a witnessable event. This evidence may be relevant for demonstrating that cost controls were monitored and that budget overruns were detected in a timely manner.

Cost vs. Quality Tradeoff Evidence

By linking AI-COST.1 records to AI-INF.1 inference provenance records, an organization can build a cost-quality dataset: "For this prompt class, Model A cost $0.03 and scored 94% on quality metrics. Model B cost $0.008 and scored 91%." This linkage gives auditors a basis for evaluating whether cost optimization affected output quality.

Cross-Model Comparison

Smart Routing makes cross-model cost comparison a daily reality. Recording the cost of the model that was selected -- alongside the cost of the model that would have been selected without Smart Routing -- provides the evidence basis for validating the savings claims.

CloudTrail records that an API call was made. AI-COST.1 records what it cost, in context. The two are complementary -- CloudTrail provides infrastructure-level audit, SWT3 provides application-level cost governance evidence.

5. Delegation and Routing Witnessing

When an agent sends a request to Bedrock and Smart Routing redirects it to a different model, that redirection is a delegation event. The original caller delegated inference to Bedrock, and Bedrock delegated it further to a specific model based on routing policy.

AI-DEL.1: The Routing Decision

Each Smart Routing decision can be witnessed as a delegation event. The anchor records the delegation depth (how many hops from the original caller to the executing model), the authorized depth (maximum hops permitted by policy), and the total delegation count for the session. This creates a chain of custody for the inference request.

AI-DEL.2: Delegation Boundaries

Gateway policies may impose constraints on delegation -- maximum depth (an agent cannot delegate to another agent that delegates to another agent indefinitely), time bounds (a delegation expires after N minutes), and scope limits (a delegated model cannot access certain data sources). AI-DEL.2 records these boundary conditions and whether the actual execution stayed within them.

Gateway Policy Enforcement as Delegation Constraint

When Gateway blocks a model request because the user has exceeded their budget, that block is a delegation constraint enforcement. The request was delegated to Gateway, and Gateway refused to delegate further. Recording this refusal provides evidence that access controls functioned as configured.

Multi-Hop Delegation Chains

Consider a typical agentic workflow: a user asks an orchestrator agent to analyze a document. The orchestrator calls Bedrock. Smart Routing selects a model. The model calls a tool that itself triggers another Bedrock inference. This creates a delegation chain:

User -> Orchestrator -> Bedrock Gateway -> Smart Router -> Model A -> Tool -> Bedrock Gateway -> Model B

Each hop in this chain is a witnessable delegation event. Without delegation evidence, the organization cannot reconstruct who authorized what, or identify where in the chain a problem originated.

6. Context Window Management

Smart Routing picks a model -- but what if the selected model has a smaller context window than the original target? A request crafted for a 200K-token context window that gets routed to a model with a 32K-token window may lose critical context.

Truncation as a Quality Event

When context is truncated to fit a smaller window, the output quality may be affected. AI-CTX.1 records the original context size, the actual window used, and whether truncation occurred. This evidence allows after-the-fact analysis when output quality is questioned: "Was the context complete, or was it cut to fit?"

Token Budget Management

Organizations may set token budgets per request, per session, or per user. When Smart Routing selects a model, the token budget for that model's pricing tier becomes relevant. AI-CTX.1 witnesses the utilization percentage -- how much of the available window was used -- providing data for capacity planning and cost optimization.

Eviction Strategies

When context must be reduced, different strategies produce different quality impacts. Truncation (removing oldest context) differs from summarization (condensing context) differs from selective pruning (removing low-relevance segments). Recording the eviction method alongside the truncation event provides the evidence needed to assess whether quality degradation was a function of routing or of context management.

Practical note: AI-CTX.1 is especially relevant when Smart Routing moves a request from a large-context model to a smaller-context model. The routing decision (AI-DEL.1) and the context management decision (AI-CTX.1) together tell the complete story of what happened to the request.

7. Procedure Cards

Seven SWT3 procedures are relevant to Bedrock Gateway and Smart Routing governance. Each card shows the procedure identifier, description, factor definitions, and an assessor tip.

AI-COST.1

Resource Consumption Witnessing

Records per-inference resource consumption including token usage, compute time, storage, API calls, and bandwidth. Witnesses budget threshold crossings when spending reaches configured percentages of allocated budgets.

FactorNameTypeDescription
factor_aresource_type_codeint0=tokens, 1=compute_seconds, 2=storage_bytes, 3=api_calls, 4=bandwidth
factor_bconsumption_valueintQuantity consumed in units defined by resource_type_code
factor_cbudget_threshold_pctint0-100; percentage of budget consumed at time of witness. 0 if no budget is configured
Assessor tip: AI-COST.1 anchor totals for a billing period can be compared against AWS invoices. Significant divergence between witnessed consumption and billed usage may indicate uninstrumented inference paths.
AI-DEL.1

Delegation Tree

Records delegation depth and authorization boundaries when a request is routed from one model or agent to another. Each Smart Routing decision that redirects a request to a different model is a delegation event.

FactorNameTypeDescription
factor_adelegation_depthintNumber of hops from original caller to executing model
factor_bauthorized_depthintMaximum delegation depth permitted by policy
factor_cdelegation_countintTotal number of delegations in the current session or chain
Assessor tip: Cases where delegation_depth equals or exceeds authorized_depth indicate the delegation chain reached its configured limit. How the Gateway handled this boundary condition is reflected in the corresponding AI-TOOL.1 or AI-INF.1 anchors.
AI-DEL.2

Delegation Boundary

Records the maximum delegation constraints configured by policy and the actual delegation parameters observed during execution. Captures time-bound constraints for delegations with expiration windows.

FactorNameTypeDescription
factor_amax_depth_allowedintPolicy-defined maximum delegation depth
factor_bactual_depthintObserved delegation depth for this request
factor_ctime_bound_minutesintMaximum delegation validity period in minutes; 0 if unbounded
Assessor tip: Varying max_depth_allowed values across anchors for the same workload class may indicate mid-period policy changes or different team-level constraints within the Gateway configuration.
AI-CTX.1

Context Window Management

Records context window utilization and truncation events. Particularly relevant when Smart Routing selects a model with a different context window size than the originally targeted model.

FactorNameTypeDescription
factor_awindow_size_tokensintTotal context window size of the selected model in tokens
factor_butilization_pctintPercentage of context window consumed (0-100)
factor_ctruncation_occurredint0 = no truncation; 1 = context was truncated to fit window
Assessor tip: Anchors where truncation_occurred = 1 indicate context was reduced during routing. High truncation rates correlated with quality degradation may reflect a mismatch between Smart Routing's model selection criteria and workload requirements.
AI-MDL.8

Model Registry Attestation

Records the approval status of models within a centralized registry. In a Bedrock Gateway environment, this attests that the model selected by Smart Routing was present in the organizational catalog and carried an appropriate approval status at the time of inference.

FactorNameTypeDescription
factor_aregistry_entry_idstrHash of the model's registry entry (model ID + version + provider)
factor_bapproval_statusint0=pending, 1=approved, 2=deprecated, 3=blocked
factor_clast_audit_dateintEpoch days since last audit of this registry entry
Assessor tip: Models with approval_status = 2 (deprecated) still appearing in routing pools, or models with distant last_audit_date values, are common findings in Gateway environments.
AI-AUDIT.1

Audit Log Integrity

Records the integrity state of audit logs produced by Gateway and Smart Routing operations. Witnesses log entry counts, hash chain validity, and the last verification timestamp to establish that operational records have not been tampered with.

FactorNameTypeDescription
factor_alog_entry_countintNumber of log entries in the current audit period
factor_bhash_chain_validint0 = chain broken or unverified; 1 = hash chain intact
factor_clast_verifiedintEpoch milliseconds of last hash chain verification
Assessor tip: Consistent hash_chain_valid = 1 values with regular last_verified timestamps indicate automated integrity verification. Gaps in verification cadence may reflect manual or ad-hoc integrity checking.
AI-INF.1

Inference Provenance

Records prompt and response hashes to establish inference lineage. In a Smart Routing context, AI-INF.1 provides the cryptographic link between a specific prompt and the model that processed it -- answering the question "which model actually handled this request?"

FactorNameTypeDescription
factor_aprompt_hashstrSHA-256 hash of the input prompt (first 12 hex characters)
factor_bresponse_hashstrSHA-256 hash of the model response (first 12 hex characters)
factor_ctimestampintEpoch milliseconds when inference completed
Assessor tip: AI-INF.1 and AI-DEL.1 anchors for the same timestamp window together indicate which model processed a given prompt and how the routing decision was reached.

8. Quick Start

The following examples demonstrate witnessing Bedrock Gateway and Smart Routing events using the SWT3 SDKs. Both Python and TypeScript examples produce equivalent witness anchors.

Python

from swt3_ai import Witness

witness = Witness(
    endpoint="https://your-instance.example.com/api/v1/witness",
    api_key="axm_your_key",
    tenant_id="your-tenant-id"
)

# Witness a Smart Routing decision (delegation)
witness.witness_routing_decision(
    source_model="claude-sonnet-4-6",
    target_model="claude-haiku-4-5",
    routing_reason="cost_optimization",
    quality_threshold_met=True,
    cost_savings_pct=42
)

# Witness resource consumption
witness.witness_resource_consumption(
    resource_type="tokens",
    consumption_value=1500,
    budget_threshold_pct=65
)

# Witness context window management
witness.witness_context_window(
    tokens_before=8192,
    tokens_after=4096,
    eviction_method="truncation"
)

witness.flush()

TypeScript

import { Witness } from '@tenova/swt3-ai';

const witness = new Witness({
  endpoint: 'https://your-instance.example.com/api/v1/witness',
  apiKey: 'axm_your_key',
  tenantId: 'your-tenant-id',
});

// Witness a Smart Routing decision (delegation)
witness.witnessRoutingDecision({
  sourceModel: 'claude-sonnet-4-6',
  targetModel: 'claude-haiku-4-5',
  routingReason: 'cost_optimization',
  qualityThresholdMet: true,
  costSavingsPct: 42,
});

// Witness resource consumption
witness.witnessResourceConsumption({
  resourceType: 'tokens',
  consumptionValue: 1500,
  budgetThresholdPct: 65,
});

// Witness context window management
witness.witnessContextWindow({
  tokensBefore: 8192,
  tokensAfter: 4096,
  evictionMethod: 'truncation',
});

await witness.flush();
Both SDKs produce identical SWT3 Witness Anchors for the same input data. See the SDK documentation for integration details.

9. Coverage Matrix

This matrix maps each procedure to Bedrock Gateway features, Smart Routing features, and the combined evidence profile when SWT3 witnessing is added.

Procedure Bedrock Gateway Smart Routing Combined + SWT3
AI-COST.1 Native Native Full evidence chain
AI-DEL.1 IAM only Routing decisions Full delegation tree
AI-DEL.2 Policy limits Implicit bounds Explicit boundary records
AI-CTX.1 Not tracked Internal only Truncation evidence
AI-MDL.8 Model catalog Pool membership Attestation + audit date
AI-AUDIT.1 CloudTrail CloudTrail Hash chain integrity
AI-INF.1 Not tracked Not tracked Prompt/response lineage
Reading the matrix: "Native" means the AWS service produces equivalent evidence natively. "IAM only" or "CloudTrail" means partial coverage through existing AWS infrastructure. "Not tracked" means the service does not produce this evidence category. The "Combined + SWT3" column shows what becomes available when witness anchors supplement native AWS capabilities.

10. References

Related SWT3 Guides

AWS Documentation

Regulatory References

Protocol