Gemini 4 Argon:$2/$10 尝鲜价,以及发布背后那次 Chrome 重构

·11 分钟阅读·Evergreen Tools Team

2026 年 10 月 13 日,Google 让 Gemini 4 Argon 全球可用。开发者与企业走 AI Studio 和 Gemini 平台的 API,Ultra 订阅者可以在 Antigravity 里用,Ultra 和 Pro 订阅者在 Gemini App 和搜索的 AI Mode 里用。尝鲜价每百万输入 token 2 美元、输出 10 美元,缓存输入减 95%。Google 说它在 Vals 指数上排第一。这篇不打算复述发布会,我想拆的是那三个具体案例——Chrome 的重构、ADK 的性能优化、xTB 的加速——因为那些数字才是「长周期任务」到底长什么样的证据。

抽象的科技光线背景

「长周期」不是更快,是一次做不完。这是选型的第一个问题。

先说清楚哪些是事实,哪些是口径

可以核实的部分:全球可用时间、可用渠道、定价,以及 Google 在官方博客里逐条列出的工程结果。Vals 指数排第一是 Google 自己的表述,指数本身衡量的是金融、编码、法律、税务这些经济部门的表现,你可以去看它的构成,但「第一」这个结论的置信度取决于你信不信这个指数的权重设计。

Google 对 Argon 的定位写得很明确:面向复杂工作流的前沿模型,覆盖真实软件工程、企业知识工作和网络安全防御;针对的是需要深度推理和结构精度的长周期任务,包括代码迁移和前沿研究。关键词是「长周期」,不是「更快」——这个差别决定了你该怎么用它。

定价上有个细节容易被忽略:2 美元和 10 美元是「尝鲜价」,Google 明确写了最终价格会升到 4 美元和 20 美元。也就是说,你现在做成本模型必须同时算两个档。缓存输入减 95% 是这段定价里唯一真正能改变架构决策的部分。

# The model id is not something to guess. List what your project can actually call
# before you wire anything, then read the model id off the list.
from google import genai

client = genai.Client()  # reads GEMINI_API_KEY from the environment

for m in client.models.list():
    print(m.name, m.supported_actions)

# Once you have the id, a long-horizon call looks like this. Argon is described as a
# reasoning-first model, so give it room and give it a budget you can explain.
MODEL_ID = "REPLACE_WITH_ID_FROM_MODELS_LIST"

resp = client.models.generate_content(
    model=MODEL_ID,
    contents=(
        "Refactor src/billing into a hexagonal layout behind the existing HTTP "
        "handlers. Do not change public behaviour. List every file you touch."
    ),
    config={
        "temperature": 0.2,
        "max_output_tokens": 65536,
        "system_instruction": (
            "You are working inside a repository you cannot fully see. Before any "
            "edit, state the invariant you are preserving and the command that will "
            "prove it still holds."
        ),
    },
)
print(resp.usage_metadata)
print(resp.text[:2000])

缓存命中率才是长周期任务的经济学

长周期任务的成本结构和一个聊天框完全不同。一个重构循环可能反复读同一份 40 万 token 的上下文,每次只写 6 万 token。冷启动一次 1.4 美元,命中 36 万缓存之后是 0.44 美元,涨价之后是 0.88 美元。同一个任务,三种价格,差三倍。

所以在这个价位上,缓存不是「优化项」,是「能不能跑通宵」的开关。我见过不少 agent 流水线每次请求都重新拼一遍 system prompt 和代码上下文,把缓存全部打掉,然后在账单上惊讶。缓存命中的前提是前缀稳定,前缀稳定的前提是你不乱动 prompt 结构。

还有一件事:输出 10 美元对输入 2 美元,是 5 倍比价。这意味着「让模型少说废话」在这个模型上是直接的省钱手段。Google 自己在博客里也提到 Argon 回答更直接、更少对冲、不重复、不堆陈词滥调——这不只是体验优化,在 5 倍输出溢价下它是成本功能。

# Pricing is published as introductory. Model both bands or your budget review
# will be wrong the moment the rates move.
INPUT_INTRO, OUTPUT_INTRO = 2.0, 10.0     # USD per 1M tokens
INPUT_LIST,  OUTPUT_LIST  = 4.0, 20.0     # Google states these are the eventual rates
CACHE_DISCOUNT = 0.95                      # cached input is 95% off

def cost(in_tokens, out_tokens, cached_tokens=0, intro=True):
    pin, pout = (INPUT_INTRO, OUTPUT_INTRO) if intro else (INPUT_LIST, OUTPUT_LIST)
    fresh = in_tokens - cached_tokens
    return (
        fresh / 1e6 * pin
        + cached_tokens / 1e6 * pin * (1 - CACHE_DISCOUNT)
        + out_tokens / 1e6 * pout
    )

