Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/types/src/__tests__/google-models.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
import { geminiModels } from "../providers/gemini.js"
import { vertexModels } from "../providers/vertex.js"

describe.each([
["Gemini API", geminiModels["gemini-4-argon"]],
["Vertex AI", vertexModels["gemini-4-argon"]],
])("Gemini 4 Argon on %s", (_provider, model) => {
// https://cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon
it("exposes the documented limits, thinking levels, and promo pricing", () => {
expect(model.maxTokens).toBe(65_536)
expect(model.contextWindow).toBe(1_048_576)
expect(model.supportsImages).toBe(true)
// Implicit caching only; explicit context caching is unsupported.
expect(model.supportsPromptCache).toBe(true)
expect(model).not.toHaveProperty("cacheWritesPrice")
// LOW, MEDIUM (default), HIGH; thinking_budget and MINIMAL error out.
expect(model.supportsReasoningEffort).toEqual(["low", "medium", "high"])
expect(model.reasoningEffort).toBe("medium")
expect(model.supportsReasoningBudget).toBe(false)
// The backend ignores temperature/top_p/top_k.
expect(model.supportsTemperature).toBe(false)
// Promo pricing through Nov 30, 2026 (input $4 / output $20 / cache
// $0.20 per 1M tokens from Dec 1, 2026).
expect(model.inputPrice).toBe(2.0)
expect(model.outputPrice).toBe(10.0)
expect(model.cacheReadsPrice).toBe(0.1)
})
})

describe.each([
["Gemini API", geminiModels["gemini-3.7-flash"]],
["Vertex AI", vertexModels["gemini-3.7-flash"]],
Expand Down
20 changes: 20 additions & 0 deletions packages/types/src/providers/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ export type GeminiModelId = keyof typeof geminiModels
export const geminiDefaultModelId: GeminiModelId = "gemini-3.1-pro-preview"

export const geminiModels = {
// https://cloud.google.com/gemini-enterprise-agent-platform/models/guides/gemini-4-argon
"gemini-4-argon": {
maxTokens: 65_536, // Single-request streaming cap; long decodes up to 1M via continuation tokens.
contextWindow: 1_048_576, // Shared across input, thinking, and output tokens.
supportsImages: true,
// Implicit caching only (automatic for prompt prefixes >= 6,144 tokens);
// explicit context caching is not supported on this model.
supportsPromptCache: true,
supportsReasoningEffort: ["low", "medium", "high"],
reasoningEffort: "medium",
// thinking_budget returns an HTTP 400 error on this model.
supportsReasoningBudget: false,
// The backend ignores temperature/top_p/top_k.
supportsTemperature: false,
// Promo pricing through Nov 30, 2026; from Dec 1, 2026: input $4.00,
// output $20.00, cached input $0.20 per 1M tokens.
inputPrice: 2.0,
outputPrice: 10.0, // Includes thinking tokens.
cacheReadsPrice: 0.1,
},
"gemini-3.7-flash": {
maxTokens: 65_536,
contextWindow: 1_048_576,
Expand Down
22 changes: 22 additions & 0 deletions packages/types/src/providers/vertex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ export type VertexModelId = keyof typeof vertexModels
export const vertexDefaultModelId: VertexModelId = "claude-sonnet-4-5@20250929"

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