Back to blog
    Model Versioning, Rollback, and Drift: The Production Controls Your Vendor Doesn't Give You
    model-versioningmodel-driftai-productionmlopsmodel-governance

    Model Versioning, Rollback, and Drift: The Production Controls Your Vendor Doesn't Give You

    Software teams have git. CI/CD. Feature flags. Rollback strategies. AI teams depending on cloud APIs have none of that. Here's the production control gap most teams don't notice until it's too late.

    EErtas Team·

    Every engineering team knows how to manage production software. You pin dependency versions. You use semantic versioning. You have a rollback plan for every deployment. You run canary deployments for risky changes. You monitor your production system and you have runbooks for failure modes.

    Then you integrate a cloud AI API and abandon all of it.

    The AI model becomes the exception to every software production discipline you've built. The model version isn't pinned in any meaningful sense. Rollback isn't possible. Behavioral change monitoring requires custom tooling you've probably never built. And when something goes wrong — a silent model update shifts behavior in a way that breaks downstream logic — you find out from a user complaint.

    This is a widespread problem, and it's underappreciated because AI failures often look like degraded quality, not system failures. The API is still returning 200s. The latency is fine. But the outputs are different in ways that matter.

    What Happens When Model Behavior Changes

    Let's be concrete about what behavioral drift looks like in production.

    A legal AI document summarizer produces summaries that average 340 words. After a silent model update, summaries average 210 words. Your review interface was designed for the longer format. Attorneys are missing key clauses because the shorter summary omits them. This isn't an error — the API is working. But the change was consequential.

    A medical coding assistant classifies a category of diagnostic codes with 94% accuracy over a baseline test set. After an update, accuracy on that category drops to 87%. The drop is outside any explicit threshold you'd set — because you never set thresholds, because you didn't have a monitoring framework. Claims are being miscoded. You find out when billing discrepancies show up a month later.

    A fraud detection model has a decision boundary that produces a false positive rate of 1.2% on legitimate transactions. After an update, that rate shifts to 1.8%. Over 2 million daily transactions, that's 12,000 additional false declines per day. Customer complaints tick up. Revenue is affected. The cause is a model update that happened three weeks ago.

    These are not catastrophic failures. They're the kind of degradation that happens quietly and causes real business impact. None of them trigger a system alert. All of them could have been caught with proper model versioning and performance monitoring.

    The API Version Pinning Illusion

    Cloud AI providers offer version-pinned endpoints. You can call gpt-4-1106-preview instead of gpt-4. This feels like version pinning. It isn't.

    Version-pinned endpoints are deprecated on a rolling basis. When a pinned version is deprecated, you are moved to a successor version, or the endpoint stops working entirely. The deprecation notice is typically 6-12 months. That sounds like enough time. In practice, for production systems in regulated industries, 6-12 months is barely enough time to complete security review of a model update, let alone validate behavior against a compliance requirement.

    More fundamentally: even when a pinned version is available, you can't audit what that version does. You don't have the weights. You can't run behavioral tests on the model in isolation. You can observe the model's behavior through API calls, but you can't verify that the behavior is stable or understand why it changed when it does.

    True version pinning means you own the checkpoint. The model state is a file under your control. It does not change until you change it. No deprecation notices. No migration paths you didn't choose.

    True Version Control for AI Models

    When you own model weights — either by fine-tuning an open-source foundation model or by training from scratch — you have a model checkpoint that is a versioned artifact. It behaves like a file, because it is a file.

    What this gives you:

    Exact reproducibility: Given the same input and the same model weights (and the same inference temperature, set to 0 for determinism), you get the same output. This is not true of API-based AI, where the model can be updated and inference infrastructure can vary.

    Explicit updates: The model changes when you decide to retrain it and deploy the new checkpoint. Not before. Updates are deliberate, tested, and approved — not absorbed silently from a vendor.

    Behavioral diff: You can compare two model checkpoints directly on the same evaluation set. Before/after comparisons are not observations through an API — they're controlled experiments with both models available.

    Rollback: If a newly deployed model performs worse than its predecessor on your production evaluation metrics, you restore the previous checkpoint. Rollback is a file operation.

    Drift Detection: What to Measure

    Model drift is a shift in the relationship between inputs and outputs over time. It happens for two reasons: the model changes (explicit update or silent vendor update), or the input distribution changes (users behave differently, data quality changes, new use cases emerge).

    The instruments to measure it:

    Population Stability Index (PSI): Measures the shift in the distribution of model outputs (or inputs) between a baseline period and the current period. PSI < 0.1 indicates no significant shift; PSI 0.1-0.2 warrants monitoring; PSI > 0.2 indicates significant drift requiring investigation. PSI is fast to compute and doesn't require ground truth labels.

    Output distribution monitoring: Track the distribution of key output characteristics — classification confidence scores, output length distributions, refusal rates, category distributions for classification tasks. Significant shifts in these distributions often precede accuracy degradation.

    Accuracy on held-out eval set: Periodically run your model against a held-out evaluation set where you know the correct answers. This is the ground truth measure of model performance. It requires labeling effort upfront, but it's the only measure that directly tracks accuracy. Run weekly for high-risk models, monthly for lower-risk ones.

    Human sampling: Have domain experts periodically review a random sample of model outputs and rate quality against a rubric. This catches qualitative degradation that quantitative metrics miss — tone shifts, reasoning failures, edge case handling.

    Automate alerting on PSI and output distribution metrics. Surface accuracy degradation from eval set runs to the model owner. Establish explicit thresholds before deployment — not in response to a production incident.

    Rollback Strategy: Blue/Green for AI Models

    Blue/green deployment is a standard software production pattern: maintain two production-ready deployments, route traffic to one (green), deploy changes to the other (blue), validate, then cut over. If the cutover reveals problems, route back to green.

    This works for AI models too, with one important addition: the evaluation gate.

    Before promoting a new model to production:

    1. Run the new model and the current production model against an identical evaluation set
    2. Compare accuracy, bias metrics, output distribution, and latency
    3. Require the new model to meet or exceed production model performance on all metrics (or explicitly accept a tradeoff with documented rationale)
    4. If the new model passes: canary deployment to 5-10% of traffic, monitor production metrics for 24-72 hours, then full promotion
    5. If the new model fails the evaluation gate: back to training, no production traffic

    This is the evaluation gate principle. It prevents regressions from reaching production without detection. It requires a held-out eval set and a side-by-side comparison infrastructure — both of which are standard requirements for any team running models they own.

    The Retraining Decision

    Drift detection tells you when to investigate. It doesn't automatically tell you when to retrain.

    Retrain when:

    • PSI on input distribution exceeds 0.2 (data drift significant enough to invalidate training distribution)
    • Accuracy on eval set drops more than 3-5% below launch baseline (threshold depends on risk tier)
    • Human sampling finds systematic qualitative failures in a specific category
    • New training data has accumulated that would meaningfully improve coverage (typically when you have 20-30% more labeled data than at last training)
    • A domain shift has occurred (product launch, regulatory change, user population change) that the current model wasn't trained for

    Do not retrain reactively after every complaint. Do not retrain on a fixed schedule regardless of whether drift has occurred. Both approaches waste resources and introduce unnecessary change. Retrain when the data tells you to.

    Ertas Fine-Tuning: Version Control for Your Models

    Ertas Fine-Tuning SaaS saves every training run as an explicit checkpoint. You can compare models side-by-side on your eval set before deciding to deploy. The training lineage — dataset version, hyperparameters, training duration — is recorded with each checkpoint.

    The resulting GGUF is a portable artifact you deploy on your own infrastructure. Version it in object storage or a model registry exactly as you version software releases. Tag checkpoints with the training date, dataset version, and evaluation metrics. Maintain the previous checkpoint until the new one has proven itself in production.

    This is model version control that actually works — not endpoint pinning that expires.

    See early bird pricing →

    Related: AI Model Governance in Production covers the broader governance framework that model versioning supports. For the vendor dependency framing, see Why 'We Use the API' Means You Have No Control.

    The engineering discipline of treating AI models as first-class production artifacts — versioned, monitored, gated before promotion, rollback-capable — is not optional for teams running AI in consequential contexts. It's what your software engineering practice already looks like for everything else. Apply it here.

    Ship AI that runs on your users' devices.

    Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.

    Keep reading