> 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.

# Gemini 3 Flash

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

| Google 模型 ID            | 适用场景              | Google Cloud 原生 `thinkingLevel`     | Gemini Developer API          |
| ----------------------- | ----------------- | ----------------------------------- | ----------------------------- |
| `gemini-3.8-flash`      | 复杂推理、代码和长流程任务     | `LOW`、`MEDIUM`（默认）、`HIGH`           | 正式型号                          |
| `gemini-3.7-flash`      | 代码与多步骤工作流         | `LOW`、`MEDIUM`（默认）、`HIGH`           | API 请求自动转向 `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`（默认）、`HIGH` | API 请求自动转向 `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 型号生命周期](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-versions)和 [3.6 Flash 规格](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/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 调用时，按[网关型号查询](https://little-butterfly-9bfe.sentia389.workers.dev/models/google/index.md#%E9%80%9A%E8%BF%87-routerlio-%E8%B0%83%E7%94%A8)选择令牌可见的 ID，并按渠道支持选择[原生接口](https://little-butterfly-9bfe.sentia389.workers.dev/start/gemini.md)或 [Chat Completions](https://little-butterfly-9bfe.sentia389.workers.dev/start/chat-completions.md)。

## 官方参考

- [Gemini 3.8 Flash 规格](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-8-flash)
- [Gemini 3.7 Flash 规格](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-7-flash)
- [Gemini 3.6 Flash 规格](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-6-flash)
- [Gemini 3.5 Flash-Lite 规格](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-5-flash-lite)
- [Gemini 3.5 Flash 规格](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/gemini/3-5-flash)
- [Google Cloud Chat Completions 支持清单及参数](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/migrate/openai/overview#supported-models)
- [Gemini Developer API 停用与迁移说明](https://aistudio.google.com/docs/deprecations#gemini-3-models)
- [Gemini Developer API OpenAI 兼容指南](https://aistudio.google.com/docs/openai)
