1. The Serverless Evidence Gap
When you deploy a model on your own infrastructure, you have access to server logs, request traces, GPU metrics, and container state. You have too much data and need to distill it into compliance evidence.
Serverless inference is the opposite problem. DigitalOcean manages the infrastructure. You send a request, get a response, and the serving environment is ephemeral. There are no server logs to subpoena, no container state to inspect, no GPU metrics to export. The infrastructure that ran your inference does not belong to you.
Under EU AI Act Article 12, deployers must maintain logs that demonstrate the AI system operated as intended. Under Article 26, deployers of GPAI-based systems bear transparency obligations independent of the model provider. DigitalOcean provides an excellent inference platform, but platform uptime is not compliance evidence.
The solution is straightforward: wrap your inference calls with a witness that captures the provenance of every request at the application layer, where you have full control regardless of who owns the GPU.
2. Model Routing and the Provenance Problem
DigitalOcean Inference Engine supports 70+ models across serverless, dedicated, and routed deployments. The platform includes inference routing that can match requests to optimal models based on cost, latency, and capability.
This creates a specific governance challenge: when a router selects the model, the developer may not know which model actually served a given request. The model you requested and the model that responded may differ. For compliance purposes, the model that actually ran is the one that matters.
witness.wrap() solves this by capturing the model field from the API response, not the request. If a router sends your request to deepseek-v4-flash instead of kimi-k3, the witness anchor records what actually happened.
3. 3-Line Integration
DigitalOcean Inference uses OpenAI-compatible endpoints. Point the standard OpenAI SDK at DO's base URL and wrap with SWT3.
Python
import os
from openai import OpenAI
from swt3_ai import Witness
client = OpenAI(
base_url="https://inference.do-ai.run/v1",
api_key=os.environ["DO_API_KEY"]
)
witness = Witness(agent_id="do-inference-prod")
response = witness.wrap(client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": prompt}]
))
TypeScript
import OpenAI from 'openai';
import { Witness } from '@tenova/swt3-ai';
const client = new OpenAI({
baseURL: 'https://inference.do-ai.run/v1',
apiKey: process.env.DO_API_KEY
});
const witness = new Witness({ agentId: 'do-inference-prod' });
const response = await witness.wrap(client.chat.completions.create({
model: 'kimi-k3',
messages: [{ role: 'user', content: prompt }]
}));
The witness adds sub-millisecond overhead. No proxy, no sidecar, no infrastructure changes. The base_url stays pointed at DigitalOcean. The evidence stays with you.
4. What Gets Witnessed
| Factor | Source | What It Proves |
|---|---|---|
model_id | Response model field | Which model actually served the request (critical for routed deployments) |
provider | Base URL detection | DigitalOcean Inference Engine was the serving platform |
prompt_tokens | Response usage | Input token count for cost and scope tracking |
completion_tokens | Response usage | Output token count for cost and scope tracking |
latency_ms | Client-side timing | End-to-end response time for performance monitoring |
clearing_level | Witness configuration | Data sensitivity classification (0=Analytics through 3=Classified) |
agent_id | Witness initialization | Which application instance made the request |
fingerprint | SHA-256 derivation | Immutable anchor linking all factors into a single verifiable record |
At Clearing Level 2 and above, prompt and response content are excluded from the witness anchor. The factors above are metadata only. No PII passes through the witness pipeline.
5. Procedure Coverage
Inference Provenance
DigitalOcean provides: Model hosting, OpenAI-compatible API, serverless scaling, inference routing.
SWT3 witnesses: Which model served the request, token counts, latency, and the agent_id of the calling application. Every inference call through DigitalOcean produces a verifiable anchor that proves which model ran, when, and for whom.
Query AI-INF.1 anchors filtered by provider. The model_id in factor_a should match the organization's approved model list. Any model_id outside that list indicates an unapproved model was served by the router.
Guardrail Attestation
The governance gap: Kimi K3 and other open-weights models on DigitalOcean do not include provider-side content filtering. Unlike Claude or GPT-4, there are no built-in safety filters. Deployers must implement their own guardrails (Llama Guard, NeMo Guardrails, custom classifiers) and prove they were active at inference time.
SWT3 witnesses: Guardrail evaluation result (pass/block/modify), guardrail version, and configuration hash. This turns "we have guardrails deployed" into "guardrails evaluated this specific request and produced this specific result."
Present AI-GRD.1 anchors alongside AI-INF.1 anchors for the same time period. Continuous pairing (every inference has a matching guardrail record) demonstrates that guardrails were active for every request, not just during testing.
Logging Integrity
The serverless challenge: Serverless environments do not guarantee log persistence. Application-layer witnessing creates a durable evidence trail independent of infrastructure lifecycle.
SWT3 witnesses: Every anchor is a log entry that survives infrastructure teardown. The Merkle rollup aggregates daily anchors into a single root hash, providing tamper-evident proof that logs were not modified after the fact.
For audit periods, present the daily Merkle roots from the rollup table. Each root is a single tamper-evident hash covering all anchors minted that day. The root hash proves no anchors were added, removed, or modified after rollup.
6. Quick Reference for Examiners
| Examiner Question | Where to Look |
|---|---|
| Which model served each request? | AI-INF.1 anchor factor_a contains the actual model_id from the response |
| How do you maintain logs on serverless infrastructure? | SWT3 anchors are application-layer evidence, independent of infrastructure lifecycle |
| Were guardrails active for open-weights models? | AI-GRD.1 anchors paired with AI-INF.1 for continuous coverage verification |
| Can you prove which provider hosted inference? | Provider field in anchor metadata, derived from base URL at call time |
| What about PII in witness records? | Clearing Level 2+ excludes all prompt/response content. Anchors contain metadata only. |
| Can I verify an anchor independently? | sovereign.tenova.io/verify for any SWT3 anchor fingerprint |
7. References
- DigitalOcean Inference Engine Documentation
- Kimi K3 Self-Hosted Compliance Witnessing (the companion guide for on-premises deployments)
- Self-Hosted Quickstart (air-gapped and private endpoint deployments)
- NVIDIA NeMo Guardrails Witnessing (guardrail evidence for open-weights models)
- SDK Documentation (9 languages, 21 adapters)
- Machine-Readable Crosswalks (JSON)
Full SDK docs: sovereign.tenova.io/docs | Free tier: sovereign.tenova.io/signup