SAP's generative AI hub gives a company one door to many large language models: OpenAI's through Azure, Anthropic's through AWS, Google's Gemini, Mistral models SAP hosts itself, and SAP's own models. Developers pick a model by name and version. Earlier topics showed them how (the generative AI hub and orchestration, choosing and calling LLMs).
An architect asks different questions. Which of those models may this use case call? Where is the model served, and may our data go there? What happens when SAP retires the version we tested? Who confirmed the data terms? Without answers, each team picks its own model, and the company finds out about a retirement or a residency problem when something breaks.
The answer is a short model policy: an approved list by data class, region rules, version rules, a data terms record per provider, and an owner for each use case. SAP gives you a way to enforce part of it: an allow list on the orchestration deployment, so only approved models can be called through it.
The decision this topic helps you make: no production use case calls a hub model that isn't on the approved list for its data and region, pinned to a version someone tested, with a named owner who re-tests before a retirement date.
Take Calder Pumpworks, the course's fictional pump maker. By late 2026 it has six use cases on the hub: three agents (order exceptions, invoice triage, supply watch), a nightly batch that codes maintenance notifications, an HR staffing assistant, and a planned extraction of Augsburg's supplier invoices for CP20, the German company code. A partner wrote a model policy in May. Reviewed in November, it has ten failures. Four of them would cost real money:
A retirement nobody saw. The batch job is pinned to a model version that the catalogue marks deprecated and that retires within weeks in this course's data. SAP's lifecycle page says a deployment that names a version "stops working" on that date (Model Lifecycle).
A model that isn't there. The Augsburg extraction was designed on a small model that SAP's matrix lists for US10 but not EU10, where Calder keeps CP20's data.
Data that may leave the region. Its embedding model is marked Yes* in EU10: available, but it "may be accessed from a cross-regional location" for load balancing and failover (Model Availability by Region). For data that must stay in the EU, that is a finding.
An old API. One agent still calls the orchestration V1 API, which SAP will decommission on 31 December 2026 (What's New, 3 November 2026).
Each one is cheap to fix in a design review and expensive to fix in production. The policy is how the review finds them.
As of 29 November 2026, these are the pieces SAP provides (all in SAP AI Core's documentation unless noted):
The extended service plan. Generative AI hub access comes with SAP AI Core's extended plan, priced per resource plus model or token usage. You can't downgrade from extended to standard (Service Plans).
A catalogue per tenant. A model discovery endpoint lists the models your tenant can use, with each version's context length, cost figures, a deprecated flag and a retirementDate (Supported Models). SAP Note 3437766 holds token conversion rates, rate limits and deprecation dates; it needs an SAP login.
Regional matrices. SAP publishes which model versions and which features are available in each region, "on a best-effort basis" (models, features).
Two upgrade options. Use latest and move to new versions automatically, or name a version and move by hand (Model Lifecycle).
Model restriction. An allow or deny list on an orchestration deployment, which SAP describes as a way to implement internal standards where only certain models are approved (Model Restriction).
Data terms. SAP's Responsible AI page says SAP does not share customer data with third-party LLM providers to train their models, and that data sent to a third-party hosted model is processed only, "not stored or otherwise retained by the model provider" (sap.com).
Rate limits. Requests per minute per model, shared by the tenant's resource groups unless you set group limits (Rate Limit Management).
What SAP doesn't provide is the policy itself: which models your company approves for which data, and who answers for each use case. That is yours to write.
D1 internal, D2 business confidential, D3 personal, D4 never sent
Approved list
Model and version, and the classes each may receive
gpt-5.4 for D1 to D3; gemini-3.8-flash for D1 and D2
Region rule
Where each instance runs, and whether Yes* is acceptable
CP20 data in EU10, Yes* not accepted there
Version rule
Pinned in production, latest only in development
Every production use case names a version
Lifecycle rule
How early a retirement must be acted on
Fail within 60 days, warn within 120 (course rule)
Fallback rule
A second approved model, from another provider
gpt-5.4 falls back to anthropic--claude-4.5-sonnet
Data terms record
Where each provider's terms are stated, who confirmed, when
SAP's Responsible AI page, confirmed by the privacy contact
Use case register
Owner and evaluation set for each use case
Order exceptions: owner 00100296, set uat-set-v1
Enforcement
The allow list on each orchestration deployment
Generated from the approved list, per region
The policy is short on purpose. Its job is to make three things true: nobody calls a model the company hasn't approved for that data, nobody is surprised by a retirement, and every model change is re-tested by someone who owns the result.
"One approved list is enough." A model can be approved and still unavailable in the region where your data must stay. The list needs a region view.
"latest means we never have to think about lifecycle." SAP warns that behavior can change from version to version. latest trades a broken deployment for an untested one.
"A model listed in the region is served from the region."Yes* means it may be served from another data center.
"SAP's terms cover everything, so no record is needed." A record says which page or contract you relied on, on what date, and who checked it. Terms change; a record shows when to look again.
"The allow list governs every call." SAP documents it for orchestration deployments. A team that creates its own direct model deployment goes around it, so who may create deployments matters too.
Pick one answer for each question. The explanation appears after you choose.
1What is the main job of a model policy for the generative AI hub?
Answer: D. The hub offers many models. The policy decides, per data class and region, which ones a use case may call, how versions are handled and who owns each use case.
2Calder's Augsburg invoices must stay in the EU. Their embedding model is marked Yes* in EU10. What does that mean for the design?
Answer: C. SAP's matrix says Yes* models are available but may be accessed from a cross-regional location. For data that must stay in the EU, choose a model marked Yes in EU10.
3A batch job is pinned to a model version that SAP marks deprecated. What happens if nobody acts?
Answer: C. SAP's lifecycle page says a deployment that names a version stops working on that version's deprecation date. Only latest moves automatically, and it moves untested.
4Why does the policy pin versions in production instead of using latest?
Answer: A. SAP warns that model behavior can change from version to version. Pinning keeps the tested version until an owner re-runs the evaluation and moves on purpose.
5Which control can SAP enforce for you, rather than leaving it to each team?
Answer: C. Model restriction puts an allow or deny list on an orchestration deployment. Data classes, terms records and owners are the company's own policy and process.
6A vendor says SAP's terms already promise that providers don't train on your data, so no terms record is needed. What is the best reply?
Answer: C. SAP's Responsible AI page does state that position, but terms change and contracts differ. A dated record shows what you relied on and when to check again.
Treat a hub model the way you treat any external dependency: it has a supplier, a version, a region where it runs, terms of use, and an end-of-life date. A model policy is the dependency policy for that one kind of component. It answers four questions per call: may this data go to this model (data class and terms), can it in this region (availability and residency), which version (pinned and tested), and until when (retirement and the owner who acts).
Then put the enforcement where calls actually pass. Every orchestration call goes through a deployment in a resource group, so an allow list on that deployment turns part of the policy into a hard control. The rest stays a review: a script that checks the policy and the catalogue on a date, and a register that names owners.
flowchart LR
A[Agent or app<br/>AGT_ORDER_EXC] -->|orchestration v2,<br/>model + version| O[Orchestration deployment<br/>in a resource group]
O -->|allow list:<br/>approved models| M{Model in<br/>the list?}
M -->|no| X[Refused]
M -->|yes| P[Provider<br/>Azure, AWS, Google,<br/>SAP-hosted]
D[Direct deployment<br/>foundation-models] --> P
C[(Catalogue:<br/>discovery endpoint,<br/>SAP Note 3437766)] -.-> R[Policy review<br/>model_policy.py]
R -.->|generates| O
The model discovery endpoint, GET $AI_API_URL/v2/lm/scenarios/foundation-models/models with an AI-Resource-Group header, returns what your tenant can use (Supported Models). SAP's regional page calls the endpoint the authoritative list for your landscape and its own tables best-effort. The fields an architect reads:
Field
Why the policy needs it
executableId, model
Which provider route, and the name the deployment uses
accessType, provider
Remote, SAP-hosted or SAP-managed: who runs the model
allowedScenarios
Whether the model can be used through orchestration, foundation-models or both
versions[].name, isLatest
What to pin, and what latest currently resolves to
SAP's regional page names three access types: SAP-hosted (on SAP's own infrastructure), SAP-managed (on "SAP's tenant-isolated Hyperscaler infrastructure") and remote (hosted and managed by a provider such as AWS, reached through SAP AI Core). The supported-models page adds that Azure OpenAI models are reached through a private instance of the chat completions API that isn't publicly available. For a data terms record this matters: SAP's Responsible AI statement about providers not storing data is about third-party hosted models, the remote ones.
The model matrix gives Yes, Yes* or No for each version in each region. Yes* means the model "may be accessed from a cross-regional location", which SAP uses to harmonize the offer across data centers and for load balancing and failover. SAP's own example: mistralai--mistral-small is Yes* in US10 and Yes in EU10. As read on 29 November 2026 (SAP's documentation source last changed on 5 November), Calder's two regions look like this for the models in its policy:
Model and version
Access
US10
EU10
gpt-5.4 2026-03-05
Azure
Yes
Yes
gpt-5.4-nano 2026-03-17
Azure
Yes
No
gpt-4.1 2025-04-14
Azure
Yes
Yes
text-embedding-3-small 1
Azure
Yes
Yes*
anthropic--claude-4.5-sonnet 1
AWS
Yes
Yes
gemini-3.8-flash 001
Google
Yes
Yes
mistralai--mistral-small 2603
SAP-hosted
Yes*
Yes
nvidia--llama-3.2-nv-embedqa-1b 2
SAP-managed
Yes
Yes
Features have their own matrix. As read on the same day, for example, the LLM batch service is listed as unavailable in every Asia Pacific region in the table (Feature Availability by Region). A design that needs batch, grounding or prompt optimization checks the feature as well as the model.
SAP's lifecycle page offers two options. Auto upgrade: the deployment's configuration says latest, and existing deployments use a new version as soon as SAP supports it. Manual upgrade: the configuration names a version, and you patch the deployment with a new configuration when you choose. If no version is given, it is latest. A deployment pinned to a version "stops working on the deprecation date of that model version" (Model Lifecycle). The regional page adds that on latest you are moved when a version is deprecated, and that "model behavior can change from version to version".
So neither option is free. Pinning needs someone to watch dates; latest needs someone to notice behavior changes after the fact. Calder's policy pins in production and allows latest in development, where a change is cheap. SAP's own APIs deprecate too: the orchestration V1 workflow API, first set to end on 31 October 2026, now ends on 31 December 2026 (What's New).
When you create a deployment for orchestration, you can bind two parameters: modelFilterList, a JSON list of modelName and optional modelVersions (no versions means all versions), and modelFilterListType, allow or deny (Model Restriction). An allow list is the stricter choice: a model SAP adds next month is refused until the policy approves it. A deny list lets every new model in by default.
The orchestration deployment comes from the global scenario orchestration and executable orchestration, and SAP says you likely already have one running in your default resource group. A restricted deployment is a new deployment created from a configuration with those bindings (Create a Deployment for Orchestration). Two consequences for the design: the unrestricted default deployment must not stay reachable in production resource groups, and direct foundation-models deployments, which bypass orchestration, need their own control through who may create deployments.
Limits are requests per minute per model, per tenant, shared by all resource groups unless a group has its own limit, and all versions of a model share one limit. A 429 can also mean the provider is out of capacity. SAP's advice includes retries with backoff, fallback models and separate resource groups per workload; limit increases are requested through an API and approved by SAP (Rate Limit Management). For the policy, that makes the fallback rule an availability rule as well as a quality one: a fallback from another provider family isn't hit by the same capacity problem. The code for fallbacks is in model routing with fallbacks.
Three statements from SAP define the baseline, each with its source:
SAP AI Core "acts as the data processor"; customers, as data controllers, are responsible for data protection duties for what they store and process (Data Storage and Processing).
SAP does not share customer data with third-party LLM providers for training; data sent to a third-party hosted model is processed only and not stored or retained by the provider. The same page says SAP may use customer data to improve its own products where the agreement allows (Responsible AI).
The policy turns those into rules: personal data (D3) only with the masking module on, restricted data (D4) never, and a dated terms record for each provider family on the approved list.
You will write a script that holds Calder's six hub use cases, a catalogue snapshot with SAP's regional availability, and a model policy. It checks the policy against eleven course rules on a given date, then writes a model register and an allow list for each AI Core instance in the shape SAP's model restriction expects.
flowchart LR
P[policy_draft.json<br/>policy_reviewed.json] --> S[model_policy.py]
C[Built-in catalogue:<br/>SAP's region matrix,<br/>course lifecycle dates] --> S
L[Optional: your tenant's<br/>discovery response] -.-> S
S --> T[Findings in the terminal]
S --> R[model_register.md]
S --> A[allowlist_calder-aicore.json<br/>allowlist_calder-aicore-eu.json]
In VS Code, create the file unit23/model_policy.py, paste the code below, and save.
"""Check Calder Pumpworks' use of generative AI hub models against a model policy.
Run it from your course folder:
python unit23/model_policy.py --init # write the draft and reviewed policy files
python unit23/model_policy.py # review the partner's draft
python unit23/model_policy.py --policy reviewed # review the fixed policy and write the outputs
Options:
--policy draft|reviewed|PATH which policy file to review (default: draft)
--today YYYY-MM-DD the date to judge lifecycle and review dates (default 2026-11-29)
--catalogue PATH a model discovery response saved from your own SAP AI Core
tenant; its deprecated and retirementDate values replace the
built-in ones for the models it lists
Built-in modules only, no network, no randomness. Calder, its use cases, owners, data classes,
lead times and rules are course values. The regional availability is SAP's matrix as published
on 5 November 2026. The deprecation flags and retirement dates are course values: SAP keeps the
real ones in SAP Note 3437766 and the model discovery endpoint of your own tenant.
"""
import argparse
import json
from datetime import date
from pathlib import Path
HERE = Path(__file__).resolve().parent / "models"
TODAY = "2026-11-29"
FAIL_DAYS = 60 # course rule: a version retiring within 60 days fails
WARN_DAYS = 120 # course rule: within 120 days warns
TERMS_DAYS = 180 # course rule: a provider terms record is re-confirmed every 180 days
V1_END = "2026-12-31" # SAP: orchestration V1 decommissioning date, as extended on 3 November 2026
# Catalogue: (model, version) -> facts. executableId, provider family and access type as SAP's
# matrix shows them; "US10"/"EU10" are SAP's Yes / Yes* / No. deprecated and retirement are course values.
CATALOGUE = {
("gpt-5.4", "2026-03-05"): dict(exe="azure-openai", family="Azure", access="remote", US10="Yes", EU10="Yes", deprecated=False, retirement=""),
("gpt-5.4-nano", "2026-03-17"): dict(exe="azure-openai", family="Azure", access="remote", US10="Yes", EU10="No", deprecated=False, retirement=""),
("gpt-4.1", "2025-04-14"): dict(exe="azure-openai", family="Azure", access="remote", US10="Yes", EU10="Yes", deprecated=False, retirement="2027-04-14"),
("gpt-4o", "2024-05-13"): dict(exe="azure-openai", family="Azure", access="remote", US10="Yes", EU10="Yes", deprecated=True, retirement="2026-12-31"),
("text-embedding-3-small", "1"): dict(exe="azure-openai", family="Azure", access="remote", US10="Yes", EU10="Yes*", deprecated=False, retirement=""),
("anthropic--claude-4.5-sonnet", "1"): dict(exe="aws-bedrock", family="AWS", access="remote", US10="Yes", EU10="Yes", deprecated=False, retirement=""),
("gemini-3.8-flash", "001"): dict(exe="gcp-vertexai", family="Google", access="remote", US10="Yes", EU10="Yes", deprecated=False, retirement=""),
("mistralai--mistral-small", "2603"): dict(exe="aicore-mistralai", family="SAP-hosted", access="SAP-hosted", US10="Yes*", EU10="Yes", deprecated=False, retirement=""),
("nvidia--llama-3.2-nv-embedqa-1b", "2"): dict(exe="aicore-nvidia", family="SAP-managed", access="SAP-managed", US10="Yes", EU10="Yes", deprecated=False, retirement=""),
("sonar", "perplexity-us"): dict(exe="perplexity-ai", family="Perplexity", access="remote", US10="Yes", EU10="Yes*", deprecated=False, retirement=""),
}
INSTANCES = {"calder-aicore": "US10", "calder-aicore-eu": "EU10"}
SAP_TERMS = ("sap.com Responsible AI FAQ: customer data not shared with third-party LLM providers "
"to train their models; data sent to a third-party hosted model is processed only, "
"not stored or retained by the provider")
USE_CASES = [
dict(id="U01", name="Order exception notes", agent="AGT_ORDER_EXC", owner="00100296", eval="uat-set-v1",
data="D2", instance="calder-aicore", residency="", api="orchestration-v2", masking=False,
primary=["gpt-5.4", "2026-03-05"], fallback=["anthropic--claude-4.5-sonnet", "1"], stage="production"),
dict(id="U02", name="Invoice exception triage", agent="AGT_INV_TRIAGE", owner="00100244", eval="trajectory-T1-T6",
data="D2", instance="calder-aicore", residency="", api="orchestration-v2", masking=False,
primary=["gpt-5.4", "2026-03-05"], fallback=["anthropic--claude-4.5-sonnet", "1"], stage="production"),
dict(id="U03", name="Supply watch briefings", agent="AGT_SUPPLY_WATCH", owner="00100153", eval="supply-watch-v1",
data="D2", instance="calder-aicore", residency="", api="orchestration-v2", masking=False,
primary=["gemini-3.8-flash", "001"], fallback=["gpt-5.4", "2026-03-05"], stage="production"),
dict(id="U04", name="Notification damage coding (batch)", agent="W07 notification-coding-batch", owner="00100288",
eval="local-0001-sample", data="D1", instance="calder-aicore", residency="", api="batch", masking=False,
primary=["gpt-4.1", "2025-04-14"], fallback=None, stage="production"),
dict(id="U05", name="Augsburg supplier invoice extraction", agent="E01 CP20 invoices", owner="00100241",
eval="cp20-invoices-40", data="D2", instance="calder-aicore-eu", residency="EU", api="orchestration-v2",
masking=False, primary=["gpt-5.4", "2026-03-05"], fallback=["mistralai--mistral-small", "2603"],
embedding=["nvidia--llama-3.2-nv-embedqa-1b", "2"], stage="production"),
dict(id="U06", name="Staffing shortlist explanations", agent="AGT_STAFFING", owner="00100306", eval="staffing-H01-H10",
data="D3", instance="calder-aicore", residency="", api="orchestration-v2", masking=True,
primary=["anthropic--claude-4.5-sonnet", "1"], fallback=["mistralai--mistral-small", "2603"], stage="production"),
]
APPROVED = [
dict(model="gpt-5.4", versions=["2026-03-05"], classes=["D1", "D2", "D3"]),
dict(model="anthropic--claude-4.5-sonnet", versions=["1"], classes=["D1", "D2", "D3"]),
dict(model="gemini-3.8-flash", versions=["001"], classes=["D1", "D2"]),
dict(model="gpt-4.1", versions=["2025-04-14"], classes=["D1", "D2"]),
dict(model="mistralai--mistral-small", versions=["2603"], classes=["D1", "D2", "D3"]),
dict(model="gpt-5.4-nano", versions=["2026-03-17"], classes=["D1", "D2"]),
dict(model="text-embedding-3-small", versions=["1"], classes=["D1", "D2"]),
dict(model="nvidia--llama-3.2-nv-embedqa-1b", versions=["2"], classes=["D1", "D2", "D3"]),
]
TERMS = {fam: dict(source=SAP_TERMS, confirmed_by="00100292", confirmed="2026-11-27")
for fam in ["Azure", "AWS", "Google", "SAP-hosted", "SAP-managed"]}
def reviewed_policy():
return dict(name="Calder model policy", version="1.0", owner="00100290", reviewed="2026-11-27",
data_classes={"D1": "internal, no customer or personal data",
"D2": "business confidential: orders, prices, invoices, supplier names",
"D3": "personal data: employees and contact persons (masking required)",
"D4": "restricted: bank details and payroll, never sent to a model"},
approved=APPROVED, terms=TERMS, use_cases=USE_CASES,
allowlists={"calder-aicore": "generated", "calder-aicore-eu": "generated"})
def draft_policy():
p = json.loads(json.dumps(reviewed_policy()))
p["reviewed"] = "2026-05-12"
p["approved"].append(dict(model="gpt-4o", versions=["2024-05-13"], classes=["D1", "D2"]))
p["approved"].append(dict(model="sonar", versions=["perplexity-us"], classes=["D1", "D2"]))
uc = {u["id"]: u for u in p["use_cases"]}
uc["U01"]["primary"] = ["gpt-5.4", "latest"] # M03: not pinned in production
uc["U02"]["api"] = "orchestration-v1" # M09: V1 decommissioned 2026-12-31
uc["U03"]["fallback"] = None # M06: no fallback
uc["U03"]["eval"] = "" # M08: no evaluation set
uc["U04"]["primary"] = ["gpt-4o", "2024-05-13"] # M04: deprecated, retires 2026-12-31
uc["U05"]["primary"] = ["gpt-5.4-nano", "2026-03-17"] # M02: not in EU10
uc["U05"]["embedding"] = ["text-embedding-3-small", "1"] # M02: Yes* in EU10, EU residency
uc["U06"]["masking"] = False # M07: personal data without masking
p["allowlists"] = {} # M05: no model restriction anywhere
return p
def days(a, b):
return (date.fromisoformat(b) - date.fromisoformat(a)).days
class Review:
def __init__(self):
self.rows = []
def add(self, level, rule, obj, text):
self.rows.append((level, rule, obj, text))
def approved_for(policy, model, version, data_class):
for a in policy["approved"]:
if a["model"] == model and version in a["versions"]:
return data_class in a["classes"]
return None
def allowlist(policy, instance, catalogue):
"""Models approved in the policy and usable in the instance's region, in SAP's modelFilterList shape."""
region = INSTANCES[instance]
eu_only = any(u["instance"] == instance and u["residency"] for u in policy["use_cases"])
entries = []
for a in policy["approved"]:
vers = []
for v in a["versions"]:
c = catalogue.get((a["model"], v))
if not c or c[region] == "No" or (eu_only and c[region] != "Yes"):
continue
vers.append(v)
if vers:
entries.append({"modelName": a["model"], "modelVersions": vers})
return entries
def check(policy, today, catalogue):
r = Review()
for u in policy["use_cases"]:
region = INSTANCES[u["instance"]]
models = [("primary", u["primary"]), ("fallback", u.get("fallback")), ("embedding", u.get("embedding"))]
# M08 owner and evaluation set
if not u.get("owner") or not u.get("eval"):
r.add("FAIL", "M08", u["id"], "no owner or no evaluation set: a model change can't be re-tested")
else:
r.add("OK", "M08", u["id"], f"owner {u['owner']}, evaluation set {u['eval']}")
# M07 data class
if u["data"] == "D4":
r.add("FAIL", "M07", u["id"], "D4 data is never sent to a model")
elif u["data"] == "D3" and not u["masking"]:
r.add("FAIL", "M07", u["id"], "D3 personal data without the data masking module")
else:
r.add("OK", "M07", u["id"], f"data class {u['data']}" + (", masking on" if u["masking"] else ""))
# M09 orchestration version
if u["api"] == "orchestration-v1":
r.add("FAIL", "M09", u["id"], f"orchestration V1 is deprecated, decommissioned {V1_END} ({days(today, V1_END)} days)")
else:
r.add("OK", "M09", u["id"], f"calls through {u['api']}")
# M06 fallback
if u["api"].startswith("orchestration"):
fb = u.get("fallback")
if not fb:
r.add("WARN", "M06", u["id"], "no fallback model: a 429 or an outage stops the use case")
elif catalogue.get(tuple(fb), {}).get("family") == catalogue.get(tuple(u["primary"]), {}).get("family"):
r.add("WARN", "M06", u["id"], "fallback from the same provider family as the primary")
else:
r.add("OK", "M06", u["id"], f"fallback {fb[0]}")
for role, m in models:
if not m:
continue
model, version = m
label = f"{u['id']} {role} {model} {version}"
# M03 pinned version
if version in ("latest", ""):
if u["stage"] == "production":
r.add("FAIL", "M03", label, "production uses latest: behavior can change without a re-test")
pinned = [k for k in catalogue if k[0] == model]
version = pinned[0][1] if pinned else version
else:
r.add("OK", "M03", label, "latest is allowed outside production")
else:
r.add("OK", "M03", label, "version pinned")
c = catalogue.get((model, version))
if not c:
r.add("FAIL", "M02", label, "not in the catalogue of this tenant")
continue
# M01 approved for the data class
ok = approved_for(policy, model, version, u["data"])
if ok is None:
r.add("FAIL", "M01", label, "not on the approved list")
elif not ok:
r.add("FAIL", "M01", label, f"approved, but not for {u['data']} data")
else:
r.add("OK", "M01", label, f"approved for {u['data']}")
# M02 region and residency
avail = c[region]
if avail == "No":
r.add("FAIL", "M02", label, f"not available in {region}")
elif avail == "Yes*" and u["residency"]:
r.add("FAIL", "M02", label, f"Yes* in {region}: may be served from another region, {u['residency']} residency required")
elif avail == "Yes*":
r.add("OK", "M02", label, f"Yes* in {region}: may be served cross-region (no residency rule)")
else:
r.add("OK", "M02", label, f"available in {region}")
# M04 lifecycle
if c["deprecated"] or (c["retirement"] and days(today, c["retirement"]) <= FAIL_DAYS):
when = c["retirement"] or "no date"
r.add("FAIL", "M04", label, f"deprecated or retiring soon (retirement {when})")
elif c["retirement"] and days(today, c["retirement"]) <= WARN_DAYS:
r.add("WARN", "M04", label, f"retires {c['retirement']} ({days(today, c['retirement'])} days): plan the move")
else:
r.add("OK", "M04", label, "no retirement within " + str(WARN_DAYS) + " days")
# M05 model restriction on each production orchestration instance
for inst in INSTANCES:
if not any(u["instance"] == inst and u["api"].startswith("orchestration") for u in policy["use_cases"]):
continue
if policy.get("allowlists", {}).get(inst) != "generated":
r.add("FAIL", "M05", inst, "orchestration deployment without an allow list: any model in the tenant can be called")
else:
n = len(allowlist(policy, inst, catalogue))
r.add("OK", "M05", inst, f"allow list generated from the policy ({n} models)")
# M10 terms record per provider family on the approved list
fams = sorted({catalogue[(a["model"], v)]["family"] for a in policy["approved"] for v in a["versions"]
if (a["model"], v) in catalogue})
for fam in fams:
t = policy["terms"].get(fam)
if not t:
r.add("FAIL", "M10", fam, "approved models from this provider, but no data terms record")
elif days(t["confirmed"], today) > TERMS_DAYS:
r.add("WARN", "M10", fam, f"terms confirmed {t['confirmed']}, more than {TERMS_DAYS} days ago")
else:
r.add("OK", "M10", fam, f"terms confirmed {t['confirmed']} by {t['confirmed_by']}")
# policy review date (course rule: 90 days)
age = days(policy["reviewed"], today)
r.add("WARN" if age > 90 else "OK", "M10", "policy", f"policy reviewed {policy['reviewed']} ({age} days ago)")
return r
def write_outputs(policy, review, catalogue, today):
HERE.mkdir(exist_ok=True)
for inst in INSTANCES:
body = {"name": f"orchestration-{inst}-restricted", "executableId": "orchestration",
"scenarioId": "orchestration",
"parameterBindings": [
{"key": "modelFilterList", "value": json.dumps(allowlist(policy, inst, catalogue))},
{"key": "modelFilterListType", "value": "allow"}]}
(HERE / f"allowlist_{inst}.json").write_text(json.dumps(body, indent=2) + "\n")
lines = [f"# {policy['name']} {policy['version']}: model register", "",
f"Reviewed {today}. Owner {policy['owner']}. Course values; regional availability from SAP's matrix.", "",
"| Use case | Agent | Data | Instance | Primary | Fallback | Owner | Evaluation |",
"| --- | --- | --- | --- | --- | --- | --- | --- |"]
for u in policy["use_cases"]:
fb = " ".join(u["fallback"]) if u.get("fallback") else "none"
lines.append(f"| {u['id']} {u['name']} | {u['agent']} | {u['data']} | {u['instance']} | "
f"{' '.join(u['primary'])} | {fb} | {u['owner']} | {u['eval']} |")
lines += ["", "## Next retirements", ""]
used = {tuple(m) for u in policy["use_cases"] for m in (u["primary"], u.get("fallback"), u.get("embedding")) if m}
dated = sorted((catalogue[k]["retirement"], k) for k in used if k in catalogue and catalogue[k]["retirement"])
lines += [f"- {k[0]} {k[1]}: retires {d}" for d, k in dated] or ["- none recorded"]
lines += ["", "## Open findings", ""]
open_rows = [x for x in review.rows if x[0] != "OK"]
lines += [f"- {lv} {rule} {obj}: {txt}" for lv, rule, obj, txt in open_rows] or ["- none"]
(HERE / "model_register.md").write_text("\n".join(lines) + "\n")
def main():
ap = argparse.ArgumentParser(description=__doc__.splitlines()[0])
ap.add_argument("--init", action="store_true")
ap.add_argument("--policy", default="draft")
ap.add_argument("--today", default=TODAY)
ap.add_argument("--catalogue")
a = ap.parse_args()
if a.init:
HERE.mkdir(exist_ok=True)
(HERE / "policy_draft.json").write_text(json.dumps(draft_policy(), indent=2) + "\n")
(HERE / "policy_reviewed.json").write_text(json.dumps(reviewed_policy(), indent=2) + "\n")
print(f"Wrote {HERE / 'policy_draft.json'} and {HERE / 'policy_reviewed.json'}")
return
path = HERE / f"policy_{a.policy}.json" if a.policy in ("draft", "reviewed") else Path(a.policy)
if not path.exists():
print("No policy file yet. Run: python unit23/model_policy.py --init")
return
policy = json.loads(path.read_text())
catalogue = {k: dict(v) for k, v in CATALOGUE.items()}
if a.catalogue:
live = json.loads(Path(a.catalogue).read_text())
n = 0
for res in live.get("resources", []):
for v in res.get("versions", []):
key = (res.get("model"), v.get("name"))
if key in catalogue:
catalogue[key]["deprecated"] = bool(v.get("deprecated"))
catalogue[key]["retirement"] = v.get("retirementDate") or ""
n += 1
print(f"Lifecycle dates taken from {a.catalogue} for {n} model versions")
review = check(policy, a.today, catalogue)
print(f"{policy['name']} {policy['version']}: {path.name}, as of {a.today}")
for lv, rule, obj, txt in review.rows:
if lv != "OK":
print(f" {lv:4} {rule} {obj}: {txt}")
counts = {lv: sum(1 for x in review.rows if x[0] == lv) for lv in ("OK", "WARN", "FAIL")}
print(f"Summary: {counts['OK']} OK, {counts['WARN']} WARN, {counts['FAIL']} FAIL")
write_outputs(policy, review, catalogue, a.today)
print(f"Wrote {HERE.name}/model_register.md and {HERE.name}/allowlist_<instance>.json")
raise SystemExit(2 if counts["FAIL"] else 0)
if __name__ == "__main__":
main()
You should see one line naming unit23/models/policy_draft.json and unit23/models/policy_reviewed.json. Open the draft in VS Code and find the use_cases list: six entries, U01 to U06.
Run the review. The same command works in PowerShell and macOS/Linux while .venv is active:
python unit23/model_policy.py
What success looks like:
Calder model policy 1.0: policy_draft.json, as of 2026-11-29
FAIL M03 U01 primary gpt-5.4 latest: production uses latest: behavior can change without a re-test
FAIL M09 U02: orchestration V1 is deprecated, decommissioned 2026-12-31 (32 days)
FAIL M08 U03: no owner or no evaluation set: a model change can't be re-tested
WARN M06 U03: no fallback model: a 429 or an outage stops the use case
FAIL M04 U04 primary gpt-4o 2024-05-13: deprecated or retiring soon (retirement 2026-12-31)
FAIL M02 U05 primary gpt-5.4-nano 2026-03-17: not available in EU10
FAIL M02 U05 embedding text-embedding-3-small 1: Yes* in EU10: may be served from another region, EU residency required
FAIL M07 U06: D3 personal data without the data masking module
FAIL M05 calder-aicore: orchestration deployment without an allow list: any model in the tenant can be called
FAIL M05 calder-aicore-eu: orchestration deployment without an allow list: any model in the tenant can be called
FAIL M10 Perplexity: approved models from this provider, but no data terms record
WARN M10 policy: policy reviewed 2026-05-12 (201 days ago)
Summary: 64 OK, 2 WARN, 10 FAIL
Wrote models/model_register.md and models/allowlist_<instance>.json
Read the findings from the top. Each names a rule, the use case and the reason. Only WARN and FAIL lines print; the OK lines are counted in the summary.
Notice the two M02 lines for U05. The approved list allows both models, but EU10 can't serve one of them at all and may serve the other from elsewhere. Approval and region are separate questions.
The script ends with exit code 2 because there are failures. In a pipeline, that stops the change.
Calder model policy 1.0: policy_reviewed.json, as of 2026-11-29
Summary: 79 OK, 0 WARN, 0 FAIL
Wrote models/model_register.md and models/allowlist_<instance>.json
Compare the two files to see each fix: U01 pins 2026-03-05; U02 calls orchestration V2; U03 has a fallback and an evaluation set; U04 uses gpt-4.1; U05 uses gpt-5.4 with mistralai--mistral-small as fallback and the SAP-managed embedding model; U06 turns masking on; gpt-4o and sonar leave the approved list; both instances get generated allow lists; the policy carries a November review date.
Open unit23/models/allowlist_calder-aicore-eu.json. It is a configuration body with modelFilterList and modelFilterListType: allow. It holds six models; the US file holds eight. gpt-5.4-nano (not in EU10) and text-embedding-3-small (Yes*, and that instance holds EU-only data) are left out automatically.
Open unit23/models/model_register.md: one row per use case with model, fallback, owner and evaluation set, the next retirement in use, and open findings (none).
You should see one warning: WARN M04 U04 primary gpt-4.1 2025-04-14: retires 2027-04-14 (94 days): plan the move. That is the cue for the batch job's owner to test a replacement.
Try --today 2027-03-01. The same line is now a FAIL, and the policy itself warns that its last review was more than 90 days ago.
#Step 7 (optional): Use your own tenant's lifecycle dates
This step needs an SAP AI Core instance on a plan with the generative AI hub, such as a trial. Skip it if you don't have one.
The first line says how many model versions took their deprecated and retirementDate from your file. Findings now reflect your tenant's dates for those versions.
On a real project, each part of the policy has a home in SAP's tools, as of 29 November 2026:
Policy part
Where it lives in SAP
Watch out for
Catalogue
Model discovery endpoint per tenant; SAP AI Launchpad's model library
The regional tables are best-effort; the endpoint is authoritative for your tenant
Lifecycle dates
deprecated and retirementDate in the endpoint; SAP Note 3437766
SAP's page recommends marking the note as a favorite to be told when it changes
New models
SAP AI Core's What's New page
New entries point to SAP Note 3437766 for details
Enforcement
modelFilterList on an orchestration deployment
Applies to orchestration; direct deployments need role control
Versions
modelVersion in the deployment's configuration
A blank version means latest
Isolation and limits
Resource groups, quota APIs
Up to 50 resource groups per tenant; rate limits shared by default
Templates and configurations
Prompt registry, orchestration configurations
Version them with the model choice so a change is reviewable
SAP AI Launchpad. The model library shows the catalogue with a catalog, leaderboard and chart mode, model cards with input types and cost information, and a deprecation icon on affected models; it needs one of the roles genai_experimenter, genai_manager, genai_administrator or orchestration_executor (Model Library). It is a good place for a business owner to look at a model card before signing a change.
Where the AI Core side is designed. Instances, resource groups, tenancy and rate limits are the subject of the AI Core and AI Launchpad topic in this unit. How SAP meters and sells AI, including AI Units, is in AI Units and SAP's commercial model; model tiers and prices in late 2026 covers the providers' own price changes.
Where it sits. Calder's agents run on SAP BTP and in Joule Studio and call the hub through orchestration deployments in calder-aicore (US10, calder-ai-prod). Augsburg's invoice extraction, which handles CP20 data, uses a second instance, calder-aicore-eu, in EU10, in line with the EU subaccounts of the BTP account model. The nightly batch calls a model directly through the batch service, outside orchestration.
flowchart LR
subgraph US10["US10: calder-aicore"]
O1[Orchestration, allow list US]
B[Batch, W07]
end
subgraph EU10["EU10: calder-aicore-eu"]
O2[Orchestration, allow list EU]
end
AG[AGT_ORDER_EXC<br/>AGT_INV_TRIAGE<br/>AGT_SUPPLY_WATCH<br/>AGT_STAFFING] --> O1
E[CP20 invoice<br/>extraction] --> O2
O1 --> PR[Azure, AWS, Google,<br/>SAP-hosted models]
O2 --> PR
B --> AZ[Azure batch]
POL[model_policy.py<br/>in CI] -.-> O1
POL -.-> O2
Non-functional requirements that decide the design.
Requirement
Typical target
What breaks if missed
Data residency
EU-only data on Yes models in EU10
A privacy finding; a transfer the contract doesn't cover
Continuity
No production version within 60 days of retirement
A use case stops on a fixed date
Availability
A fallback from another provider family
One provider's 429s or outage stop the process
Change control
Every model change re-runs the use case's evaluation
A silent behavior change reaches users
Cost
Model choice per use case, priced from SAP Note 3437766
A large model used where a small one would do
Integration and identity. Applications reach the hub with the AI Core instance's service binding and a resource group header, so the hub sees the application, not the end user. User identity and authorizations are enforced before the call, in the agent and in SAP (agent permissions). The data class of a call follows the use case, so the register is where identity and data meet: which use case, run for whom, sends which class.
The decision to record.
Context: Augsburg's supplier invoices hold CP20 business data that Calder's privacy contact requires to stay in the EU. The partner's design used gpt-5.4-nano and text-embedding-3-small on the US instance's settings; SAP's matrix lists the first as unavailable in EU10 and the second as Yes*.
Options: A run extraction on calder-aicore in US10 with the partner's models; B a second instance calder-aicore-eu in EU10 with models marked Yes there; C keep extraction in ECC until the July 2027 rollout without AI; D accept Yes* with a documented exception.
Decision: B, with gpt-5.4 as primary, mistralai--mistral-small (SAP-hosted, Yes in EU10) as fallback and the SAP-managed embedding model, enforced by a generated allow list.
Consequences: A second instance to operate; models added to the hub reach Augsburg only after the policy approves them and the matrix shows Yes in EU10; the choice is re-checked against the tenant's catalogue at each policy review.
What a design review will ask.
Which data class does each use case send, and which approved models may receive it?
For each production call, which region serves it, and is any model Yes* where data must stay put?
Which versions are pinned, when does each retire, and who owns the move?
Is the default unrestricted orchestration deployment still reachable from production?
Which source and date does each provider's data terms record rest on?
Security and authorizations. Only the platform team creates deployments in production resource groups; developers use a development instance. The allow list closes the orchestration path, and role control closes the direct deployment path. Keep the AI Core service key in the binding, never in code (BTP services and bindings).
Evaluation. Each use case has a frozen evaluation set; a model or version change runs it and needs the owner's sign-off, the same way as the UAT and sign-off gates.
Cost. Approve the smallest model that passes the evaluation for each use case, and record why a larger one was chosen. Price changes by provider are tracked in model tiers and prices.
Operations. Run the policy check in the pipeline on every change and on a weekly schedule, so a retirement date turns into a ticket months ahead. Watch for 429s per model and resource group (batch and observability).
Data protection. Inference observability can store requests and responses in your own object store; deleting the inference records doesn't delete what is stored there, which SAP leaves to you (Deleting Inference Record Data). Put retention for that store in the policy.
Clean core. The hub sits on BTP, outside S/4HANA. Model changes never touch the core, which is the point: they can be governed and rolled back on their own schedule.
Here AI is the subject, so the question is what it changes in governance. Models are the fastest-moving dependency in an SAP landscape: SAP's What's New page added supported models in most months of 2026, and model versions carry their own retirement dates. A governance process built for yearly releases misses that pace; a dated policy, a generated allow list and a scheduled check keep up with it. AI can also help run the policy, for example by drafting a change note from the catalogue's new entries, but a person decides what joins the approved list, and the allow list is generated from the policy file, not from a model's answer. Model choice by task is in model selection and routing; the program-level governance that this policy feeds is in AI governance for SAP programs.
Add a rule that keeps deprecated models off the approved list itself, and register a seventh use case.
Open unit23/model_policy.py.
Find the line # policy review date (course rule: 90 days) in check(). Just above it, add:
# M11 nothing deprecated stays on the approved list
for a in policy["approved"]:
for v in a["versions"]:
c = catalogue.get((a["model"], v))
if c and (c["deprecated"] or (c["retirement"] and days(today, c["retirement"]) <= FAIL_DAYS)):
r.add("FAIL", "M11", f"{a['model']} {v}", "on the approved list but deprecated or retiring soon")
Run python unit23/model_policy.py. Check that a new line FAIL M11 gpt-4o 2024-05-13: on the approved list but deprecated or retiring soon appears and the summary reads 64 OK, 2 WARN, 11 FAIL.
Open unit23/models/policy_reviewed.json. In the use_cases list, after the closing } of U06, type a comma and paste:
Run python unit23/model_policy.py --policy reviewed. Check that the summary reads 91 OK, 0 WARN, 0 FAIL and that model_register.md has a U07 row owned by quality engineer 00100326.
Commit with the message Unit 23: M11 and the inspection lot use case.
Done when: step 3 shows the M11 failure, step 5 passes with seven use cases, and the register lists U07. The register and the two allow lists go into the platform section of your capstone design pack.
Pick one answer for each question. The explanation appears after you choose.
1Which source does SAP call authoritative for the models your own tenant can use?
Answer: B. SAP says its regional tables are maintained on a best-effort basis and points to the discovery endpoint for the authoritative list. The policy check can read lifecycle dates from a saved discovery response.
2What does modelFilterListType allow do on an orchestration deployment?
Answer: B. With allow, only listed models and versions can be used through that orchestration deployment. A deny list does the opposite and lets new models in by default.
3The allow list leaves out text-embedding-3-small for calder-aicore-eu, though the model is listed in EU10. Why?
Answer: A. allowlist() drops models that aren't plain Yes in the region when a use case on that instance requires EU residency. Yes* means the model may be served from another region.
4A use case's deployment configuration has no modelVersion. What does the policy check report in production, and why?
Answer: B. SAP's lifecycle page says the version defaults to latest when none is given. The course rule M03 allows latest only outside production.
5Calder's team creates a direct foundation-models deployment of a model that isn't approved. Which control catches it?
Answer: C. Model restriction is documented for orchestration deployments. A direct deployment bypasses orchestration, so only control over who may create deployments, plus the scheduled policy check, closes that path.
6On 1 March 2027 the review fails U04 because gpt-4.1 retires on 14 April. Who should act, and how?
Answer: B. The owner of U04 judges whether a replacement is good enough on the frozen evaluation set, then the platform team patches the deployment with the new version. Switching to latest would move untested.
7Why does Calder's policy require each fallback to come from another provider family?
Answer: B. SAP notes a 429 can come from provider capacity, not only from your quota. A fallback on another provider's infrastructure keeps the use case running when one provider is saturated.
Model Availability by Region (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29 (repository last changed 2026-11-05); Yes, Yes* (available but may be accessed from a cross-regional location, for load balancing and failover) and No per model version and region; access types SAP-hosted, SAP-managed (SAP's tenant-isolated hyperscaler infrastructure) and remote; 'latest' moves you on deprecation and behavior can change; tables maintained on a best-effort basis, the discovery endpoint is authoritative; SAP Note 3437766 for pricing, retirement and rate limits. US10/EU10 values used here: gpt-5.4 Yes/Yes, gpt-5.4-nano Yes/No, gpt-4.1 Yes/Yes, text-embedding-3-small Yes/Yes*, anthropic--claude-4.5-sonnet Yes/Yes, gemini-3.8-flash Yes/Yes, mistralai--mistral-small 2603 Yes*/Yes, nvidia--llama-3.2-nv-embedqa-1b Yes/Yes, sonar Yes/Yes*
Feature Availability by Region (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29; features such as LLM orchestration, prompt registry, document grounding, LLM batch service, evaluation and prompt optimization listed Yes or No per region, best-effort; batch service No in every Asia Pacific region listed
Model Lifecycle (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29; model versions have deprecation dates; a deployment that specifies a version stops working on that version's deprecation date; auto upgrade with modelVersion latest, manual upgrade by patching a deployment with a new configuration; latest is the default when no version is given
Model Restriction (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29; when creating a deployment for orchestration, restrict models with an allow or deny list to implement internal standards; parameter bindings modelFilterList (modelName, optional modelVersions; no versions means all) and modelFilterListType allow or deny; the text says parametersBindings, the sample uses parameterBindings
Supported Models (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29; SAP Note 3437766 for token conversion rates, rate limits and deprecation dates; discovery endpoint GET $AI_API_URL/v2/lm/scenarios/foundation-models/models with AI-Resource-Group header; fields accessType, allowedScenarios, executableId, model, provider, versions[] with capabilities, contextLength, cost, deprecated, isLatest, name, retirementDate, streamingSupported; Azure OpenAI models through a private instance not publicly available
Rate Limit Management (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29; requests per minute per model per tenant, shared by all resource groups by default, all versions of a model share one limit; optional resource group limits; 429 can also mean provider capacity; GET /v2/admin/quota/model and POST /v2/admin/quota/requests (approval process); advice to isolate workloads in separate resource groups and use model fallbacks
What's New for SAP AI Core (SAP-docs on GitHub)— read 2026-11-29; 2026-11-03: decommissioning of the deprecated orchestration V1 workflow API extended from 31 October to 31 December 2026; 2026-10-22: gpt-6.1-sol, gpt-6-astra, gpt-6-luna supported; 2026-09-29: Gemini 3.8 Flash; new-model entries point to SAP Note 3437766
Service Plans (SAP AI Core documentation, SAP-docs on GitHub)— read 2026-11-29; extended plan for production workloads with generative AI hub access, priced per resource plus model or token usage; no downgrade from extended to standard; up to 50 resource groups per tenant; supported regions in SAP Discovery Center
Responsible AI (sap.com)— read 2026-11-29, no page date; SAP does not share customer data with third-party LLM providers for training their models; data sent to third-party hosted foundation models is processed only and not stored or retained by the provider; SAP may use customer data to improve its products where the agreement allows, with an opt-out in SAP for Me for new features; ISO/IEC 42001 covers Joule, SAP AI Core and SAP AI Launchpad
Data Residency and Digital Sovereignty for AI (SAP Learning lesson)— read 2026-11-29, no page date; residency depends on scenario design; generative AI processing may occur on SAP-managed infrastructure or approved external model providers; regional options subject to availability; EU AI Cloud keeps customer data within the European environment