For AI agents: the complete documentation index is available at https://little-butterfly-9bfe.sentia389.workers.dev/llms.txt, the full documentation bundle is available at https://little-butterfly-9bfe.sentia389.workers.dev/llms-full.txt, and this page is available as Markdown at https://little-butterfly-9bfe.sentia389.workers.dev/models/google/gemini-3-flash.md.

Gemini 3 Flash

下列五个型号在 Google Cloud 均支持原生 GenerateContent 和 OpenAI 兼容 Chat Completions,输入上限为 1,048,576 token,最大输出为 65,536 token。原生 thinkingLevel 位于 generationConfig.thinkingConfig。

Google 模型 ID适用场景Google Cloud 原生 thinkingLevelGemini Developer API
gemini-3.8-flash复杂推理、代码和长流程任务LOW、MEDIUM(默认)、HIGH正式型号
gemini-3.7-flash代码与多步骤工作流LOW、MEDIUM(默认)、HIGHAPI 请求自动转向 gemini-3.8-flash
gemini-3.6-flash多步骤任务及多模态处理MINIMAL、LOW、MEDIUM(默认)、HIGH正式型号
gemini-3.5-flash-lite高吞吐的分类、抽取和轻量工作流MINIMAL(默认)、LOW、MEDIUM、HIGH正式型号
gemini-3.5-flash常规文本、工具调用和中等复杂度推理MINIMAL、LOW、MEDIUM(默认)、HIGHAPI 请求自动转向 gemini-3.6-flash

Gemini Developer API 提供原生 GenerateContent,并在 OpenAI 兼容指南中演示 gemini-3.8-flash。其他型号的兼容入口可通过同一 Gemini API Key 请求 GET /v1beta/openai/models 查询。表中的两个自动转向由 Google 在 Developer API 实施,Google Cloud 官方 Chat 支持清单仍分别列出五个型号。

Google Cloud 将 gemini-3.7-flash 和 gemini-3.6-flash 的退役日期定为 2027 年 1 月 28 日,迁移目标是 gemini-4-hydrogen。3.6 Flash 自 2026 年 11 月 19 日起已停止向新项目和不活跃项目开放。见 Google Cloud 型号生命周期和 3.6 Flash 规格。

Google Cloud OpenAI 兼容示例

在已认证且启用 Agent Platform API 的 Google Cloud 项目中运行。设置 GOOGLE_CLOUD_PROJECT 为项目 ID。Google Cloud Chat 入口使用 OAuth 访问令牌和带 google/ 前缀的模型 ID。

Bash
access_token=$(gcloud auth print-access-token) &&
curl --fail-with-body --silent --show-error \
  --url "https://aiplatform.googleapis.com/v1/projects/${GOOGLE_CLOUD_PROJECT:?请设置项目 ID}/locations/global/endpoints/openapi/chat/completions" \
  --header "Authorization: Bearer ${access_token}" \
  --header 'Content-Type: application/json' \
  --data-binary '{
    "model": "google/gemini-3.8-flash",
    "messages": [
      {
        "role": "user",
        "content": "请用一句话说明什么是缓存。"
      }
    ]
  }'

非流式响应节选如下,从 choices[].message.content 读取正文。

JSON
{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "缓存保存可重复使用的数据,以便更快读取。"
      },
      "finish_reason": "stop"
    }
  ]
}

请求中设置 stream: true 可接收 SSE,按候选索引拼接 choices[].delta.content。Google Cloud 将 max_completion_tokens 作为 max_tokens 的别名。兼容协议的 reasoning_effort 与原生推理档的取值规则见各平台的兼容指南。

通过 routerlio 调用时,按网关型号查询选择令牌可见的 ID,并按渠道支持选择原生接口或 Chat Completions。

官方参考