Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

feat(models): 新增 Google Gemini 4 Argon 模型资料与两段参考价 (#6007)

Dash6235b9cf0f9e
diff --git a/apps/desktop/src/main/maker-host/__tests__/activeCatalogXdAvailability.test.ts b/apps/desktop/src/main/maker-host/__tests__/activeCatalogXdAvailability.test.ts
index ebf9850bc2..33e0627498 100644
--- a/apps/desktop/src/main/maker-host/__tests__/activeCatalogXdAvailability.test.ts
+++ b/apps/desktop/src/main/maker-host/__tests__/activeCatalogXdAvailability.test.ts
@@ -820,6 +820,30 @@ describe('XD 网关权威模型清单重建', () => {
expect(resolveXdPiGatewayApi('meta/muse-wonder-1.0')).toBe('openai-responses');
});
+ it.each(['google/gemini-4-argon', 'gemini-4-argon'])(
+ 'Gemini 4 Argon 网关条目 %s 按公共型号补齐三引擎资料,只在原生 Pi 默认显示',
+ (id) => {
+ setActiveCatalog(BUNDLED_CATALOG);
+ setXdGatewayModels([{ id, agents: ['claude-code', 'codex', 'pi'] }]);
+ for (const agent of ['claude-code', 'codex', 'pi'] as const) {
+ const model = xdModels(agent).find((m) => m.id === id);
+ expect(model, agent).toMatchObject({
+ name: 'Gemini 4 Argon',
+ group: 'google',
+ nativeApi: 'google-generative-ai',
+ contextWindow: 1_048_576,
+ supportsImageInput: true,
+ efforts: ['low', 'medium', 'high'],
+ defaultEffort: 'medium',
+ });
+ // Claude Code / Codex 走跨 Harness bridge,默认关闭;Pi 原生支持 Google 协议。
+ if (agent === 'pi') expect(model?.defaultEnabled).not.toBe(false);
+ else expect(model?.defaultEnabled).toBe(false);
+ }
+ expect(resolveXdPiGatewayApi(id)).toBe('google-generative-ai');
+ },
+ );
+
it('efforts 缺失时不合成档位,也不猜默认档', () => {
setActiveCatalog(BUNDLED_CATALOG);
setXdGatewayModels([
diff --git a/docs/model-catalog-history.md b/docs/model-catalog-history.md
index 969df4391a..71c6ffb33c 100644
--- a/docs/model-catalog-history.md
+++ b/docs/model-catalog-history.md
@@ -3,6 +3,35 @@
> 参考记录,不是当前配置或部署状态。当前维护规则见 [模型配置与下发](dev-rules/model-catalog-maintenance.md)。
> 下列文字记录各批次当时的事实,不能相互当作后续状态的证明。引用时须带日期、来源和验证范围。
+## Google Gemini 4 Argon(2026-10-14)
+
+Google 于 2026-09-30 发布 Gemini 4 Argon,2026-10-13 在 Gemini API 正式可用(稳定版,无 preview 后缀)。依据
+Gemini API 官方[模型页](https://ai.google.dev/gemini-api/docs/models/gemini-4-argon)、
+[思考](https://ai.google.dev/gemini-api/docs/thinking)、[价格](https://ai.google.dev/gemini-api/docs/pricing)
+页(核验日 2026-10-14),在 Server 正本与客户端离线 Registry 同步新增:
+
+- 公共型号 `google/gemini-4-argon`(精确 alias `gemini-4-argon`,名称 Gemini 4 Argon):1,048,576 上下文
+ (输入输出合计),文字 / 图片输入、文字输出(官方另支持视频、音频、PDF 输入,Cindy 现有字段只登记已使用的
+ 文字与图片),low / medium / high 三档,官方默认 medium。官方只文档化 `thinking_level`,没有 `minimal`
+ 与关闭档,不登记。
+- 最大输出登记默认同步上限 65,536。官方另有 long decode 可到 1,048,576,需单独启用,Cindy 未接入该模式,
+ 不把它当作默认输出上限。
+- global 官方 Standard 参考价分两段(USD,每百万 tokens,输出含思考):2026-10-13 起 2 / 10 / 缓存读 0.1,
+ 至 2026-12-01(不含);2026-12-01 起 4 / 20 / 缓存读 0.2。沿用既有 `effectiveFrom` / `effectiveUntil`
+ 区间,未新增机制。官方只有隐式缓存,无缓存写价,保持未知;Batch / Flex 五折与 Priority 档不属于
+ `standard` 变体,未登记。
+- **不加 Registry 接入条目或 XD route**,与 Gemini 3.8 Flash 相同。XD Gateway 近期的 Gemini 型号以
+ `google/` 前缀上架(核验时本机 XD 价格缓存有 `google/gemini-3.7-flash`、`google/gemini-3.8-flash`,
+ 旧型号为裸 ID),而两端在没有匹配 route 时都按公共 ID / alias 回落公共资料:`google/gemini-4-argon`
+ 与裸 `gemini-4-argon` 在 Claude Code / Codex / Pi 三个引擎得到同一份名称、窗口、图片输入与档位,
+ 原生协议由已有 `gemini-` 家族规则给出,不必猜测 Gateway 实际 ID。Google API Key 直连(发现到
+ `gemini-4-argon`)同样经 alias 取得资料。
+
+成员仍以 Gateway `/models` 与各连接的模型发现为准:核验时本机 XD 价格缓存(2026-10-14)没有 Argon,
+本批只是资料先行。Google 说明该型号不在免费层与 Google AI Pro 提供,因此未加入 Google Gemini API 预设的
+推荐清单;默认推荐、排序与默认显示均未改。Pi 上游生成目录 `provider-models.json` 未重新导入,
+其中尚无该型号的渠道记录。revision 为 `2026-10-14T00:00:00.000Z`,与 Server 正本同内容。
+
## Meta Muse Wonder(2026-10-13)
Meta 于 2026-10-12 发布 Muse Wonder / Muse Wonder Full。依据 Meta Model API 官方
diff --git a/packages/model-providers/catalog/model-registry.json b/packages/model-providers/catalog/model-registry.json
index 3d35ce35bd..931418d14e 100644
--- a/packages/model-providers/catalog/model-registry.json
+++ b/packages/model-providers/catalog/model-registry.json
@@ -1,6 +1,6 @@
{
"schemaVersion": 5,
- "updatedAt": "2026-10-13T00:00:00.000Z",
+ "updatedAt": "2026-10-14T00:00:00.000Z",
"models": [
{
"id": "openai/gpt-6.1-sol",
@@ -5084,6 +5084,71 @@
}
]
},
+ {
+ "id": "google/gemini-4-argon",
+ "aliases": [
+ "gemini-4-argon"
+ ],
+ "defaults": {
+ "name": "Gemini 4 Argon",
+ "description": "Google Gemini 4 Argon — flagship reasoning model with a unified 1M context window",
+ "group": "google",
+ "contextWindow": 1048576,
+ "maxOutputTokens": 65536,
+ "efforts": [
+ "low",
+ "medium",
+ "high"
+ ],
+ "defaultEffort": "medium",
+ "supportsImageInput": true,
+ "mode": "chat",
+ "modalities": {
+ "input": [
+ "text",
+ "image"
+ ],
+ "output": [
+ "text"
+ ]
+ },
+ "officialDocs": "https://ai.google.dev/gemini-api/docs/models/gemini-4-argon"
+ },
+ "referencePriceGroups": [
+ {
+ "id": "global",
+ "prices": [
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 2,
+ "outputPerMtok": 10,
+ "cacheReadPerMtok": 0.1,
+ "effectiveFrom": "2026-10-13",
+ "effectiveUntil": "2026-12-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-10-14"
+ }
+ },
+ {
+ "currency": "USD",
+ "variant": "standard",
+ "inputPerMtok": 4,
+ "outputPerMtok": 20,
+ "cacheReadPerMtok": 0.2,
+ "effectiveFrom": "2026-12-01",
+ "source": {
+ "kind": "provider-official",
+ "url": "https://ai.google.dev/gemini-api/docs/pricing",
+ "verifiedAt": "2026-10-14"
+ }
+ }
+ ]
+ }
+ ]
+ },
{
"id": "google/gemini-3.7-flash",
"aliases": ["gemini-3.7-flash"],
diff --git a/packages/model-providers/src/__tests__/gemini4ArgonCatalog.test.ts b/packages/model-providers/src/__tests__/gemini4ArgonCatalog.test.ts
new file mode 100644
index 0000000000..295f863410
--- /dev/null
+++ b/packages/model-providers/src/__tests__/gemini4ArgonCatalog.test.ts
@@ -0,0 +1,65 @@
+import { describe, expect, it } from "vitest";
+import { BUNDLED_CATALOG } from "../builtin.js";
+import {
+ resolveBaseModelReferencePrice,
+ resolveModelNativeApi,
+} from "../modelRegistry.js";
+
+const registry = BUNDLED_CATALOG.modelRegistry;
+
+// Gemini API docs (models/gemini-4-argon, thinking, pricing), checked 2026-10-14.
+describe("Gemini 4 Argon catalog entry", () => {
+ const base = registry?.baseModels?.find(
+ (m) => m.id === "google/gemini-4-argon",
+ );
+
+ it("publishes the official specs on the public model", () => {
+ expect(base?.aliases).toEqual(["gemini-4-argon"]);
+ expect(base?.defaults).toMatchObject({
+ name: "Gemini 4 Argon",
+ group: "google",
+ contextWindow: 1048576,
+ // 1,048,576 output needs long decode; the catalog keeps the default synchronous cap.
+ maxOutputTokens: 65536,
+ supportsImageInput: true,
+ modalities: { input: ["text", "image"], output: ["text"] },
+ // Google documents thinking_level only: no minimal, no off.
+ efforts: ["low", "medium", "high"],
+ defaultEffort: "medium",
+ });
+ });
+
+ it("stays a public model without a guessed gateway route", () => {
+ expect(
+ registry?.models.some((m) => m.modelRef === "google/gemini-4-argon"),
+ ).toBe(false);
+ for (const id of ["google/gemini-4-argon", "gemini-4-argon"])
+ expect(resolveModelNativeApi(registry, "xd", id), id).toBe(
+ "google-generative-ai",
+ );
+ });
+
+ it("switches from the launch price to the published 2026-12-01 price", () => {
+ const priceAt = (at: string) =>
+ resolveBaseModelReferencePrice(registry, "gemini-4-argon", { at })?.price;
+ expect(priceAt("2026-10-12")).toBeUndefined();
+ for (const at of ["2026-10-13", "2026-11-30"])
+ expect(priceAt(at), at).toMatchObject({
+ currency: "USD",
+ variant: "standard",
+ inputPerMtok: 2,
+ outputPerMtok: 10,
+ cacheReadPerMtok: 0.1,
+ });
+ for (const at of ["2026-12-01", "2027-06-01"])
+ expect(priceAt(at), at).toMatchObject({
+ currency: "USD",
+ variant: "standard",
+ inputPerMtok: 4,
+ outputPerMtok: 20,
+ cacheReadPerMtok: 0.2,
+ });
+ // Implicit caching only: Google publishes no cache-write price.
+ expect(priceAt("2026-10-14")?.cacheWritePerMtok).toBeUndefined();
+ });
+});