# A refactor loop that reads 400k tokens of context three times and writes 60k.
cold = cost(400_000, 60_000)
warm = cost(400_000, 60_000, cached_tokens=360_000)
print(f"cold run  ${cold:.3f}")   # 1.400
print(f"warm run  ${warm:.3f}")   # 0.440
print(f"list-price warm run ${cost(400_000, 60_000, 360_000, intro=False):.3f}")  # 0.880

# Caching is not a micro-optimisation on long-horizon work. It is the difference
# between a loop you can afford to run overnight and one you cannot.

Chrome 那次重构:600 万行里拆出来的东西

Google 给的第一个案例是 Chrome。Argon 帮团队把核心网页处理逻辑,从 Chromium 4000 万行代码里一个约 600 万行的浏览器特性遗留目录中分离出来,一次推进多个干净的改动,最终完成跨数百个文件、架构级重构——官方说法是把几个月的工作压缩到几周。

这个重构对用户的可见影响写得很具体:live webpage 可以在标签页、侧边栏和浮动窗口之间移动而不需要重新加载,从而消掉了一整类浏览器崩溃。这是「长周期」的一个好样本:它不是一个能一次提交完的任务,是几百个必须彼此不打架的提交。

我不会照抄「几个月变几周」这个结论,因为分母没说清。但其中可复用的方法论很清楚:把不变量写成可执行的契约,每接受一批改动就跑一次。下面那段代码就是我说的契约指纹——用同一组命令,比较退出码和输出哈希,而不是比较 diff 长得像不像。

# Long-horizon refactors fail in a specific way: the code still compiles, the tests
# still pass, and the public behaviour changed anyway. Compare behaviour, not diffs.
import json, subprocess, hashlib

def fingerprint(cmd: str) -> str:
    out = subprocess.run(cmd, shell=True, capture_output=True, text=True)
    payload = {"rc": out.returncode, "stdout": out.stdout.strip()}
    return hashlib.sha256(json.dumps(payload, sort_keys=True).encode()).hexdigest()[:16]

CONTRACTS = {
    "cli_help":      "python -m billing --help",
    "http_openapi":  "curl -s localhost:8080/openapi.json",
    "sample_invoice": "python -m billing quote --sku A-1 --qty 3",
}

def verify(baseline: dict) -> dict:
    report = {}
    for name, cmd in CONTRACTS.items():
        now = fingerprint(cmd)
        report[name] = {"match": now == baseline[name], "now": now}
    report["all_match"] = all(v["match"] for v in report.values() if isinstance(v, dict))
    return report

baseline = {name: fingerprint(cmd) for name, cmd in CONTRACTS.items()}
print(json.dumps(verify(baseline), indent=2))
# Run this before the agent starts and after every accepted batch of changes.
# "Months of work in weeks" is only good news if the contracts still match.
屏幕上的代码

600 万行的遗留目录,拆成几百个互不打架的提交。

ADK 与 xTB:把「一个段落的目标」交给模型

第二个案例更像 agent 的原生用法。Google 的 Agent Development Kit 团队给了 Argon 一份 .agents/skills 规则手册加一个段落的目标——在「不破坏现有应用」的前提下消除框架开销——然后让它整夜自主工作。结果进了 google/adk-python 主干:长会话的内存会话准备时间降低 40%,冷启动 import 快 21%。

第三个案例是 xTB,一个量子化学里被引用最多的开源包之一。用 Argon 在 Antigravity 里改完之后,预测分子结构快 2.3 倍,构象搜索快 1.8 倍,改动已经合回 xTB 的官方 GitHub 仓库。

这两个案例的共同点是:给的输入不是「把这段代码优化一下」,而是「规则手册 + 一个可测量的目标 + 不许破坏的边界」。这是我在自己流水线里唯一验证过有效的自主模式。规则手册里最该写死的一条是:改动必须可测量,测不出来就停下报告,不要继续猜。

# The overnight pattern Google described for its own ADK codebase: hand the agent a
# rulebook plus one paragraph of intent, let it work, then review what it produced.
# The rulebook is the part that makes autonomy survivable.
import json, pathlib

RULES = pathlib.Path(".agents/skills/performance.md")
GOAL = (
    "Cut in-memory session preparation time for long sessions without breaking "
    "any existing application. Benchmark before and after. Do not change public APIs."
)

