AI Engineering
What changed in the Gemini October 14, 2026 release
Update your Gemini API calls, model IDs, and Google GenAI SDK code for Gemini 4 Argon, long decode, and October 2026 deprecations.
By Tanvir Ahamed, published . 9 min read.
Researched and written with AI assistance; sources are linked below.
Google's mid-October 2026 Gemini rollout spans the October 13, 2026 Gemini API Changelog and the October 13 and October 14, 2026 entries in the Gemini Enterprise Release Notes and Vertex AI Release Notes. Simply swapping a model string from gemini-3.8-flash or gemini-3.1-pro-preview to gemini-4-argon will break requests that rely on explicit context caching, thinking_budget, penalty parameters, or small max_output_tokens caps. This guide walks through the new models, deprecation deadlines, Google GenAI SDK upgrades, and request parameter changes needed to update your code safely.
Summary of the October 13 and 14, 2026 Gemini updates
The release wave introduces a new flagship reasoning model, billing and regional expansions for existing models, and several API-level primitives:
- Gemini 4 Argon (
gemini-4-argon) General Availability: Announced on September 30, 2026 for Fairwind Program cyber defenders,gemini-4-argonreached general availability on October 13, 2026 on the paid tier of the Gemini API in Google AI Studio, Vertex AI and the Gemini Enterprise Agent Platform, Google Antigravity for AI Ultra subscribers, and the Gemini app, as documented in the Gemini API Changelog. A cyber-permissive variant,gemini-4-argon-cyber-permissive, also launched on Vertex AI for Fairwind-approved cybersecurity workloads (Vertex AI Gemini 4 Argon documentation). - Priority Pay-As-You-Go for
gemini-nano-banana-2.1: On October 14, 2026, Priority Pay-as-you-go (PayGo) reached general availability forgemini-nano-banana-2.1on the global endpoint in the Gemini Enterprise Agent Platform (Vertex AI Release Notes). Thegemini-nano-banana-2.1model itself went GA on October 6, 2026 to replacegemini-3.1-flash-imagefor image generation and conversational editing (Gemini API Changelog). - UK regional availability for
gemini-3.8-flash: On October 14, 2026,gemini-3.8-flashreached general availability in the United Kingdom (europe-west2) in-country region, supporting in-region at-rest data residency (DRZ) and machine learning processing (MLP) (Gemini Enterprise Release Notes). - CodeMender v0.15.0 and Argon support: CodeMender added preview support for
--model gemini-4-argononcm find,cm verify, andcm fixon October 13, 2026, while keepinggemini-3.8-flashas the default. On October 14, 2026, CodeMender v0.15.0 added enhanced SARIF 2.1.0 reporting viacm report, model invocation metrics incm stats --json, and a fix for missing token usage logs when runs error or cancel (Vertex AI Release Notes).
Alongside the model launches, gemini-4-argon changes how context and output budgets work:
- Unified 1M token context pool: Input tokens, thinking tokens, function calls, and output tokens draw from a single shared 1,048,576-token window rather than separate input and output limits (Vertex AI Gemini 4 Argon documentation).
- Long decode up to 1,048,576 tokens: Single generations can extend past the per-request output limit of 65,536 tokens (or 32,768 tokens on direct non-streaming HTTP requests) up to the remaining space in the 1,048,576-token pool (Long decode guide).
- Discrete thinking levels: A
thinking_levelparameter supportslow,medium(the default ongemini-4-argon), andhigh(the default ongemini-4-argon-cyber-permissive) (Vertex AI Gemini 4 Argon documentation). - Agentic video understanding (GA): Opting in with
processing: "agentic"on the Interactions API ormedia_processing="AGENTIC"onGenerateContentlets the model inspect transcripts first, scrub timelines dynamically, and load high-resolution frames only when needed, cutting input token consumption by up to 88% on long-form videos (Agentic video understanding guide).
Model deprecations and version pinning
While no model was newly marked deprecated on October 14, 2026 itself, the October 2026 release notes establish several active re-routings and October 2026 shutdown deadlines that affect production model strings:
deep-research-pro-preview-12-2025shuts down on October 23, 2026: Deprecated on October 8, 2026, this agent identifier will stop working entirely on October 23, 2026. Update theagentparameter ininteractions.createcalls todeep-research-preview-04-2026for faster streaming responses, ordeep-research-max-preview-04-2026for maximum depth (Gemini API Changelog).- Gemini 2.5 Pro regional removal on October 20, 2026: Announced on October 1, 2026, Gemini 2.5 Pro leaves the Gemini Enterprise app in the Canada and Japan in-country regions on October 20, 2026, remaining available in
global,us, andeu(Gemini Enterprise Release Notes). gemini-3.7-flashandgemini-3.5-flashautomatic routing: Both models were deprecated on October 8, 2026.gemini-3.7-flashis removed from the Google AI Studio selector and automatically routed togemini-3.8-flash. Requests togemini-3.5-flashare automatically routed togemini-3.6-flash(Gemini API Changelog). Pin your configuration explicitly togemini-3.8-flashorgemini-3.6-flashso your observability logs match the model actually serving traffic.gemini-3.1-flash-image(Nano Banana 2) deprecated on October 6, 2026: Migrate image generation and conversational editing workloads togemini-nano-banana-2.1(Gemini API Changelog).gemini-2.5-flash-imageretirement extended to March 15, 2027: Previously scheduled for retirement on October 2, 2026, this model now retires on March 15, 2027. Google recommends migrating togemini-3.1-flash-lite-image, which has a retirement date of June 28, 2027 or later (Vertex AI Release Notes).- Gemini 2.5 API access restrictions: Since September 18, 2026, Gemini 2.5 models in the Gemini API are restricted to accounts that have previously used them; new projects must target
gemini-3.5-flash-liteorgemini-3.8-flash(Gemini API Changelog).
Updating the Google GenAI SDK
Although basic support for the stateful Interactions API (/v1beta/interactions) landed in version 2.3.0 of the Python and JavaScript SDKs (Gemini Interactions API guide), older SDK versions stop generating at 65,536 tokens. To support automatic client-side continuation across multi-hop long decodes (finish_reason: CONTINUATION with continuation_token), upgrade to the minimum required versions listed in the Long decode guide:
- Python (
google-genai):>= 2.30.1 - JavaScript / TypeScript (
@google/genai):>= 2.29.1 - Other languages: Go
1.74.0, Java1.77.0.NET1.26.0, Kotlin1.6.0
Upgrade the Python and TypeScript packages from your terminal before modifying your client code:
pip install -U "google-genai>=2.30.1"
npm install @google/genai@latestEndpoint, region, and timeout configuration
Before initializing your client, check three infrastructure requirements for gemini-4-argon:
- API version for
GenerateContent: If you usegenerateContentorstreamGenerateContentinstead of the Interactions API, long decoding is only supported on thev1beta1endpoint, notv1. The Google GenAI SDK defaults tov1beta1, so remove any customhttp_optionsoverride that pinsapi_versiontov1(Vertex AI Gemini 4 Argon documentation). - Cloud regions on Vertex AI: On Vertex AI and Google Cloud,
gemini-4-argonis served on thegloballocation and theusandeumulti-regions, rather than single regions such asus-central1(Vertex AI Gemini 4 Argon documentation, Pydantic AI Google models documentation). - HTTP client timeouts: Because
highthinking levels and multi-hop long decodes can run for several minutes, either usebackground=Truewithstore=Trueon the Interactions API so continuation runs on Google's servers, or raise your HTTP client read timeout for streaming calls (Long decode guide).
Adopting the new API parameters and capabilities
Google recommends the stateful Interactions API (client.interactions.create) for new projects (Gemini Interactions API guide). When you set background=True, store=True, and max_output_tokens above 65536 on the Interactions API, Google's backend executes the multi-hop continuation server-side (Long decode guide).
If you remain on generate_content_stream, the Python SDK (>= 2.30.1) enables automatic_continuation=True by default, stitching together finish_reason="CONTINUATION" hops automatically (Long decode guide, Vertex AI Gemini 4 Argon documentation).
The following Python script demonstrates both approaches: starting a background server-side long decode on the Interactions API, and streaming a response with automatic client-side continuation on generate_content_stream.
from google import genai
from google.genai import types
# Initialize the client (defaults to v1beta1 for GenerateContent)
client = genai.Client()
# 1. Recommended: Interactions API with server-side background long decode
interaction = client.interactions.create(
model="gemini-4-argon",
input="Design a lock-free ring buffer in Rust with a full property-based test suite.",
background=True,
store=True,
generation_config={
"max_output_tokens": 131072,
"thinking_level": "high", # Allowed: "low", "medium" (default), "high"
},
)
print(f"Started background interaction: {interaction.id}")
# 2. GenerateContent streaming with automatic client-side continuation
for chunk in client.models.generate_content_stream(
model="gemini-4-argon",
contents="Write a complete formal proof of the prime number theorem.",
config=types.GenerateContentConfig(
max_output_tokens=256000,
thinking_config=types.ThinkingConfig(thinking_level="HIGH"),
),
):
print(chunk.text or "", end="")In TypeScript and Node.js (@google/genai >= 2.29.1), you can stream events from ai.interactions.create while configuring thinking_level and max_output_tokens (Gemini Interactions API guide, Long decode guide).
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({});
async function runArgonStream(): Promise<void> {
const stream = await ai.interactions.create({
model: "gemini-4-argon",
input: "Refactor this module and generate a complete test suite.",
stream: true,
generation_config: {
thinking_level: "medium",
max_output_tokens: 65536,
},
});
for await (const event of stream) {
console.log(event);
}
}
runArgonStream().catch(console.error);Enabling agentic video understanding
If your application processes long videos, switch to agentic video processing on gemini-4-argon. Rather than tokenizing every frame upfront, the model reads the transcript first and dynamically loads high-resolution frames for relevant timestamps, reducing video input tokens by up to 88% (Agentic video understanding guide). Pass media_processing="AGENTIC" in GenerateContentConfig or processing: "agentic" on the Interactions API:
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-4-argon",
contents=[
types.Part.from_uri(
file_uri="gs://cloud-samples-data/video/animals.mp4",
mime_type="video/mp4",
),
"List the exact timestamps where a tiger appears and describe its actions.",
],
config=types.GenerateContentConfig(
max_output_tokens=32768,
media_processing="AGENTIC",
thinking_config=types.ThinkingConfig(thinking_level="MEDIUM"),
),
)
print(response.text)Breaking changes when switching model strings
Replacing an older Gemini 3.x model identifier with gemini-4-argon without auditing your request payload will trigger HTTP 400 INVALID_ARGUMENT errors or unexpected token charges. Review these eight behavioural differences documented in the Vertex AI Gemini 4 Argon documentation, the Vertex AI Thinking documentation, and the Long decode guide:
- Low
max_output_tokensvalues cause empty, billed responses: Ongemini-4-argon,max_output_tokenscaps thinking tokens, function calls, and the final answer combined. Carrying over a small limit like2048or4096from Gemini 3.x allows the model to spend the entire budget on internal reasoning, returning an empty response withfinish_reason="MAX_TOKENS"while still billing for every thought token generated (Long decode guide). Setmax_output_tokensto at least32768(or leave it at the65536SDK default), and lowerthinking_leveltolowif you need to constrain reasoning spend. thinking_budgetandMINIMALreturn HTTP 400 on Vertex AI:thinking_budgetis deprecated in favour ofthinking_level(LOW,MEDIUM,HIGH). Passingthinking_budget, settingthinking_level="MINIMAL", or providing boththinking_levelandthinking_budgetin the same request returns400 INVALID_ARGUMENTon Vertex AI (Vertex AI Thinking documentation, Vertex AI Gemini 4 Argon documentation).- Sampling parameters are ignored: Custom values for
temperature(includingtemperature=0),top_p, andtop_kare ignored bygemini-4-argonand produce a deprecation warning (Vertex AI Gemini 4 Argon documentation). Remove them from your config and rely onresponse_schemafor structured output determinism. - Penalty and candidate parameters return HTTP 400: Passing
frequency_penalty,presence_penalty, orcandidate_countcauses an immediate400 INVALID_ARGUMENTerror (Vertex AI Gemini 4 Argon documentation). - Explicit context caching is unsupported: Calling
caches.createor passingcached_contentwithgemini-4-argonreturns an error (Gemini API Models overview, Gemini API Context Caching guide). Instead,gemini-4-argonuses automatic implicit caching with a 95% discount when shared prompt prefixes reach at least 4,096 tokens on the Gemini Developer API or 6,144 tokens on Vertex AI (Vertex AI Gemini 4 Argon documentation, Gemini API Context Caching guide). Place static system instructions, documentation, and codebase files at the very start of your prompt to hit the prefix threshold. - Direct non-streaming HTTP calls cap output at 32,768 tokens: Unlike Gemini 3.x, which permitted 65,536 output tokens on non-streaming calls, direct non-streaming HTTP requests to
generateContentongemini-4-argonare capped at 32,768 tokens. Passingmax_output_tokens > 32768on a non-streaming REST call without acontinuation_tokenreturns a400error (Long decode guide). - Prefilled model turns are rejected: Multi-turn conversations cannot end with a
modelturn, and prefilling an assistant response (such as starting with an opening brace to force JSON output) returns a400error (Vertex AI Gemini 4 Argon documentation). - Strict function calling turn symmetry: Every
FunctionResponsemust match the exactid,name, and order of the precedingFunctionCall, and Google recommends sequential tool execution (Vertex AI Gemini 4 Argon documentation). Also note thatgemini-4-argondoes not support the Live API, image generation, or audio generation (Gemini API Models overview).
Pricing, rate limits, and verification checklist
Before routing production traffic to gemini-4-argon, verify your billing tier and quota configuration:
- Paid tier required:
gemini-4-argonis excluded from the Gemini API free tier. From October 13, 2026 through November 30, 2026, introductory pricing is $2.00 per 1M input tokens, $10.00 per 1M output and thinking tokens, and $0.10 per 1M cached input tokens (a 95% implicit cache discount). On December 1, 2026, standard pricing takes effect at $4.00 per 1M input tokens and $20.00 per 1M output tokens (Vertex AI Gemini 4 Argon documentation). - Multi-hop long decode billing: During long decodes, each 64K hop re-sends the original prompt and all output generated so far as input for the next hop, which qualifies for the 95% implicit cache discount. Cancelled or failed requests still bill for tokens already generated (Long decode guide, Vertex AI Gemini 4 Argon documentation).
- Rate limits and batch quotas: The Gemini API enforces spend-based rate limits over a rolling 10-minute window alongside per-project RPM and TPM quotas, returning
429 RESOURCE_EXHAUSTEDwhen exceeded. For batch jobs,gemini-4-argonallows 5,000,000 enqueued tokens on Tier 1, 500,000,000 on Tier 2, and 1,000,000,000 on Tier 3 (Gemini API Rate Limits).
As your immediate next step, search your codebase for any references to deep-research-pro-preview-12-2025 before the October 23, 2026 shutdown and check whether any Gemini 2.5 Pro workloads run in the Canada or Japan regions ahead of the October 20, 2026 removal. Once those deadlines are cleared, upgrade google-genai to >= 2.30.1 or @google/genai to >= 2.29.1 in a staging environment and test gemini-4-argon with max_output_tokens set to at least 32768.
Sources
- Gemini
- Google AI
- LLM API
- SDK