Organisations should treat retirement as a controlled decommissioning event. Remove integrations, handle stored or processed data under retention policy, and validate that users have moved to a replacement workflow without leaving shadow dependencies behind. If deprecation is rushed, residual access and data handling risk often outlives the model itself.
Why This Matters for Security Teams
Retiring an AI model is not just an application change. It is a lifecycle control event that affects secrets, data retention, user workflows, auditability, and downstream systems that may still trust the model. When replacement is rushed, the old model often remains reachable through scripts, hidden integrations, cached tokens, or forgotten automation, which creates a long tail of risk after the deprecation date.
This is especially important because model retirement can expose the same weaknesses seen in broader secrets and access hygiene. NHIMG research notes that only 44% of developers follow security best practices for secrets management in the State of Secrets in AppSec report by GitGuardian & CyberArk, which helps explain why legacy credentials and hard-coded integrations linger. Security teams should also align decommissioning with the NIST Cybersecurity Framework 2.0 so retirement is handled as a governed process, not an informal cutover.
In practice, many security teams discover residual model access only after a replacement has already gone live and production dependencies begin failing or leaking data.
How It Works in Practice
Model retirement should follow a controlled sequence. First, inventory every place the model is called: applications, agents, notebooks, pipelines, API gateways, and scheduled jobs. Then freeze new access, disable write paths where possible, and confirm which secrets, service accounts, or tokens exist only to support that model. Those credentials should be revoked or rotated as part of the cutover, not left to expire on their own.
Next, separate operational decommissioning from data governance. Output logs, prompts, embeddings, fine-tuning artifacts, and cached responses may all be subject to retention, deletion, or legal hold. Current guidance suggests treating those artefacts as distinct data classes because each one has different ownership and deletion requirements. If the model is being replaced, users should be migrated to the new workflow with explicit validation that no shadow use remains.
- Map all model dependencies before announcing the retirement date.
- Revoke API keys, service principals, and automation tokens tied to the old model.
- Archive or delete logs, prompts, and outputs according to retention policy.
- Verify that prompts, agents, and applications now point to the replacement endpoint.
- Monitor for legacy calls after cutover and treat them as stale dependency signals.
For organisations managing AI systems with embedded non-human identities, NHIMG’s DeepSeek breach is a reminder that exposed or lingering access can amplify the blast radius long after a system should have been closed. Decommissioning should therefore include secret discovery, access review, and validation that no automation still trusts the retired endpoint. These controls tend to break down when the model is embedded in distributed agent workflows because hidden tool calls and cached credentials are harder to find than direct application integrations.
Common Variations and Edge Cases
Tighter retirement controls often increase operational overhead, requiring organisations to balance fast cutover against the risk of leaving stale access behind. That tradeoff becomes more acute when a model is shared across teams, embedded in a vendor workflow, or used by autonomous agents that do not have a single obvious owner.
Where the model powers an agentic system, decommissioning may require more than endpoint removal. The agent may have cached instructions, stored credentials, or workflow memory that still references the retired model. Current guidance suggests treating those dependencies as part of the identity and authorisation boundary, not just the application boundary. There is no universal standard for this yet, but best practice is evolving toward explicit dependency maps, short-lived credentials, and runtime policy checks.
Edge cases also include compliance holds, regulated retention, and dual-running old and new models during migration. In those situations, the retired model may need to stay isolated but not fully removed until legal or business constraints expire. Security teams should document the exception, restrict access to the minimum set of operators, and set a hard review date so temporary coexistence does not become permanent.
If the old model was used by external customers, publish a sunset notice, confirm replacement API compatibility, and watch for late traffic spikes from unupdated clients. Retirement only looks complete when monitoring shows the old path is dead and the replacement path is the only trusted route.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while NIST CSF 2.0 and NIST AI RMF set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Model retirement often fails through lingering secrets and stale NHI access. |
| NIST CSF 2.0 | PR.DS-3 | Retirement includes controlled handling of data at end of life and retention rules. |
| NIST AI RMF | AI RMF covers governance for safe model lifecycle changes and decommissioning. |
Define ownership, review, and rollback criteria before retiring or replacing the model.
Related resources from NHI Mgmt Group
- How should organisations offboard a shadow AI tool that was connected to company systems?
- How should organisations offboard an AI agent when a workflow changes?
- How can organisations reduce the risk of stale API keys and machine tokens?
- How should organisations handle privileged access when workloads and AI systems are part of the model?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on June 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org