LiteLLMLiteLLM/ MODELS

Claude Sonnet 5 vs GPT-6.2 Sol

As of November 17, 2026, Claude Sonnet 5 and GPT-6.2 Sol cost the same: $2.00 per 1M input tokens and $10.00 per 1M output tokens. Claude Sonnet 5 has the larger context window: 1M tokens versus 922K.

Prices from LiteLLM's price fileChecked

Claude Sonnet 5 vs GPT-6.2 Sol 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 November 17, 2026.
Claude Sonnet 5GPT-6.2 Sol
Input, per 1M tokens$2.00$2.00
Output, per 1M tokens$10.00$10.00
Cache read, per 1M tokens$0.20$0.10
Cache write, per 1M tokens$2.50$2.50
Context window1,000,000 tokens922,000 tokens
Max output128,000 tokens128,000 tokens
Image inputYesYes
Tool callingYesYes
Structured output (JSON)YesYes
Prompt cachingYesYes
ReasoningYesYes
Providers on LiteLLM134
Price shown is fromAnthropicOpenAI
Added to LiteLLMJune 30, 2026November 17, 2026

Cheapest provider for each

When to pick which

Pick Claude Sonnet 5 for

  • Available from 13 providers through LiteLLM, vs 4.

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

Call Claude Sonnet 5 or GPT-6.2 Sol 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!"}]

# Claude Sonnet 5
response = completion(model="claude-sonnet-5", messages=messages)

# GPT-6.2 Sol
response = completion(model="gpt-6.2-sol", messages=messages)

# Claude Sonnet 5, falling back to GPT-6.2 Sol if the call fails
response = completion(model="claude-sonnet-5", messages=messages, fallbacks=["gpt-6.2-sol"])

FAQ

Which is cheaper, Claude Sonnet 5 or GPT-6.2 Sol?

They cost the same: $2.00 per 1M input tokens and $10.00 per 1M output tokens, as of November 17, 2026.

Which has the larger context window, Claude Sonnet 5 or GPT-6.2 Sol?

Claude Sonnet 5 has the larger context window: 1,000,000 tokens, versus 922,000 for GPT-6.2 Sol.

Can I switch from Claude Sonnet 5 to GPT-6.2 Sol without changing my code?

Yes. Through LiteLLM both use the OpenAI format, so switching means changing the model name from "claude-sonnet-5" to "gpt-6.2-sol", or pointing a LiteLLM gateway model alias at the other model. You can also use one as a fallback for the other.