Google
Google
vs
Google
Google

CodeGemma 7B vs Gemma 4 31B Instruct

A detailed comparison of pricing, benchmarks, and capabilities

Get our weekly newsletter on pricing changes, new releases, and tools.

Key Takeaways

CodeGemma 7B wins:

  • No clear advantages in compared metrics

Gemma 4 31B Instruct wins:

  • Cheaper input tokens
  • Cheaper output tokens
  • Larger context window
  • Supports vision
  • Supports tool calls
Price Advantage
Gemma 4 31B Instruct
Benchmark Advantage
CodeGemma 7B
Context Window
Gemma 4 31B Instruct
Speed
N/A

Pricing Comparison

Context & Performance

Capabilities

Feature Comparison

FeatureCodeGemma 7BGemma 4 31B Instruct
Vision (Image Input)
Tool/Function Calls
Reasoning Mode
Audio Input
Audio Output
PDF Input
Prompt Caching
Web Search

License & Release

PropertyCodeGemma 7BGemma 4 31B Instruct
LicenseOpen SourceProprietary
AuthorGoogleGoogle
ReleasedUnknownApr 2026

CodeGemma 7B Modalities

Input
Output

Gemma 4 31B Instruct Modalities

Input
imagetextvideo
Output
text

Frequently Asked Questions

Gemma 4 31B Instruct has cheaper input pricing at $0.10/M tokens. Gemma 4 31B Instruct has cheaper output pricing at $0.10/M tokens.
CodeGemma 7B has a 128,000 token context window, while Gemma 4 31B Instruct has a 262,144 token context window.
CodeGemma 7B does not support vision. Gemma 4 31B Instruct supports vision.