AI Governance in Healthcare: HIPAA Requirements for LLM Applications
TL;DR
- AI governance in healthcare for LLM applications means controlling which providers may receive protected health information (PHI), under which business associate agreements, with what redaction, and with what record of every request.
- PHI reaches LLM traffic through five paths: direct prompts, retrieved context, tool results, request logs and exports, and fallback routing to a provider that has not signed a BAA.
- Each HIPAA Security Rule technical safeguard maps to a control an AI gateway can enforce once rather than in every application.
- Bifrost enforces provider allowlists, PHI redaction, budgets, role-based access, and signed audit logs for all LLM and MCP traffic, adding 11 microseconds of overhead per request at 5,000 RPS.
- Nothing in this article is legal advice; a HIPAA program still needs a risk analysis, policies, training, and counsel.
AI governance in healthcare is the set of policies and technical controls that decide which LLM providers, models, and tools may process clinical and administrative data, under what contracts, and with what record of each request. Most healthcare engineering teams enforce those decisions inside individual applications, so the same PHI handling logic is rewritten for every application. Bifrost, the open-source AI gateway built in Go by Maxim AI, moves that enforcement to a single point, and it is built for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. This article covers the HIPAA requirements for LLM traffic and how a governance layer at the gateway satisfies them.
This article is not legal advice. HIPAA obligations depend on whether an organization is a covered entity or business associate, on the data involved, and on state law. Confirm decisions with privacy counsel.
What AI Governance in Healthcare Means for LLM Applications
AI governance in healthcare is the framework of policies, contracts, and technical controls that determines how AI systems may access, process, and retain patient data. For LLM applications it narrows to four operational questions: which providers may receive PHI, what gets redacted before transmission, who may call which model, and what evidence exists afterward.
Published frameworks for AI governance in regulated sectors focus on model risk, bias review, and clinical validation. This article stays on the infrastructure layer, where platform teams decide how PHI moves between an application and a model provider.
LLM applications differ from earlier healthcare software in one way: the data leaves the organization's boundary on every request, and a prompt containing a patient's name and diagnosis is a disclosure of PHI to whoever operates the model endpoint. An AI gateway for healthcare AI applications is the natural place to govern that disclosure, because it is the last component under the organization's control before the request leaves.
HIPAA and AI: Which Rules Apply to LLM Traffic
HIPAA applies to LLM traffic whenever a prompt, retrieved document, tool result, or model response contains PHI and the organization is a covered entity or business associate. Three parts of the regulation matter to an engineering team: the minimum necessary standard, the Security Rule's safeguards, and the business associate provisions.
The Security Rule requires administrative, physical, and technical safeguards for electronic PHI. Its technical safeguards name five standards: access control, audit controls, integrity, person or entity authentication, and transmission security.
The business associate provisions are the part most often misread in LLM projects. HHS business associate guidance states that a covered entity may disclose PHI to a business associate only after obtaining satisfactory assurances in the form of a contract or other written arrangement. A model provider that receives PHI on the organization's behalf is a business associate, and sending it PHI without a business associate agreement (BAA) is a disclosure without assurances. The job of AI governance and compliance tools is to make that impossible by configuration rather than by convention.
How PHI Data Leaks Into LLM Traffic: Five Paths
PHI data enters LLM traffic through five distinct paths, and application-level controls usually cover only the first. Direct prompts are the obvious one. Retrieved context, tool results, request logs, and fallback routing are the four that platform teams discover during an audit rather than during design.
| Path | How PHI enters | Gateway control that closes it |
|---|---|---|
| Direct prompts | Staff paste a chart note into a chat app, or an application builds a prompt from an EHR record | Input guardrails that redact or block before egress |
| Retrieved context | A RAG pipeline injects clinical documents into the context window | Input guardrails scanning the full request, not only the user turn |
| Tool results | An MCP tool queries a patient database and returns rows into the conversation | MCP guardrails on tool arguments and results |
| Logs and exports | Request and response bodies are stored in the log store and exported to tracing | Redaction applied to logs and exports, retention limits |
| Fallback routing | A provider outage triggers failover to a provider with no BAA | Provider and model allowlists on the virtual key that the fallback chain cannot override |
The third path is new: an agent does not need PHI in its prompt to disclose PHI; it only needs a tool that returns it. The control guide for an MCP gateway in regulated industries covers this in depth. In Bifrost, guardrail rules carry a target of llm or mcp, and an MCP rule can inspect or redact tool arguments before execution and tool results after it.
The fourth path turns a single disclosure into a permanent one: a prompt retained in three logging systems for a year is a stored PHI copy in each. PII redaction at the gateway layer for regulated industries has to cover logs and exports, not only the outbound request, or the logs become the breach.
Mapping HIPAA Technical Safeguards to Gateway Controls
Each HIPAA technical safeguard maps to a control that a gateway can apply once, for every application behind it. The mapping below pairs the five Security Rule standards with the corresponding Bifrost feature. Administrative safeguards such as risk analysis and workforce training remain outside the gateway.
| HIPAA safeguard (45 CFR 164.312) | What it requires | Bifrost control |
|---|---|---|
| Access control | Only authorized persons and software may access ePHI | Virtual keys with allowed_models per provider, attached to a team or customer |
| Audit controls | Record and examine activity in systems that use ePHI | Request logging for traffic; audit logs for configuration changes |
| Integrity | Protect ePHI from improper alteration or destruction | HMAC-signed audit events; encrypted redaction mappings gated by the Logs:Reveal permission |
| Person or entity authentication | Verify the identity of anyone seeking access | OIDC user provisioning with role-based access control |
| Transmission security | Guard against unauthorized access to ePHI in transit | In-VPC deployment and runtime redaction before egress |
One administrative safeguard also has gateway support. Information access management, which applies the minimum necessary principle, is enforced through data access control, which scopes every dashboard and API result set to the caller's own rows, team rows, or all rows based on role.
An organization running six LLM applications gets six implementations of each row unless a gateway provides one, which is why best practices for AI governance converge on centralizing the control and letting applications inherit it.
Business Associate Agreements and LLM Provider Selection
A BAA with a model provider is a prerequisite for sending it any PHI, and the BAA's scope, not the provider's brand, determines which endpoints, regions, and retention settings are covered. Provider selection therefore starts with contract scope and ends with a configuration that prevents traffic from reaching any endpoint outside it.
The scope question is concrete. OpenAI, for example, offers a BAA for most API services and for sales-managed ChatGPT Enterprise and Edu accounts, but not for ChatGPT Business, so a team with an API BAA that also lets staff use a consumer chat product has a covered path and an uncovered path to the same vendor. Bifrost supports 25+ providers and 10,000+ models through one OpenAI-compatible API, so the question is which providers the governance configuration permits.
| Provider selection question | Why it matters under HIPAA | How to encode it in Bifrost |
|---|---|---|
| Is a BAA signed for this provider and account? | PHI may only be disclosed under written assurances | Configure only BAA-covered provider keys; omit the rest from the virtual key's key_ids |
| Which endpoints and models does the BAA cover? | A BAA can exclude specific services | Restrict allowed_models per provider on each virtual key |
| Which regions may process the data? | Data residency clauses in the BAA or state law | Route through cloud-hosted providers such as AWS Bedrock configured in approved regions |
| Does the provider retain prompts, and for how long? | Retention extends the disclosure | Prefer zero-retention configurations where offered; apply runtime redaction regardless |
| What happens when the provider is down? | Fallback to an uncovered provider is an unauthorized disclosure | Define fallback chains only among BAA-covered providers on the same virtual key |
| Can the workload stay inside the network? | Removes the third-party disclosure entirely | Self-hosted models via vLLM behind the same gateway |
The last row has an architectural consequence. Self-hosting a model removes one business associate, not the need for governance: access control, audit controls, and redaction in logs still apply to the organization's own workforce. Running self-hosted and BAA-covered hosted models behind one gateway keeps the policy identical across both.
HIPAA Compliant AI: What the Label Does and Does Not Cover
"HIPAA compliant AI" describes a vendor's willingness to sign a BAA and operate under the Security Rule; it does not describe the compliance status of the application built on top of it. Compliance attaches to the covered entity's whole program: risk analysis, policies, workforce training, and the technical controls around each system.
This matters when evaluating HIPAA compliant AI tools, because vendor marketing collapses two claims. The first, that the vendor will sign a BAA, is checkable in a contract. The second, that using the vendor makes an application compliant, is never true on its own.
A gateway closes that gap. In the Bifrost Enterprise deployment model, the platform team encodes the BAA boundary once as provider allowlists, guardrail rules, and retention settings, and every application inherits it by pointing at the gateway URL.
How Bifrost Enforces AI Governance in Healthcare at a Single Point
Bifrost enforces AI governance in healthcare by sitting between every application and every model or tool provider, applying identity, access, redaction, budget, and logging policy to each request before it leaves the network. Because the gateway is the only egress path, a policy configured once applies to every application identically.
The enforcement stack, in request order:
- Identity and authorization. Users arrive through OIDC provisioning, carry a role from RBAC, and see only the rows their data access scope permits. Inference requests authenticate with a virtual key, an API key, or a user token, each resolving to an owner whose scope applies.
- Provider and model allowlists. Each virtual key names the providers,
allowed_models, and provider API keys it may use. Access profiles apply one provider, model, budget, rate-limit, and MCP policy to many virtual keys at once, so a "BAA-covered clinical" profile reaches every clinical team without per-key edits. - Input guardrails. Guardrail rules written in CEL decide which requests are scanned and by which profiles. Bifrost ships three managed providers (Prompt Guardrails, Custom Regex, Secrets Detection) and integrates ten external ones, including Microsoft Presidio and Azure AI Language PII.
- Budgets and rate limits. Budgets and rate limits at the virtual key, team, and customer level cap spend and throughput.
- Output guardrails and logging. Responses are scanned by output rules, redacted where configured, and logged with the same redaction applied.
Bifrost adds 11 microseconds of overhead per request at 5,000 requests per second with a 100% success rate in sustained benchmarks, so the enforcement point is not a latency argument against governance.
For organizations that cannot allow PHI to traverse a vendor-hosted control plane, Bifrost runs in-VPC on AWS, GCP, or Azure, or on-premises in air-gapped environments. The healthcare and life sciences deployment pattern is this stack with clinical and administrative traffic separated by virtual key and team.
PHI Redaction at the Gateway: What Bifrost Detects and What It Does Not
Bifrost redacts PHI by rewriting text that a guardrail provider detects, using a configurable action, strategy, and mode, and applies that rewrite to the live request, to Bifrost logs, and to trace exports. Redaction is only as good as detection, so an honest description of PHI coverage starts with which detector is configured.
- Custom Regex runs in-process with Go's RE2 engine. Its built-in PII Detection template ships five patterns: email address, US phone number, US Social Security Number, credit-card-like number, and IPv4 address. It does not detect names, medical record numbers, dates of service, or addresses unless an organization adds its own patterns.
- Microsoft Presidio is a self-hosted or privately deployed analyzer with configurable entity filters (for example
PERSON,EMAIL_ADDRESS,PHONE_NUMBER) and a score threshold, for entity-level detection without a cloud PII service. - Azure AI Language PII supports category filtering and a
domain: "phi"setting that enables Azure's protected health information domain where the service supports it.
The HHS Safe Harbor method lists 18 identifier categories that must be removed for data to count as de-identified, including names, dates, and medical record numbers. No regex template covers that list; a healthcare deployment needs an entity-level detector plus custom patterns for formats such as MRN structures. Gateway redaction reduces the PHI that leaves the network; it is not a de-identification determination.
| Redaction mode | Live request and response | Bifrost logs and trace exports | Reveal possible |
|---|---|---|---|
runtime |
Redacted with replace, mask, or hash |
Redacted the same way | No |
logs_only |
Left unchanged | Reversible placeholders such as [EMAIL-1] |
Yes, Bifrost logs only |
runtime_reversible |
Reversible placeholders | Reversible placeholders | Yes, Bifrost logs only |
Three details of the redaction behavior matter for a HIPAA program. Reveal requires the Logs:Reveal permission and is scoped to Bifrost logs; the mapping is never exported and is encrypted at rest when a key is configured. Redaction is text-based and does not inspect images, audio, or binary content, so scanned-document workflows need a separate control. For streaming responses, runtime redaction checks buffered segments before releasing them.
HIPAA Audit Logs and Retention for LLM Traffic
HIPAA audit controls for LLM traffic require two separate records: a log of the requests themselves, and a log of who changed the configuration that governed them. Bifrost keeps these as distinct systems.
Request logs live in the log store and record provider, model, latency, token counts, cost, status, and, unless disable_content_logging is set, request and response content. Retention is set with log_retention_days. Large payloads can be offloaded to S3 or GCS, the only two supported destinations today, and object_storage_exclude_fields can keep raw prompts out of the offload entirely.
Audit logs record administrative activity: who created, updated, or deleted a virtual key, guardrail rule, role, or provider configuration, with initiator, target, outcome, path, and IP. They are not request logs. Entries can be HMAC-signed, retained for a configured number of days, exported as JSON, JSON Lines, or Syslog, and archived to S3 or GCS for long-term retention.
Both records feed the governance workflow an auditor expects: the request log shows that traffic went only to BAA-covered models with redaction applied, and the audit log shows that nobody widened the allowlist the week before. The minimum necessary standard also governs who can read these logs, which is where data access control and the Logs:Reveal permission apply.
AI Governance and Compliance Checklist for Healthcare LLM Deployments
An AI governance and compliance checklist for healthcare LLM deployments has to cover contract scope, egress control, redaction, identity, logging, and retention, in that order, because each item constrains the next. The list below is the order in which platform teams typically configure Bifrost.
- Inventory every LLM provider, model endpoint, and MCP tool in use, including desktop and browser tools staff use directly.
- Confirm a signed BAA for each provider that will receive PHI, and record which endpoints, regions, and retention settings it covers.
- Configure only BAA-covered provider keys in the gateway, and route all application traffic through it.
- Create virtual keys or access profiles per team with
allowed_modelsrestricted to the covered set, and define fallback chains only within it. - Attach an entity-level PHI detector plus custom regex patterns for organization-specific identifiers, with
action: "redact"set explicitly. - Add MCP guardrail rules for any tool that touches patient or member data, scanning both arguments and results.
- Integrate the identity provider, assign roles, and set data access scope so logs, keys, and prompts are visible only to their owning teams.
- Set request log retention, disable content logging where not needed, enable signed audit logs, and review them for allowlist and guardrail changes on a fixed cadence.
The complete guide to AI governance for enterprise LLM deployments extends this checklist beyond healthcare; the items above are where HIPAA turns a recommendation into an obligation.
Frequently Asked Questions
Is ChatGPT HIPAA compliant?
Consumer ChatGPT is not covered by a BAA, and OpenAI does not offer one for ChatGPT Business, so PHI entered there is an unauthorized disclosure. OpenAI does offer a BAA for most API services and for sales-managed ChatGPT Enterprise and Edu accounts. Even under a BAA, the application remains responsible for access control, redaction, and audit logging.
What are the four pillars of AI governance?
Frameworks differ, but most healthcare AI governance programs organize around accountability (who owns each system), transparency (how data flows are documented), fairness and safety (clinical validation and bias review), and privacy and security (HIPAA safeguards and contracts). An AI gateway implements the fourth pillar's technical controls and produces the records the first two require.
What counts as PHI in an LLM prompt?
PHI is individually identifiable health information held by a covered entity or business associate. In a prompt, that includes any of the 18 Safe Harbor identifiers (names, dates other than year, medical record numbers, phone numbers, and others) combined with health information. A chart note with the name removed but the date of service and a rare diagnosis intact is still likely PHI.
Does a BAA with the LLM provider make an application HIPAA compliant?
No. A BAA provides the written assurances HIPAA requires before disclosing PHI to a business associate, and it commits the provider to the Security Rule. Compliance still depends on the covered entity's own access controls, audit controls, redaction, workforce training, and risk analysis. A gateway enforces the technical portion of that list; it does not replace the program.
Can an open-source AI gateway be used for HIPAA workloads?
Yes, provided it runs inside the organization's controlled environment and provides the required technical safeguards. Bifrost deploys in-VPC or on-premises, so no PHI passes through a vendor-hosted control plane. The features a HIPAA program depends on, including guardrail redaction, RBAC, data access control, and signed audit logs, are part of Bifrost Enterprise, a strict superset of the open-source gateway.
How should PHI be redacted before it reaches a model provider?
Configure an entity-level detector such as Presidio or Azure AI Language PII, set action: "redact" explicitly, and choose runtime mode so detected text is rewritten before the request leaves the gateway. Add custom regex patterns for identifiers the detector does not know, such as internal MRN formats, apply the same rules to MCP tool results, and confirm that logs and trace exports receive the redacted content.
Getting Started with AI Governance in Healthcare on Bifrost
AI governance in healthcare comes down to enforcing the BAA boundary, redacting PHI before egress, authenticating every caller, and producing the records an auditor will ask for. Bifrost applies all four at a single enforcement point, with provider allowlists, guardrail redaction, RBAC, and signed audit logs configured once and inherited by every application. To see how a HIPAA-aligned gateway deployment fits your clinical and administrative workloads, book a demo with the Bifrost team.