# Llama 4 Scout 17B 16e Instruct vs Mai Code 2 Flash

As of December 2, 2026, Mai Code 2 Flash and Llama 4 Scout 17B 16e Instruct cost the same per input token ($0.05 per 1M), but Mai Code 2 Flash costs 150% more per output token ($0.25 vs $0.10) and has a 922K-token context window versus 16K.

- Page: https://models.litellm.ai/compare/llama-4-scout-17b-16e-instruct-vs-mai-code-2-flash
- Llama 4 Scout 17B 16e Instruct: https://models.litellm.ai/models/llama-4-scout-17b-16e-instruct
- Mai Code 2 Flash: https://models.litellm.ai/models/mai-code-2-flash

## Side by side

| | Llama 4 Scout 17B 16e Instruct | Mai Code 2 Flash |
|---|---|---|
| Input, per 1M tokens | $0.05 | $0.05 |
| Output, per 1M tokens | $0.10 | $0.25 |
| Cache read, per 1M tokens | – | $0.005 |
| Cache write, per 1M tokens | – | – |
| Context window | 16,384 tokens | 922,000 tokens |
| Max output | 8,192 tokens | 128,000 tokens |
| Image input | Yes | Yes |
| Tool calling | Yes | Yes |
| Structured output (JSON) | – | Yes |
| Prompt caching | – | – |
| Reasoning | – | Yes |
| Providers on LiteLLM | 11 | 2 |
| Price shown is from | Lambda | Azure AI Foundry |
| Added to LiteLLM | April 2025 | November 17, 2026 |

Headline prices in USD per 1M tokens, from LiteLLM's model price file.

## Cheapest provider for each

- Llama 4 Scout 17B 16e Instruct: Lambda at $0.05 input per 1M tokens (`lambda_ai/llama-4-scout-17b-16e-instruct`)
- Mai Code 2 Flash: Azure AI Foundry at $0.05 input per 1M tokens (`azure_ai/MAI-Code-2-Flash`)

## When to pick which

- Llama 4 Scout 17B 16e Instruct: Costs 60% less per output token: $0.10 vs $0.25 per 1M.
- Llama 4 Scout 17B 16e Instruct: Available from 11 providers through LiteLLM, vs 2.
- Mai Code 2 Flash: Larger context window: 922,000 vs 16,384 tokens.
- Mai Code 2 Flash: Returns up to 128,000 tokens per response, vs 8,192.

## FAQ

### Which is cheaper, Llama 4 Scout 17B 16e Instruct or Mai Code 2 Flash?

Llama 4 Scout 17B 16e Instruct is cheaper at 3 input tokens per output token: $0.0625 per 1M tokens blended ($0.05 input, $0.10 output), versus $0.10 ($0.05 and $0.25) for Mai Code 2 Flash, as of December 2, 2026.

### Which has the larger context window, Llama 4 Scout 17B 16e Instruct or Mai Code 2 Flash?

Mai Code 2 Flash has the larger context window: 922,000 tokens, versus 16,384 for Llama 4 Scout 17B 16e Instruct.

### Can I switch from Llama 4 Scout 17B 16e Instruct to Mai Code 2 Flash without changing my code?

Yes. Through LiteLLM both use the OpenAI format, so switching means changing the model name from "lambda_ai/llama-4-scout-17b-16e-instruct" to "azure_ai/MAI-Code-2-Flash", or pointing a LiteLLM gateway model alias at the other model. You can also use one as a fallback for the other.
