Skip to content

Commit 8018cba

Browse files
zoomote[bot]taltas
andauthored
feat(providers): add Gemini 4 Argon to Gemini and Vertex AI providers (#2043)
Co-authored-by: @taltas <6816042+taltas@users.noreply.github.com>
1 parent 530d01e commit 8018cba

3 files changed

Lines changed: 68 additions & 0 deletions

File tree

‎packages/types/src/__tests__/google-models.test.ts‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
import { geminiModels } from "../providers/gemini.js"
22
import { vertexModels } from "../providers/vertex.js"
33

4+
describe.each([
5+
["Gemini API", geminiModels["gemini-4-argon"]],
6+
["Vertex AI", vertexModels["gemini-4-argon"]],
7+
])("Gemini 4 Argon on %s", (_provider, model) => {
8+
// https://cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon
9+
it("exposes the documented limits, thinking levels, and promo pricing", () => {
10+
expect(model.maxTokens).toBe(65_536)
11+
expect(model.contextWindow).toBe(1_048_576)
12+
expect(model.supportsImages).toBe(true)
13+
// Implicit caching only; explicit context caching is unsupported.
14+
expect(model.supportsPromptCache).toBe(true)
15+
expect(model).not.toHaveProperty("cacheWritesPrice")
16+
// LOW, MEDIUM (default), HIGH; thinking_budget and MINIMAL error out.
17+
expect(model.supportsReasoningEffort).toEqual(["low", "medium", "high"])
18+
expect(model.reasoningEffort).toBe("medium")
19+
expect(model.supportsReasoningBudget).toBe(false)
20+
// The backend ignores temperature/top_p/top_k.
21+
expect(model.supportsTemperature).toBe(false)
22+
// Promo pricing through Nov 30, 2026 (input $4 / output $20 / cache
23+
// $0.20 per 1M tokens from Dec 1, 2026).
24+
expect(model.inputPrice).toBe(2.0)
25+
expect(model.outputPrice).toBe(10.0)
26+
expect(model.cacheReadsPrice).toBe(0.1)
27+
})
28+
})
29+
430
describe.each([
531
["Gemini API", geminiModels["gemini-3.7-flash"]],
632
["Vertex AI", vertexModels["gemini-3.7-flash"]],

‎packages/types/src/providers/gemini.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,26 @@ export type GeminiModelId = keyof typeof geminiModels
66
export const geminiDefaultModelId: GeminiModelId = "gemini-3.1-pro-preview"
77

88
export const geminiModels = {
9+
// https://cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon
10+
"gemini-4-argon": {
11+
maxTokens: 65_536, // Single-request streaming cap; long decodes up to 1M via continuation tokens.
12+
contextWindow: 1_048_576, // Shared across input, thinking, and output tokens.
13+
supportsImages: true,
14+
// Implicit caching only (automatic for prompt prefixes >= 6,144 tokens);
15+
// explicit context caching is not supported on this model.
16+
supportsPromptCache: true,
17+
supportsReasoningEffort: ["low", "medium", "high"],
18+
reasoningEffort: "medium",
19+
// thinking_budget returns an HTTP 400 error on this model.
20+
supportsReasoningBudget: false,
21+
// The backend ignores temperature/top_p/top_k.
22+
supportsTemperature: false,
23+
// Promo pricing through Nov 30, 2026; from Dec 1, 2026: input $4.00,
24+
// output $20.00, cached input $0.20 per 1M tokens.
25+
inputPrice: 2.0,
26+
outputPrice: 10.0, // Includes thinking tokens.
27+
cacheReadsPrice: 0.1,
28+
},
929
"gemini-3.7-flash": {
1030
maxTokens: 65_536,
1131
contextWindow: 1_048_576,

‎packages/types/src/providers/vertex.ts‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ export type VertexModelId = keyof typeof vertexModels
66
export const vertexDefaultModelId: VertexModelId = "claude-sonnet-4-5@20250929"
77

88
export const vertexModels = {
9+
// https://cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon
10+
// Available in the global, us, and eu locations.
11+
"gemini-4-argon": {
12+
maxTokens: 65_536, // Single-request streaming cap; long decodes up to 1M via continuation tokens.
13+
contextWindow: 1_048_576, // Shared across input, thinking, and output tokens.
14+
supportsImages: true,
15+
// Implicit caching only (automatic for prompt prefixes >= 6,144 tokens);
16+
// explicit context caching is not supported on this model.
17+
supportsPromptCache: true,
18+
supportsReasoningEffort: ["low", "medium", "high"],
19+
reasoningEffort: "medium",
20+
// thinking_budget returns an HTTP 400 error on this model.
21+
supportsReasoningBudget: false,
22+
// The backend ignores temperature/top_p/top_k.
23+
supportsTemperature: false,
24+
// Standard tier promo pricing (Global) through Nov 30, 2026; from
25+
// Dec 1, 2026: input $4.00, output $20.00, cached input $0.20 per 1M
26+
// tokens. Non-global locations are +10%.
27+
inputPrice: 2.0,
28+
outputPrice: 10.0, // Includes thinking tokens.
29+
cacheReadsPrice: 0.1,
30+
},
931
"gemini-3.7-flash": {
1032
maxTokens: 65_536,
1133
contextWindow: 1_048_576,

0 commit comments

Comments
 (0)