LiteLLMLiteLLM/ MODELS

GPT OSS 120B vs Mai Code 2 Flash

As of December 2, 2026, Mai Code 2 Flash costs 67% more per input token than GPT OSS 120B ($0.05 vs $0.03 per 1M) and has a 922K-token context window versus 131K.

Prices from LiteLLM's price fileChecked

GPT OSS 120B vs Mai Code 2 Flash side by side

Headline prices in US dollars per 1M tokens: each model's own lab where it sells it, otherwise its cheapest provider. Source: LiteLLM model price file, as of December 2, 2026.
GPT OSS 120BMai Code 2 Flash
Input, per 1M tokens$0.03$0.05
Output, per 1M tokens$0.17$0.25
Cache read, per 1M tokens–$0.005
Cache write, per 1M tokens––
Context window131,000 tokens922,000 tokens
Max output131,072 tokens128,000 tokens
Image input–Yes
Tool callingYesYes
Structured output (JSON)YesYes
Prompt cachingYes–
ReasoningYesYes
Providers on LiteLLM282
Price shown is fromWeights & BiasesAzure AI Foundry
Added to LiteLLMAugust 2025November 17, 2026

Cheapest provider for each

When to pick which

Pick GPT OSS 120B for

  • Costs 40% less per input token: $0.03 vs $0.05 per 1M.
  • Available from 28 providers through LiteLLM, vs 2.

Pick Mai Code 2 Flash for

  • Larger context window: 922,000 vs 131,000 tokens.

From differences in the data above only; where the data is equal, no reason is given.

Call GPT OSS 120B or Mai Code 2 Flash with LiteLLM

Both use the OpenAI format through LiteLLM, so switching is a model name change. Set each provider's API key in the environment first.

Python SDK
from litellm import completion

messages = [{"role": "user", "content": "Hello!"}]

# GPT OSS 120B
response = completion(model="wandb/openai/gpt-oss-120b", messages=messages)

# Mai Code 2 Flash
response = completion(model="azure_ai/MAI-Code-2-Flash", messages=messages)

# GPT OSS 120B, falling back to Mai Code 2 Flash if the call fails
response = completion(model="wandb/openai/gpt-oss-120b", messages=messages, fallbacks=["azure_ai/MAI-Code-2-Flash"])

FAQ

Which is cheaper, GPT OSS 120B or Mai Code 2 Flash?

GPT OSS 120B is cheaper at 3 input tokens per output token: $0.065 per 1M tokens blended ($0.03 input, $0.17 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, GPT OSS 120B or Mai Code 2 Flash?

Mai Code 2 Flash has the larger context window: 922,000 tokens, versus 131,000 for GPT OSS 120B.

Can I switch from GPT OSS 120B 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 "wandb/openai/gpt-oss-120b" 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.