SunsetDiff

Replacement for code-gecko: what changes when you switch

The official replacement is gemini-2.5-flash-lite. code-gecko shut down on 2025-04-21 per Google Vertex AI's deprecation page (checked 2026-10-17). Price, context window, and max output were left blank because the official pages we checked did not publish them.

This is the canonical diff. Model page · Replacement page · Google Vertex AI

code-gecko to gemini-2.5-flash-lite

Some values not published Checked 2026-10-17.

Price per 1M tokens

Price comparison. Example monthly cost for 10M input tokens and 2M output tokens. Labeled example, not a bill.
FieldOldNewChange
Input Not published Not published Not published
Output Not published Not published Not published
Cached input Not published Not published Not published
Example monthly cost Not published Not published Example only

Context and max output

Token limits
LimitOldNewChange
Context window Not published 1,048,576 Not published
Max output Not published 65,536 Not published

Capabilities that differ

No differing capability values are published for both models.

API changes

No parameter change is listed on the official pages we checked. The sample below only swaps the model id.

Code

python before
from google import genai
client = genai.Client()
response = client.models.generate_content(
    model="code-gecko",
    contents="Hello",
)
python after
from google import genai
client = genai.Client()
response = client.models.generate_content(
    model="gemini-2.5-flash-lite",
    contents="Hello",
)
typescript before
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
  model: "code-gecko",
  contents: "Hello",
});
typescript after
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
  model: "gemini-2.5-flash-lite",
  contents: "Hello",
});
curl before
curl "https://generativelanguage.googleapis.com/v1beta/models/code-gecko:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'
curl after
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-lite:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

Checklist

  1. Read the shutdown date for code-gecko on the linked official page.
  2. Point your requests at gemini-2.5-flash-lite.
  3. Re-check price, context, and parameters on the provider pages linked here.
  4. Ship the change before the published shutdown date.

Questions

What is the replacement for code-gecko?

The official replacement is gemini-2.5-flash-lite. code-gecko shut down on 2025-04-21 per Google Vertex AI's deprecation page (checked 2026-10-17). Price, context window, and max output were left blank because the official pages we checked did not publish them.

Is gemini-2.5-flash-lite cheaper than code-gecko?

A full price comparison is not published. One or both prices are missing from the official pages we checked.

Does gemini-2.5-flash-lite have a bigger context window than code-gecko?

Context window sizes are not both published on the official pages we checked.