Skip to main content
Skip to main content

Choose your AI model

CDK Insights routes AI analysis through AWS Bedrock and lets you pick the model that fits each scan. More capable models cost more credits per resource. The default works well for most stacks โ€” switch up only when you want deeper reasoning.

Quick reference

ModelAliasCredits / resourceTier
Amazon Nova Lite
Amazon
nova-lite0.5Free tier default
Mistral 14B
Mistral AI
mistral-14b1Pro / Team default
Llama 3.3 70B
Meta
llama-3-3-70b2Pro / Team
Claude Haiku 4.5
Anthropic
haiku-4-54Pro / Team
Claude Sonnet 4.6
Anthropic
sonnet-4-616Pro / Team

When to pick which model

Amazon Nova Lite

0.5 credits / resourceFree tier default
nova-lite

Pick when: Quick scans, cost-conscious workflows. Default for the Free tier โ€” your 500 credits stretch to ~1,000 resource analyses.

Strengths

  • Lowest credit cost (2ร— more analyses per credit)
  • Fast inference
  • AWS-native model

Avoid when

Architecturally complex stacks where nuanced reasoning matters more than raw count.

Mistral 14B

1 credits / resourcePro / Team default
mistral-14b

Pick when: Balanced reasoning for everyday infrastructure. The default for paid tiers โ€” works well for the vast majority of CDK stacks.

Strengths

  • Anchor cost: 1 credit per resource
  • Solid code understanding
  • Reliable for typical AWS patterns

Avoid when

Deeply layered constructs or complex permission graphs โ€” Llama 3.3 70B or Haiku 4.5 will reason more thoroughly.

Llama 3.3 70B

2 credits / resourcePro / Team
llama-3-3-70b

Pick when: Deeper code understanding and pattern recognition than the default โ€” without the premium price of Anthropic models.

Strengths

  • Stronger reasoning than Mistral 14B
  • Open-weight model with broad training
  • Good middle ground on cost vs depth

Avoid when

Routine scans where Mistral 14B already produces clean output โ€” pay for depth only when you need it.

Claude Haiku 4.5

4 credits / resourcePro / Team
haiku-4-5

Pick when: High-quality findings for security-critical infrastructure. Strong reasoning at speed โ€” great for production reviews.

Strengths

  • Anthropic-quality reasoning
  • Faster than Sonnet for similar quality on most CDK code
  • Excellent at explaining nuanced findings

Avoid when

Quick iteration loops where speed/cost matter more than depth.

Claude Sonnet 4.6

16 credits / resourcePro / Team
sonnet-4-6

Pick when: Maximum-depth reasoning for architecturally complex stacks where every nuance counts. Reserve for high-stakes audits.

Strengths

  • Top-tier reasoning across the registry
  • Best at multi-resource architectural patterns
  • Catches subtle interactions Mistral and Llama miss

Avoid when

Routine development scans โ€” 16ร— the credit cost of Mistral means a 5,000-credit Pro plan covers ~312 Sonnet analyses vs 5,000 on the default.

How to switch models

Three ways to set the model, in order of precedence. The CLI walks them in the order shown โ€” the first non-empty value wins.

1. Per-scan flag

Highest precedence. Use for one-off audits or when iterating on which model to settle on.

npx cdk-insights scan --model haiku-4-5

2. Project default in cdk.json context

Sets a default for the whole CDK project. Lives next to the rest of your CDK config โ€” convenient when the team agrees on one model per project.

{
  "context": {
    "cdkInsights:aiModel": "mistral-14b"
  }
}

3. User default in .cdk-insights.json

Local user override โ€” useful when you personally prefer a specific model across all your projects.

{
  "ai": {
    "model": "llama-3-3-70b"
  }
}

If none of the three is set, the resolver falls back to the tier-default model โ€” Nova Lite for Free, Mistral 14B for Pro and Team.

Tier gating

Free

Restricted to nova-lite. If you set a higher-tier model on Free, the resolver falls back to Nova Lite with a warning rather than failing โ€” so the scan still runs.

Pro

Full access to all 5 models. Default is Mistral 14B; pick any model per scan with --model.

Team

Same as Pro โ€” full access to all 5 models. Each seat gets its own 10,000-credit allowance.

Credit math, worked examples

Each AI analysis on a resource spends credits at the model's rate. Cached results don't spend credits. Static scans are always free. Here's what each plan's monthly allowance buys at each model:

Free (500 credits/month)

Amazon Nova Lite (0.5)~1,000 resources/month
Mistral 14B (1)Not available โ€” Free is gated to Nova Lite

Pro (5,000 credits/month)

Amazon Nova Lite (0.5)~10,000 resources/month
Mistral 14B (1)5,000 resources/month
Llama 3.3 70B (2)2,500 resources/month
Claude Haiku 4.5 (4)1,250 resources/month
Claude Sonnet 4.6 (16)~312 resources/month

Team (10,000 credits/seat/month)

Mistral 14B (1)10,000 resources/seat/month
Mix: Mistral routine + Sonnet for auditse.g. 8,000 Mistral runs + 125 Sonnet audits per seat per month

Counts assume one analysis per resource. With ai.batchSize enabled, multiple resources share a single Bedrock call โ€” the credit cost stays the same per resource, but Bedrock-side prompt tokens are amortised across the batch.

Ready to pick a model?

Start with the default, switch up with --model when you need it.