
Essay BAA Requirements
PHI Redaction Before LLM Submission: Obligation, Not Option
When redacting PHI before sending prompts to an external LLM provider becomes a HIPAA obligation rather than a best practice, and how to enforce it.
Preventing sensitive customer data from reaching an external model requires inspection and redaction before provider submission, at a gateway independent of the application. For healthcare deployments, sending PHI is both a disclosure under HIPAA and a security risk. Where that disclosure is not permitted, de-identification must happen before transmission. A signed BAA supports permitted processing but does not replace technical controls or evidence of enforcement.
Why sending PHI to an LLM endpoint without prior redaction is a HIPAA disclosure event, not a security lapse
45 CFR § 164.502 restricts uses and disclosures of protected health information. Sending an identifiable patient’s diagnosis or treatment plan to an external inference endpoint crosses that disclosure boundary, even when the recipient is a trusted vendor. No breach is needed to trigger the rule. The disclosure occurs when the PHI reaches the external service.
That distinction separates a disclosure from an unauthorized disclosure. HIPAA allows some disclosures, including business-associate processing under the right rules, and patient authorization can also allow a disclosure. Transmission of an unredacted prompt containing PHI therefore requires a permitted basis. Vendor familiarity supplies no such permission.
Once data is properly de-identified, it is no longer PHI and the Privacy Rule’s PHI disclosure restrictions no longer apply. Deleting an obvious name alone does not make the data de-identified. Where the destination cannot lawfully receive PHI, the legally significant control must operate before submission.
What a BAA actually covers, and the gap it cannot close
A business associate agreement establishes the vendor’s contractual obligations when it handles PHI. Those obligations address permitted processing, retention and deletion, and security controls consistent with the Security Rule. Training restrictions also govern how the provider may use customer data. The contract does not inspect a single prompt. The deployer still needs controls that work for redaction, access governance, encryption, and audit logging.
The strongest objection is straightforward. If the vendor signs a BAA and promises not to train on customer data, is that sufficient protection? It is not sufficient to establish deployment-wide compliance, because the agreement does not establish that every request has a permitted purpose, reaches a covered endpoint, or contains only necessary information. A no-training promise governs subsequent use.
The distinction also shapes procurement. Click-through BAAs can be faster to establish, while negotiated agreements let deployers set indemnity terms, breach notification timelines, and sub-processor approval rights. Larger health systems often require negotiated terms. With either approach, the agreement’s limits must be enforced in production, and de-identification is not always required when PHI processing is otherwise allowed.
The five paths PHI takes into LLM traffic, and why application-layer redaction fails to close them
PHI enters LLM traffic through direct prompts, retrieved context, tool results, request logs and exports, and fallback routing. Each creates a separate disclosure surface. A redactor attached only to the user’s prompt field cannot consistently inspect material added later by retrieval or tools. Logs also become PHI when they keep context that can identify a patient, even if the user interface looks clean.
Consider a nurse pasting a clinical note containing a room number, MRN, relative’s name, discharge date, and phone number. A simple phone-number regex catches one of those elements. The remaining context still requires inspection. A structured-field redactor can miss the entire note when the application’s redaction logic does not enumerate that free-text field.
Application-level enforcement has further structural weaknesses. A debug toggle promoted into production can expose raw PHI because the component sending the prompt also controls whether redaction runs. Responses can contain PHI inferred from context, while application redactors often inspect only requests. Automatic fallback adds another boundary failure when a primary provider’s outage sends traffic to an endpoint without a BAA.
Retention broadens the exposure beyond inference itself. Zero data retention requires explicit provider arrangements or configuration rather than an assumption that prompts and outputs disappear. AWS Bedrock provides a self-service setting, while OpenAI requires an approved request. Google Vertex AI must be configured and have an abuse-monitoring exception request, or be covered under a Cloud Master Agreement.
Why hashed placeholders and naive tokenization do not satisfy HIPAA's re-identification standard
HIPAA permits a re-identification code only when it is “not derived from or related to information about the individual.” A SHA-256 hash of a patient’s name fails that test. An attacker can hash candidate names and compare results. The placeholder conceals the original text without breaking its derivation from the individual’s information.
A data protection authority’s 2025 pseudonymisation guidelines make a related distinction under a different legal framework. Pseudonymised data remains personal data when additional information can attribute it to a person. Operational convenience is not equivalent to de-identification. An unfamiliar token says little about whether the data around it can still identify a person.
Random tokens scoped to a session avoid deriving the replacement from the underlying value, but token choice alone does not complete de-identification. Detection must cover all 18 Safe Harbor identifiers. Validated regex can identify phone numbers and strings matching government identification number formats, named entity recognition can detect names and addresses, and schema-specific recognizers can find MRNs, encounter IDs, and dates of service.
Responses, tool-call arguments, streamed output, and logs can also contain information that identifies a person. Substituting tokens in one input field leaves those surfaces untouched.
That distinction separates a disclosure from an unauthorized disclosure.
How do you enforce sensitive data redaction at the gateway layer?
A defensible gateway sits between every application and the external model endpoint, with enforcement independent of the application producing the request. It inspects prompts regardless of their source. Its policy applies a deterministic PHI classifier and decides whether to redact, block, or allow the request. Versioning ties that decision to the rule in force at the time.
Structured validation, named entity recognition, and organization-specific recognizers address different identifier classes. The same inspection requirement extends to outputs and logs. Otherwise, the gateway protects submission while leaving another PHI surface outside enforcement.
The evidence record must capture the timestamp, workforce member or role identity, prompt classification, redaction or block decision, and policy version. It must also identify the model, endpoint, and sub-processor route, with tamper-evident hashes of the prompt and response. The record is committed before the response returns. These details connect a particular disclosure to both its destination and its authorization.
Routing policy completes the boundary. PHI fallback chains must remain among BAA-covered providers on the same virtual key, and zero data retention must be enforced for every request under the applicable provider arrangements. A managed gateway can centralize these controls with RBAC, SSO, and audit logs. A self-hosted open-source proxy can implement the same pattern, but its engineering team retains the operational burden.
Which providers can sit inside a compliant envelope in practice
HIPAA compliance belongs to the deployment. BAA coverage is available through Anthropic’s API and its AWS Bedrock and Google Vertex routes, OpenAI Enterprise, Azure OpenAI, Google Vertex AI, AWS Bedrock, Together AI Enterprise, and Fireworks Enterprise. Bedrock eligibility must be verified for each model. A provider name alone is not enough to authorize a route.
OpenAI’s ChatGPT for Healthcare includes a BAA, no training on customer data, and healthcare-specific administrative controls. Its Free and Plus consumer tiers do not include a BAA. Claude.ai free and Gemini consumer also fall outside BAA coverage. An enterprise agreement with the same vendor does not extend automatically to workforce use of its consumer endpoints.
DeepSeek’s hosted API does not offer a BAA. PHI workloads using its open-weights model therefore require self-hosting inside a HIPAA-aligned VPC or a US-jurisdiction third-party host that offers a BAA. The gateway’s allowlist translates those contractual differences into enforceable routing boundaries, including during outages.
The enforcement record that OCR actually requests during an investigation
HHS Office for Civil Rights audits examine records of PHI disclosures, the safeguards applied, and the policies authorizing those disclosures. Scope can extend across months or years. A policy document says what should happen, while operational records show what did happen. Application logs alone cannot reliably reconstruct missing classification decisions, policy versions, and routes after the event.
OCR’s March 2026 settlement with MMG Fusion, LLC concerned a breach affecting millions of individuals and marked its 12th enforcement action in the Risk Analysis Initiative. OCR Director Paula M. Stannard stated that the initiative continues in 2026. The case supports the importance of documented risk analysis. It does not establish that OCR mandated a particular AI gateway product or a universal prompt-log schema.
The 2024 Gulf Coast Pain Consultants settlement, the 2025 Solara Medical settlement, and the 2025 Warby Parker civil money penalty also identify failures in accurate and thorough risk analysis. State Attorneys General also enforce HIPAA, extending exposure beyond federal action.
For AI deployments, the practical implication is evidentiary. A gateway record for each request links the safeguard, policy, identity, and destination as the request is processed.
Build-versus-buy for the gateway enforcement layer in a HIPAA context
LiteLLM has an open-source Python SDK and proxy with a shared provider interface, virtual keys, spend tracking, and a dashboard for administration. SSO, audit logs, and RBAC are in its paid Enterprise tier. The open-source feature set and the required compliance control set are therefore different procurement questions.
LiteLLM Enterprise adds SSO and SCIM, OIDC/JWT authentication, secret manager integration, key rotation, and organization and team administration. It also provides a multi-region control plane and support with SLAs. Standard support comes with it, but premium support costs extra. An organization requiring SCIM deprovisioning and an audit trail should evaluate Enterprise as an annual capacity contract rather than assume the open-source proxy supplies those controls.
Self-hosting also requires Redis, Postgres, monitoring, and on-call coverage. That work needs assigned engineering capacity. The approach is well suited to teams seeking full infrastructure control that already operate supporting services at scale and have dedicated DevOps or platform staff. For smaller and mid-sized teams, engineering time can outweigh the apparent infrastructure savings.
PHI redaction, zero data retention enforcement, RBAC, SSO, audit logs, and paid-plan BAA coverage can be obtained without operating the proxy. The comparison must cover the full set of controls and the work to maintain them, along with how easy they are for developers to use. The choice depends on whether the platform team’s time should go toward running the gateway or engineering the product.
What a compliant AI deployment in a HIPAA context actually requires at each layer
At the contractual layer, every provider touching PHI needs appropriate BAA coverage, including fallback providers and relevant sub-processors. At the provider layer, zero data retention must be configured under the applicable terms. Encryption must protect data in transit and at rest. These controls answer different questions, so one cannot stand in for another.
At the request layer, prompts must contain only what the clinical task requires under the applicable minimum-necessary standard. Even with redaction, collecting or submitting more than is needed is not allowed. Attaching an entire patient chart when a summary suffices creates a separate minimization problem. De-identification before inference must remove identifying information rather than merely disguise it with derived placeholders.
At the access and evidence layer, role-based controls and per-request audit records must show who initiated processing, which policy applied, and where the request went. Provider allowlists must exclude uncovered consumer endpoints from PHI workflows. A written breach notification process sets out what to do when prevention fails. Risk analysis, workforce training, and written policies need records that show how they are put into practice.
For a small healthcare team, readiness means these layers exist when the service begins processing patient information. Managed gateways with paid-plan BAAs provide one route to that starting point, while staffed self-hosting provides another. The acceptance test is concrete. The deployment can demonstrate permitted destinations, minimized requests, enforced safeguards, traceable decisions, and an assigned response process for failures.
Notes
- Why HIPAA Compliance for Employee LLM Use Breaks Down Without a Centralized Redaction Chokepoint
Informed the article's core argument that PHI redaction must occur at a centralized gateway layer independent of individual applications, rather than relying on application-level controls.


