LLM policy
Claude is the primary LLM for every build on the nanohype stack. Preferred delivery is AWS Bedrock — it keeps data inside the client's AWS trust boundary and simplifies enterprise compliance posture. This policy names the SDK per language, the model tiers, the preferred regions, and the requirements around authentication, prompt caching and models of other families.
| Name | llm-policy |
| Version | 1 |
| Source | standards/llm-policy.json |
The standard
primary_provider- AWS Bedrock
modelsdefault- us.anthropic.claude-sonnet-5
escalation- us.anthropic.claude-opus-5
light- us.anthropic.claude-haiku-4-5-20251001-v1:0
regions_preferredus-east-1
sdk_by_languagetypescript- @aws-sdk/client-bedrock-runtime
python- boto3 (bedrock-runtime client)
go- github.com/aws/aws-sdk-go-v2/service/bedrockruntime
rust- aws-sdk-bedrockruntime
java- software.amazon.awssdk:bedrockruntime
csharp- AWSSDK.BedrockRuntime
requirementsid- iam-role-auth
summaryAuthenticate via IAM role assumption. On the nanohype substrate the application holds no model credential: it calls its Platform's ModelGateway, whose Envoy runs under the tenant's EKS Pod Identity and holds the Bedrock role, and it sends the gateway no key, token or signature. Off the substrate (CI runners, CLIs, desktop apps, local tools) the application reaches Bedrock under an IAM role it assumes: an ECS task role or Lambda execution role in AWS, GitHub OIDC federation on a CI runner, an AWS profile on a workstation. A browser app, which cannot assume a role, calls a ModelGateway endpoint and sends no credential; the gateway authenticates no caller, so a browser app reaches it only through a port-forward its user opens, which the cluster authorizes as that user. No provider API key is permitted in code, env vars or secrets, on the substrate or off it, and no intake brief makes an exception.
severity- reject
id- default-sonnet
summaryUse claude-sonnet-5 for the bulk of inference. Escalate to claude-opus-5 only for complex reasoning or architecture decisions. Use claude-haiku-4-5 for classification, routing, and filter steps.
severity- warn
id- inference-profile-required
summaryInvoke every current Claude model through a cross-region inference-profile ID, never the bare foundation-model ID. Bedrock reports inferenceTypesSupported: [INFERENCE_PROFILE] for the whole current Claude family — there is no ON_DEMAND path — so a bare ID such as anthropic.claude-sonnet-5 is refused with a ValidationException on the first call. The geo prefix must match the deploy region — us. for the us-east-1 deployments this catalog targets. Prefer a geo prefix over global. so routing stays inside the intended jurisdiction. Confirm with: aws bedrock list-inference-profiles.
severity- reject
id- verify-region
summaryVerify the chosen model is available in the deploy region before committing IaC. Check the model's inference profile is ACTIVE there, not merely that the foundation model is listed.
severity- warn
id- region-single
summaryus-east-1 is the only preferred region, and regions_preferred is deliberately a one-element list rather than a ranking. A service-control policy denies every non-global action outside us-east-1 in the accounts this catalog deploys into, so a second entry here would name a region no workload can reach, and the catalog defaults would drift toward it. The anchor is us-east-1 because CloudFront requires its ACM certificates to be issued there regardless, so anchoring anywhere else would need a permanent carve-out for the thing every deployment does. Widening this list is a substrate decision, not a template one: change the policy first, then this file. scripts/check-regions.mjs enforces that no skeleton default, .env.example, or documented command names a region this list omits.
severity- warn
id- prompt-caching-mandatory
summaryUse Bedrock cachePoint markers on the system prompt and any stable context prefix. Measure cache-hit ratio and surface it in the architecture artifact.
severity- warn
id- no-default-non-anthropic
summaryClaude through Bedrock is the default on the substrate and off it. A model of another family is used only when the intake brief names it, and is reached through a ModelGateway route or through Bedrock, never with a provider key. Never default to GPT.
severity- warn