Skip to content

Providers / OpenCode · All access methods for google/gemini-3.1-pro-preview

Gemini 3.1 Pro Preview

opencode/gemini-3.1-pro API key models.dev2026-11-17

Type chat · Released 2026-02-19

Input window
1,048,576 tokensdocumented
models.dev · 2026-11-17
Input and output together
Context window
1,048,576 tokens
Exposed by this provider
Maximum output
65,536 tokens
Per response; not a default
Cache lifetime, short
Unknown
Not documented or measured
Cache lifetime, long
Unknown
Not documented or measured

Limits

Input window

LimitValueSource
Input window
input_window: the most input one request can carry on this entry, in tokens as the provider counts them.
1,048,576 tokensdocumentedInput and output togethermodels.dev2026-11-17
Documented
The figure the source documents, and the field it is in.
1,048,576 tokenslimit.contextmodels.dev2026-11-17
Measured
What each limit evaluation that counts gives, one line per evaluation.
Not measured–

How the input window is worked out, and what it does not say

Documented

LimitValueSource
Context window
limit.context: what this provider accepts for the model, input and output together.
1,048,576 tokensmodels.dev
Largest input
limit.input: stated where the input limit is lower than the context window.
Unknown–
Maximum output
limit.output: the most one response can hold. A maximum, not what you get by default.
65,536 tokensmodels.dev

Measured tokens

DateMeasured throughContextInput acceptedInput refusedOutput limitRequested output acceptedEvidence
No limits were measured on this entry.

Price

Base chargeRate
Input$2 / 1M tokens
Output$12 / 1M tokens
Reasoning outputUnknown
Cache read$0.20 / 1M tokens
Cache writeUnknown

Conditional rates

ConditionChargeRateApplies to
Context above 200,000 tokensInput$4 / 1M tokensWhole request
Output$18 / 1M tokens
Cache read$0.40 / 1M tokens

Source: models.dev 2026-11-17

Other prices in the source, not shown above (0)

None

Request controls

ControlSupportRequest fieldAccepted valuesDefaultConditions
Service tierUnknownUnknownUnknownUnknownUnknown

Source: Unknown

Prompt caching

Lifetimes

Every cache lifetime of this entry, by retention
LifetimeDocumented for, or measured throughTime since the prompt was cached · served from the cache, in percent, with hits/checks
At once2.5 min5 min7.5 min10 min15 min20 min25 min30 min40 min50 min1 h1 h 151 h 302 h4 h8 h12 h24 h
Short retention
Safe lifetime
Unknown
Documented
Not documented
Measured
Not measured
Inside the documented lifetime
Not applicable
Long retention
Safe lifetime
Unknown
Documented
Not documented
Measured
Not measured
Inside the documented lifetime
Not applicable

Checks served from the cache, in percent and as hits/checks, by time since the prompt was cached100 All67 Half or more33 Fewer0 None· Not checked at that ageMethodology

Cache modes

ModeSupportedMin. tokensBreakpointsTargets
Automatic implicit Unknown Unknown Unknown Unknown
Manual explicit Unknown Unknown Unknown Unknown

Source: models.dev · Cache modes

Retention

ControlSupportRequest fieldAccepted valuesDefaultConditions
Cache retentionUnknownUnknownUnknownUnknownUnknown

Source: Unknown

Provenance

ProvenanceValue
Sourcemodels.dev2026-11-17
Inherited fromNone
CorrectionsNone
EvidenceNone

Data

GET /api/v1/entries/opencode/gemini-3.1-pro

