Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(model-prices): add gemini-3.1-pro-preview model pricing and support (#12143)

Hassieb Pakzad539254770f24
diff --git a/packages/shared/src/server/llm/types.ts b/packages/shared/src/server/llm/types.ts
index 917259a634..28ed692278 100644
--- a/packages/shared/src/server/llm/types.ts
+++ b/packages/shared/src/server/llm/types.ts
@@ -435,6 +435,7 @@ export const anthropicModels = [
export const vertexAIModels = [
"gemini-2.5-flash",
"gemini-2.5-pro",
+ "gemini-3.1-pro-preview",
"gemini-3-pro-preview",
"gemini-3-flash-preview",
"gemini-2.5-flash-preview-09-2025",
@@ -453,6 +454,7 @@ export const vertexAIModels = [
export const googleAIStudioModels = [
"gemini-2.5-flash",
"gemini-2.5-pro",
+ "gemini-3.1-pro-preview",
"gemini-3-pro-preview",
"gemini-3-flash-preview",
"gemini-2.5-flash-lite",
diff --git a/worker/src/constants/default-model-prices.json b/worker/src/constants/default-model-prices.json
index 302e0e3192..4fa3a7ac95 100644
--- a/worker/src/constants/default-model-prices.json
+++ b/worker/src/constants/default-model-prices.json
@@ -3438,6 +3438,66 @@
}
]
},
+ {
+ "id": "55106bba-a5dd-441b-bc0d-5652582b349d",
+ "modelName": "gemini-3.1-pro-preview",
+ "matchPattern": "(?i)^(google\/)?(gemini-3.1-pro-preview(-customtools)?)$",
+ "createdAt": "2026-02-19T00:00:00.000Z",
+ "updatedAt": "2026-02-19T00:00:00.000Z",
+ "pricingTiers": [
+ {
+ "id": "55106bba-a5dd-441b-bc0d-5652582b349d_tier_default",
+ "name": "Standard",
+ "isDefault": true,
+ "priority": 0,
+ "conditions": [],
+ "prices": {
+ "input": 2e-6,
+ "input_modality_1": 2e-6,
+ "prompt_token_count": 2e-6,
+ "promptTokenCount": 2e-6,
+ "input_cached_tokens": 0.2e-6,
+ "cached_content_token_count": 0.2e-6,
+ "output": 12e-6,
+ "output_modality_1": 12e-6,
+ "candidates_token_count": 12e-6,
+ "candidatesTokenCount": 12e-6,
+ "thoughtsTokenCount": 12e-6,
+ "thoughts_token_count": 12e-6,
+ "output_reasoning": 12e-6
+ }
+ },
+ {
+ "id": "ada11e9f-fe0d-465a-92af-ce334d0eedeb",
+ "name": "Large Context",
+ "isDefault": false,
+ "priority": 1,
+ "conditions": [
+ {
+ "usageDetailPattern": "(input|prompt|cached)",
+ "operator": "gt",
+ "value": 200000,
+ "caseSensitive": false
+ }
+ ],
+ "prices": {
+ "input": 4e-6,
+ "input_modality_1": 4e-6,
+ "prompt_token_count": 4e-6,
+ "promptTokenCount": 4e-6,
+ "input_cached_tokens": 0.4e-6,
+ "cached_content_token_count": 0.4e-6,
+ "output": 18e-6,
+ "output_modality_1": 18e-6,
+ "candidates_token_count": 18e-6,
+ "candidatesTokenCount": 18e-6,
+ "thoughtsTokenCount": 18e-6,
+ "thoughts_token_count": 18e-6,
+ "output_reasoning": 18e-6
+ }
+ }
+ ]
+ },
{
"id": "cmj2n4f2a000304kz49g4c43u",
"modelName": "gpt-5.2",