I opened the October 13 entry in the Gemini API changelog and learned that gemini-4-argon is generally available. Changing the model ID takes a minute. But I use Gemini for review-reply drafts and a few operations scripts in my indie app work, and the thing that unsettles me most is a morning after a swap when something has quietly shifted. So before replacing the string, I wanted to list what I'd have to take out.
What I'd like to say first: moving to Argon is mostly about removing things, not adding them. The official migration checklist names four habits to drop or review. I haven't run Argon in a production call myself, so this post is a tool for taking inventory of your own code before the swap, plus notes on how to read its output.
The four items the docs say will behave differently
The "What's new in Gemini 4 Argon" page lists these as the places to touch when migrating.
| What your code does | On Argon | What to do |
|---|---|---|
Explicit caching via cachedContents / caches.create | Not supported; implicit caching only | Remove the create and reference calls |
temperature / top_p / top_k | Accepted but ignored | Delete them, or mark them clearly as inert |
max_output_tokens below 32,768 | Thinking shares the budget, so answers can be cut short | Raise to at least 32,768; more for hard tasks |
| Short HTTP client timeouts | Hard prompts can take minutes | 15 minutes or more, or use background execution |
Implicit caching is on by default for prompts of at least 4,096 tokens, and cached input tokens get a 95% discount on a hit. If you built around explicit caches, the whole way you think about storage cost changes.
The two that fail without an error
An explicit cache call will probably fail loudly on Argon. temperature and max_output_tokens are the troublesome ones.
temperature is simply ignored, with no error. Code that pinned it at 0.2 to keep reply tone steady will keep running as if it were pinned. If the output starts to wander, "the setting isn't taking effect" is a hard thing to suspect.
max_output_tokens is similar. A job that fit in 8,192 tokens on a Flash model now shares that budget between thinking and the answer, so replies can end short or stop midway. The docs recommend at least 32,768 for apps that currently set a lower limit.
The changes that never raise an error are the ones to hunt for by hand, before the swap. I try to keep that rule every time a model changes.
A script that finds the four in your own code
This walks a repository and lists lines matching the four items above. It uses only the standard library and exits with status 1 if it finds anything. I checked on a few lines of sample code that it catches all four kinds.
#!/usr/bin/env python3
"""gemini-4-argon へ model を替える前に、自分のコードから引っかかる書き方を探す。"""
import pathlib
import re
import sys
EXTS = {".py", ".js", ".ts", ".tsx", ".mjs", ".sh", ".json", ".yaml", ".yml"}
SKIP = {"node_modules", ".git", ".next", "dist", "__pycache__", ".venv"}
CHECKS = [
("明示キャッシュ", r"cachedContents|caches\.create|cached_content|cachedContent",
"Argon は明示キャッシュ非対応。呼び出しを外し、暗黙キャッシュに任せる"),
("サンプリング指定", r"\b(temperature|top_p|top_k|topP|topK)\b[\"']?\s*[:=]",
"Argon では指定しても無視される。残すなら『効いていない』と分かる印を付ける"),
("出力上限が小さい", r"(max_output_tokens|maxOutputTokens)\"?\s*[:=]\s*(\d+)",
"32,768 未満は思考で使い切るおそれ。数字を見て判断する"),
("短いタイムアウト", r"(timeout|timeout_ms|timeoutMs)\"?\s*[:=]\s*(\d+)",
"難しい入力は数分かかる。15 分未満なら background 実行を検討する"),
]
def scan(root: pathlib.Path):
hits = []
for path in root.rglob("*"):
if path.suffix not in EXTS or any(p in SKIP for p in path.parts):
continue
try:
lines = path.read_text(encoding="utf-8").splitlines()
except (UnicodeDecodeError, OSError):
continue
for no, line in enumerate(lines, 1):
for name, pattern, hint in CHECKS:
m = re.search(pattern, line)
if not m:
continue
if name == "出力上限が小さい" and int(m.group(2)) >= 32768:
continue
hits.append((name, f"{path}:{no}", line.strip()[:90], hint))
return hits
if __name__ == "__main__":
target = pathlib.Path(sys.argv[1] if len(sys.argv) > 1 else ".")
found = scan(target)
seen = set()
for name, where, text, hint in found:
print(f"[{name}] {where}\n {text}")
seen.add((name, hint))
print(f"\n{len(found)} 件 / {len({n for n, _ in seen})} 種類")
for name, hint in sorted(seen):
print(f"- {name}: {hint}")
sys.exit(1 if found else 0)Run it as python3 argon_preflight.py ./my-app. Output looks like this:
[サンプリング指定] app/reply.py:12
cfg = {"temperature": 0.2, "max_output_tokens": 8192}
[出力上限が小さい] app/reply.py:12
cfg = {"temperature": 0.2, "max_output_tokens": 8192}(The category labels are in Japanese because I wrote the script for my own use; they read as "sampling parameter" and "output limit too small".) One line showing up twice is intended: a single line can hold two problems, and it happens most to people who keep settings together in one dict.
Things to keep in mind when reading it
- Timeout units are mixed.
60000could be 60 seconds or 60,000 seconds depending on the library, so check the call site - It is regex-based, so it also matches comments and test data. The goal is to read every hit, not to reach zero
- Lines where
max_output_tokensis a variable have no readable number and won't be reported; look for those separately
What to check after switching
After the scan, I'd move one workload first rather than everything. Three things to watch:
- Whether responses are cut off (
finishReasonand character count) - How many times larger the output tokens, thinking included, have become
- Compare
low,mediumandhighthinking, and pick the lowest level that meets your quality bar
The docs give the same advice: evaluate at all three levels and take the smallest that works. The default is medium.
Check the price before you start, too. gemini-4-argon is at an introductory $2 per 1M input tokens and $10 per 1M output tokens (thinking included) through November 30, 2026, then $4 and $20 from December 1. gemini-3.8-flash is $0.75 and $3.75 through December 31, 2026. On list price alone Argon is several times higher, and it may spend more tokens on thinking. I covered the Flash side of the price change in a two-column estimate around the end of the introductory price.
You don't have to move everything
Having written this, my conclusion is that work with a high migration cost doesn't have to move. A short, fixed-format job like a first draft of a store-review reply is fine on Flash. The strengths the Argon page lists are complex coding, agents, math and science. I'd move only the work that falls there and leave the rest alone. That's where I've landed for now.
For telling whether the serving model changed underneath you, I wrote up logging the requested ID next to the served ID. I plan to keep that log running after the first workload moves to Argon.
Today, run argon_preflight.py once against your own repository and count what it prints. Once you have that number, half of the decision is already made.