Show the full entry as published
{
  "id": "gemini-3.1-pro",
  "name": "Gemini 3.1 Pro Preview",
  "description": "Advanced Gemini model for complex reasoning, coding, and multimodal analysis",
  "type": "chat",
  "family": "gemini-pro",
  "canonical_id": "google/gemini-3.1-pro-preview",
  "release_date": "2026-02-19",
  "limit": {
    "context": 1048576,
    "output": 65536
  },
  "capabilities": {
    "temperature": true,
    "top_k": true,
    "top_p": true,
    "structured_output": true,
    "system_updates": false,
    "effort_updates": false,
    "tools": {
      "supported": true
    },
    "reasoning": {
      "supported": true,
      "effort": [
        "low",
        "medium",
        "high"
      ]
    }
  },
  "cost": {
    "text": {
      "input": {
        "price": 2,
        "cache": {
          "read": 0.2
        },
        "overrides": [
          {
            "when": {
              "context": {
                "gt": 200000
              }
            },
            "price": 4,
            "cache": {
              "read": 0.4
            }
          }
        ]
      },
      "output": {
        "price": 12,
        "overrides": [
          {
            "when": {
              "context": {
                "gt": 200000
              }
            },
            "price": 18
          }
        ]
      }
    }
  },
  "modalities": {
    "input": [
      "text",
      "image/png",
      "image/jpeg",
      "image/webp",
      "image/heic",
      "image/heif",
      "video/mp4",
      "video/mpeg",
      "video/mov",
      "video/avi",
      "video/x-flv",
      "video/mpg",
      "video/webm",
      "video/wmv",
      "video/3gpp",
      "audio/wav",
      "audio/mp3",
      "audio/aiff",
      "audio/aac",
      "audio/ogg",
      "audio/flac",
      "audio/mpeg",
      "audio/m4a",
      "audio/l16",
      "audio/opus",
      "audio/alaw",
      "audio/mulaw",
      "audio/webm",
      "application/pdf"
    ],
    "output": [
      "text"
    ]
  },
  "api": {
    "generate-content": {
      "base_url": "https://opencode.ai/inference/google/v1beta",
      "sdk": {
        "aisdk": "@ai-sdk/google",
        "opencodeai": "@opencode/ai/providers/google"
      },
      "capabilities": {
        "tools": {
          "choice": [
            "auto",
            "none",
            "required",
            "tool"
          ],
          "updates": []
        }
      }
    }
  },
  "open_weights": false,
  "knowledge": "2025-01",
  "last_updated": "2026-02-19",
  "providers_dev": {
    "origin": "upstream",
    "access": "api",
    "provenance": [],
    "inherited": null,
    "cache": {
      "documented": {
        "support": "unknown",
        "modes": {
          "implicit": {
            "support": "unknown",
            "min_tokens": null,
            "max_breakpoints": null,
            "targets": null
          },
          "explicit": {
            "support": "unknown",
            "min_tokens": null,
            "max_breakpoints": null,
            "targets": null
          }
        }
      },
      "retention": {
        "support": "unknown",
        "parameter": null,
        "accepted_values": null,
        "default": null,
        "profiles": [],
        "conditions": [],
        "evidence": []
      },
      "lifetime": {
        "short": {
          "safe_s": null,
          "basis": "none",
          "source": null,
          "date": null,
          "documented_s": null,
          "measured_s": null,
          "documented_status": null,
          "clients": 0,
          "evaluations": 0,
          "checks": 0,
          "hits": 0,
          "checks_inside": null,
          "hits_inside": null,
          "tested_from_s": null,
          "first_miss_s": null
        },
        "long": {
          "safe_s": null,
          "basis": "none",
          "source": null,
          "date": null,
          "documented_s": null,
          "measured_s": null,
          "documented_status": null,
          "clients": 0,
          "evaluations": 0,
          "checks": 0,
          "hits": 0,
          "checks_inside": null,
          "hits_inside": null,
          "tested_from_s": null,
          "first_miss_s": null
        },
        "lifetimes": []
      },
      "evaluations": []
    },
    "pricing": {
      "coverage": "partial",
      "billing": "per_use",
      "reference_ref": null,
      "rules": [
        {
          "id": "cost.text.input.price",
          "when": null,
          "meter": "text.input",
          "operation": "set",
          "amount": 2,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.price",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.input.cache.read",
          "when": null,
          "meter": "text.cache_read",
          "operation": "set",
          "amount": 0.2,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.cache.read",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.output.price",
          "when": null,
          "meter": "text.output",
          "operation": "set",
          "amount": 12,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.output.price",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.input.overrides[0].price",
          "when": {
            "kind": "predicate",
            "field": "request.context_tokens",
            "op": "gt",
            "value": 200000
          },
          "meter": "text.input",
          "operation": "set",
          "amount": 4,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.overrides[0].price",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.input.overrides[0].cache.read",
          "when": {
            "kind": "predicate",
            "field": "request.context_tokens",
            "op": "gt",
            "value": 200000
          },
          "meter": "text.cache_read",
          "operation": "set",
          "amount": 0.4,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.input.overrides[0].cache.read",
          "period": null,
          "resulting_rates": null
        },
        {
          "id": "cost.text.output.overrides[0].price",
          "when": {
            "kind": "predicate",
            "field": "request.context_tokens",
            "op": "gt",
            "value": 200000
          },
          "meter": "text.output",
          "operation": "set",
          "amount": 18,
          "currency": "USD",
          "unit": {
            "name": "token",
            "quantity": 1000000
          },
          "applies_to": "all_usage",
          "source_path": "cost.text.output.overrides[0].price",
          "period": null,
          "resulting_rates": null
        }
      ],
      "rule_order": "listed",
      "unparsed": [],
      "evidence": [
        {
          "kind": "documented",
          "url": "https://models.dev",
          "date": "2026-11-17",
          "note": "The cost models.dev records for this entry. Rules are in the order models.dev applies them: base prices, overrides in their order, then multipliers."
        }
      ]
    },
    "request_controls": {
      "coverage": "unknown",
      "items": [
        {
          "id": "cache.retention",
          "support": "unknown",
          "when": null,
          "bindings": null,
          "options": null,
          "default": null,
          "conditions": [],
          "evidence": []
        },
        {
          "id": "service_tier",
          "support": "unknown",
          "when": null,
          "bindings": null,
          "options": null,
          "default": null,
          "conditions": [],
          "evidence": []
        }
      ]
    },
    "limits": {
      "measured": [],
      "from_measurement": [],
      "input_window": {
        "tokens": 1048576,
        "basis": "documented",
        "bound": "limit",
        "scope": "window",
        "source": "models.dev",
        "date": "2026-11-17",
        "documented_tokens": 1048576,
        "documented_field": "limit.context",
        "documented_source": "models.dev",
        "documented_date": "2026-11-17",
        "documented_status": null,
        "measured_tokens": null,
        "measured_bound": null,
        "measured_kind": null,
        "measured_refused": null,
        "measured_date": null,
        "clients": 0,
        "evaluations": 0,
        "measurements": []
      }
    },
    "evidence": [],
    "verified": null
  }
}