# Gemini 3.6 发布：temperature 等参数被弃用

Original title: Gemini last models: temperature, top_p, and top_k are deprecated and ignored

> Hacker News story 48998606 · language: zh · submitted 2026-07-21
> Web version: https://zeli.app/zh/story/48998606
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 132 · by [greatgib](<https://news.ycombinator.com/user?id=greatgib>) · 💬 45
[original](<https://ai.google.dev/gemini-api/docs/latest-model>) · [HN discussion](<https://news.ycombinator.com/item?id=48998606>)

## Summary

Google 正式推出 Gemini 3.6 Flash 和 Gemini 3.5 Flash-Lite，这两款新模型在智能体任务、多模态推理及代码生成上表现强劲，同时大幅降低了 Token 成本。然而，开发者必须注意重大 API 变更：temperature、top_p 和 top_k 等采样参数已被弃用，若继续使用将导致报错。此外，请求中不再允许预填充 model 角色对话。官方建议通过 system_instruction 或 Structured outputs 来替代旧有的控制方式。Antigravity agent 也已默认升级至 Gemini 3.6 Flash。迁移指南已更新，开发者需立即移除旧参数并调整代码逻辑，以适配新一代模型。

## Key quote

> temperature、top_p 和 top_k 已被弃用，API 将忽略这些参数，并在未来的模型版本中返回错误。

## HN discussion (45 comments)

### [salamo](<https://news.ycombinator.com/item?id=49001146>)

> 可能的原因：
>
> \- 他们可能在推理时动态调整这些参数 [1]。例如，从低 temperature 开始生成样本，然后逐步提高 temperature，直到其中一个样本通过某种质量门槛。
>
> \- 他们不想让你在高 temperature 生成的完成内容上进行微调（rejection fine-tuning）。你可以把这称为“拒绝微调的拒绝”。
>
> [1] https://rlhfbook.com/c/09-rejection-sampling#related-best-of...

### [franky47](<https://news.ycombinator.com/item?id=49002587>)

> \> 为了提高确定性，请定义一条系统指令，其中包含针对你特定用例的明确规则。
>
> “请保持确定性”。

### [aesthesia](<https://news.ycombinator.com/item?id=48999878>)

> 我的猜测是，使用特定生成参数进行的 RL 训练会让模型对这些参数的变化变得非常脆弱，这也是为什么我们看到各大模型提供商都在做类似的改动。不过我也不太确定。

### [bob1029](<https://news.ycombinator.com/item?id=49002805>)

> \> 为了提高确定性，请定义一条系统指令，其中包含针对你特定用例的明确规则。
>
> 那如果我想做相反的事呢？在用多个子代理进行研究时，假设的多样性至关重要。如果我并行运行的 5 个子代理都得出了相同的结论，那我只运行一个就够了。
>
> 最新的 OAI 模型也做了同样的事。我目前正在提示词中加入随机变化，以弥补无法进行高 temperature 采样的不足。

### [marcinjachymiak](<https://news.ycombinator.com/item?id=49006997>)

> 这并不奇怪，因为现在这些都是推理模型了。Token 采样/解码不再对外暴露，是因为推理模型是围绕特定配置训练的。所以它被“推理努力程度”（reasoning effort）取代了，即低、中、高三种“思考”级别。

---

## Cite

- Page: https://zeli.app/zh/story/48998606
- Date: 2026-07-21
- Source: ai.google.dev (https://ai.google.dev/gemini-api/docs/latest-model)
- Hacker News: https://news.ycombinator.com/item?id=48998606

## Other languages

- en: https://zeli.app/story/48998606 · markdown: https://zeli.app/story/48998606.md
- ja: https://zeli.app/ja/story/48998606 · markdown: https://zeli.app/ja/story/48998606.md
- ko: https://zeli.app/ko/story/48998606 · markdown: https://zeli.app/ko/story/48998606.md
- de: https://zeli.app/de/story/48998606 · markdown: https://zeli.app/de/story/48998606.md
- es: https://zeli.app/es/story/48998606 · markdown: https://zeli.app/es/story/48998606.md