def build_task(goal: str, rules: str) -> str:
    return f"""## Rules (non-negotiable)
{rules}

## Goal
{goal}

## Deliverables
1. A benchmark script that reproduces the baseline on demand.
2. Each change as a separate commit with the measurement it moved.
3. A list of anything you chose not to change, and why.
"""

task = build_task(GOAL, RULES.read_text())
pathlib.Path(".agents/task.md").write_text(task)
print(json.dumps({"task_chars": len(task), "rules_chars": len(RULES.read_text())}))

# Two guardrails worth adding on day one: a hard token/time budget, and a rule that
# the agent must stop and report when a change cannot be measured.

Google 自己承认的那些数字,可信度怎么判

Google 说内部团队在 Antigravity 里用 Argon,agentic 代码提交量提升了 35% 以上,同时代码回滚减少了近三分之一。这两个数字是一起给的,这一点很重要——只提提交量提升是危险的,只提回滚下降是可疑的,两个同时成立才说明「提得多且提得对」。

还有一个我最愿意相信的数字藏在 Gemma 那条里:用 Argon 在 A100 上通过 vLLM 把 Gemma 4 E2B 的端到端推理提速 2.85 倍,从约 37,900 tokens/s 到超过 108,000 tokens/s,且 100% token parity、零质量损失,几天做完通常要几个月的事。值得抄的不是 2.85 这个倍数,是「100% token parity」这个验收条件。

所以我给迁移任务设的闸门是:先跑基线,再用同一套固定语料跑一遍,比较失败数和输出体积漂移,两个都过才算过。固定语料这四个字是关键,不能拿 agent 恰好碰过的文件当验收范围。

# A migration gate for "we moved a lot of files and it still works". Run it on a
# fixed corpus, not on whatever the agent happened to touch.
import subprocess, statistics

def run_suite(entry: str, corpus: list[str]) -> dict:
    lat, failures = [], 0
    for case in corpus:
        p = subprocess.run([entry, case], capture_output=True)
        if p.returncode != 0:
            failures += 1
        lat.append(len(p.stdout))
    return {"failures": failures, "out_bytes_median": statistics.median(lat)}

def gate(before: dict, after: dict, allowed_new_failures=0, max_size_drift=0.10):
    drift = abs(after["out_bytes_median"] - before["out_bytes_median"]) / max(1, before["out_bytes_median"])
    return {
        "no_new_failures": after["failures"] <= before["failures"] + allowed_new_failures,
        "output_stable": drift <= max_size_drift,
        "ship": after["failures"] <= before["failures"] + allowed_new_failures and drift <= max_size_drift,
    }

before = run_suite("./bin/render", [f"cases/{i}.html" for i in range(200)])
after  = run_suite("./bin/render", [f"cases/{i}.html" for i in range(200)])
print(gate(before, after))
# Google reports a 2.85x inference speedup on Gemma 4 E2B with 100% token parity.
# Parity is the claim worth copying into your own process, not the multiplier.
开发者在键盘上敲代码

值得抄的不是加速倍数,是「100% token parity」这个验收条件。

📌 常见问题 FAQ

Gemini 4 Argon 的 API 模型 ID 是什么?

Google 的官方博客没有在正文里给出模型 ID,而是指向 Gemini API Developer Guide 让你查模型详情。稳妥做法是先调 models.list() 看你这个项目实际能调到哪些模型,再从中取 ID,不要凭猜写进代码。

2 美元和 10 美元会一直有效吗?

不会。Google 明确把这组价格称为 introductory price(尝鲜价),并说明最终会升到每百万输入 token 4 美元、输出 20 美元。做成本模型时必须两个档都算,缓存输入 95% 的折扣是这段定价里对架构影响最大的部分。

Vals 指数第一名意味着什么?

这是 Google 自己的表述。Vals 指数衡量的是模型在金融、编码、法律、税务等经济部门任务上的表现,是一个综合指数而不是单一基准。它说明这些领域整体不错,不说明它在某一个具体任务上最优,具体任务还是自己跑一遍。

适合拿它做什么类型的任务?

Google 的定位是长周期、需要深度推理和结构精度的工作流:代码迁移、跨数百文件的架构重构、前沿科研。这类任务的特征是「一次做不完,需要几十上百个彼此一致的提交」,而不是「一句话问答」。

怎么验证一次大重构没有悄悄改变行为?

别比 diff。选一组固定的命令作为契约(CLI 帮助、OpenAPI 输出、样例报价),在改动前记录退出码和输出哈希,每接受一批改动就跑一次。只要有一个契约不匹配就停下来。这比「测试还是绿的」可靠得多,因为测试覆盖不到的正是重构最容易改坏的部分。