How to Build Per-Country Feature Flags for AI Products in the EU

If you ship AI features into Europe, learning how to build per-country feature flags may be the most useful engineering investment you make before 2027. The reason is sitting on the European Commission’s calendar. On 15 December, the Technical Committee on Motor Vehicles meets with a “possible vote” on whether Tesla’s supervised driving system can be approved across the EU.

Twelve countries already allow it, starting with the Netherlands’ RDW in April and most recently Italy on 20 November. But Reuters reports that an EU-level rejection could cancel those national approvals. So a feature that is legal in Copenhagen today might have to be switched off there next year, while staying live elsewhere. That is not just a car problem. Any AI product that regulators can approve, restrict or reverse country by country needs the same capability: turning features on, off or into a safer mode per market, without shipping a new build.

What You Need Before You Start

You need a product with some kind of release pipeline (web, mobile, embedded or OTA) and a reliable way to know which country a user or device is in. That usually means a billing country or account setting, not just IP geolocation, which is easy to fool with a VPN.

On the tooling side, pick a feature flag platform. Open-source options include Unleash and Flagsmith. Commercial options include LaunchDarkly and ConfigCat. Whichever you choose, use the vendor-neutral OpenFeature SDK in your code so you can switch providers later. Budget roughly two to four sprints for a mid-sized product.

Step 1: Inventory Every Regulated Feature

List each feature that a regulator could reasonably care about. For an AI product, that means anything making decisions about people, anything acting in the physical world and anything that could fall under the EU AI Act’s high-risk categories. You can check those categories in the summary at artificialintelligenceact.eu.

For each feature, write down which country approvals or legal bases it depends on, who in your company can approve a change, and what a “safe mode” looks like. Tesla’s case is a good model here. Its European system did not simply turn on or off. Regulators pushed for a lower speed offset (plus 10 percent instead of plus 50 percent) and hands on the wheel above 130 km/h. Those are dials, not switches.

Step 2: Design Flags as Dials, Not Just Switches

Most teams start with booleans: feature on or off. For regulated AI, you will want three kinds of flags. Kill switches turn a feature completely off in a market. Parameter flags hold values like confidence thresholds, speed limits or maximum automation levels, so a regulator’s request becomes a config change. Mode flags switch between states such as “full”, “assisted” and “disabled”.

Name them clearly, for example ai.assist.enabled, ai.assist.max_speed_offset_pct and ai.assist.mode. Then define targeting rules by country code (ISO 3166, such as DE, FR, NL, IT). Default every new market to the most conservative setting and open up deliberately.

Step 3: Evaluate Flags Where They Cannot Be Bypassed

Where the flag is checked matters as much as the flag itself. For web and mobile apps, evaluate regulated flags on the server, not only in the client, so a modified app cannot unlock a feature. For devices and vehicles, the device should pull a signed configuration and cache it locally, so it keeps the last known safe settings when offline.

Always define a safe fallback. If the flag service is unreachable, the feature should fall back to the most restrictive setting for that country, never the most permissive. Write a unit test for that fallback. It is the test everyone forgets.

Step 4: Log Every Change Like a Regulated Release

When a regulator asks “what was running in France on 3 March?”, you need an answer in minutes. Turn on the audit log in your flag platform and send it to long-term storage such as Amazon S3 with object lock, or Azure Blob immutable storage. Record who changed what, when, why and which approval ticket authorised it.

Require two-person approval for changes to regulated flags in production. Most platforms support change requests or approval workflows. Link each change to your release notes and model version, so you can tie a behaviour change to both the code and the configuration that caused it.

Step 5: Rehearse a Country Rollback

A kill switch you have never used is a guess. Once a quarter, pick one country in staging and run the full drill: switch the feature to safe mode, confirm devices or apps pick it up within your target window (for example 15 minutes for online apps, 24 hours for vehicles or IoT), and check that users see a clear in-app notice explaining the change.

Measure how long the whole thing takes, from decision to the last device updated. If a regulator gives you a deadline, that number is what you will be judged on.

Step 6: Connect Flags to Your Compliance Evidence

One criticism of the Tesla file is that the RDW has not published its test results and Tesla has not released European disengagement data. Do not repeat that. Store performance metrics per country and per flag state: error rates, overrides, complaints. When you apply for approval in a new market, or defend one under review, you can show exactly how the feature behaved with each setting.

This also helps with the EU AI Act’s documentation duties for high-risk systems, which are expected to bite from 2027. The flag history and the metrics together become part of your technical file.

Common Mistakes to Avoid

Relying on IP geolocation alone. VPNs and roaming break it. Use account or device registration country as the source of truth, with IP only as a signal.

Letting flags pile up. Old flags become hidden risk. Give every regulated flag an owner and review them each quarter. Remove the ones you no longer need.

Marketing ahead of the flag state. Tesla’s “Full Self-Driving” became “Tesla Assisted Driving” in Europe. Make feature names and in-app copy part of the per-country config too, so labels never overstate what is switched on.

Key Takeaways

  • Plan for reversal: a national approval can be overturned at EU level, so every regulated feature needs a per-country off switch.
  • Use dials, not just switches: parameter and mode flags turn regulator requests into config changes instead of rewrites.
  • Fail safe: evaluate server-side or via signed device config, and default to the most restrictive setting.
  • Audit everything: immutable logs and two-person approvals make flag changes defensible.
  • Drill the rollback: measure time from decision to last device updated, before a regulator measures it for you.

Need Expert Help?

If this feels like a lot to manage alone, TecniForge can handle the heavy lifting. Our team specializes in custom software development and AI integration. Get in touch with our experts.

Also read: Tesla FSD EU Vote Moves to 15 December: 6 Things Tech Leaders Should Know, our earlier coverage on why this matters today. For the latest on the delay, see Electrek’s report.

A quick test before 15 December: pick your most sensitive AI feature and ask your team how long it would take to switch it off in one EU country only. If nobody can answer, you know where to start.


Discover more from TecniForge

Subscribe to get the latest posts sent to your email.