gemini-3.1-pro-preview-customtoolsGemini 3.1 Pro Preview Customtools 为结合 Bash 与自定义工具的智能体优化,适合代码检索、文件分析和连续执行任务。
比較同一模型在不同供應商的價格與服務表現。
| 供應商 | Discount | 輸入/M | 輸出/M | 緩存讀取/M | ||
|---|---|---|---|---|---|---|
Google AI Studio 谷歌官方接口 | 省50% | $1 | $6 | $0.1 | ||
Google Vertex 谷歌官方接口 | 省30% | $1.4 | $8.4 | $0.14 |
左右滑動表格,查看完整價格與效能。
標準化評測得分。百分比越高越好,並展示排名百分位。
指標來源:Artificial Analysis 2026-09-30·Gemini 3.1 Pro Preview Customtools
目前基準快照不包含此模型。
缺少模型或測量值不代表零分。
基準圖表保留來源中的模型選擇和推理設定。缺少模型或測量值不代表零分,基準成本或速度也不是本站的服務承諾。
Gemini 3.1 Pro Preview Customtools 适合已经建立工具体系的开发团队。它在选择操作时更偏向你定义的工具,例如读取文件、搜索代码、查询内部系统,再结合 Bash 完成需要多步推进的任务。对于拥有专用工具和权限边界的编程助手,这种选择倾向能更好地衔接现有工作流。
你可以让它先调用代码检索找到实现,再读取相关文件、执行测试,最后依据反馈修改方案。工具名称、参数说明和返回结构应足够明确,尤其要区分“查找位置”“读取内容”和“执行修改”,让模型知道每种工具解决什么问题。工具输出包含文件路径、错误信息和可用状态时,也更便于它决定下一步。
它保留 Gemini 3.1 Pro Preview 的复杂推理与多模态理解能力,可以分析文本、图片、音频、视频和 PDF,并输出文字或结构化结果。例如,让开发智能体结合需求 PDF 与页面录像定位问题,再使用项目专用工具查询组件实现。较大的上下文窗口有利于保留跨文件材料和任务进度。
这个变体的价值主要体现在自定义工具与 Bash 协作场景。若应用主要是普通问答、写作或摘要,没有相应工具,标准 Pro 版本通常更适合作为对照进行评估。工具优先倾向也需要结合实际任务验证,建议检查调用是否必要、参数是否正确,以及失败后能否恢复。
会自动获得文件和终端权限吗? 需要应用提供工具与执行环境,并决定可读写范围;模型选择工具不会替应用完成权限配置。
怎样减少错误调用? 为相似工具写清区别,规定错误返回格式,并要求修改后运行相应验证。
给智能体一个真实目标,并把工具约束写进任务。
修复用户修改邮箱后通知仍发往旧地址的问题。
先用 search_code 查找邮箱更新和通知收件人逻辑,用 view_file 阅读相关实现,再运行项目测试。
只修改账户与通知相关代码;不要调整数据库连接或生产配置。
若工具返回无权限或文件缺失,记录阻塞位置,不猜测执行成功。
完成后列出修改文件、根因和测试结果。
工具定义中明确参数类型、读取与写入的区别、失败返回方式。运行前准备代表性任务,对比标准 Pro 与 Customtools 的工具选择和完成情况,再确定适合的工作流。
/v1beta/models/gemini-3.1-pro-preview-customtools:generateContent| 參數 | 類型 | 預設值 / 範圍 | 說明資訊 |
|---|---|---|---|
temperature | number | = 10 ~ 2 | 採樣溫度;越低越穩定 |
top_p | number | = 10 ~ 1 | 核採樣累積概率 |
max_tokens | integer | >= 1 | 回應中最大 token 數 |
frequency_penalty | number | = 0-2 ~ 2 | 懲罰高頻 token 的重複出現 |
presence_penalty | number | = 0-2 ~ 2 | 鼓勵引入新話題 |
stop | array | — | 最多 4 個停止生成的字串 |
seed | integer | — | 盡量保證可復現的採樣種子 |
n | integer | = 1>= 1 | 生成的候選條數 |
stream | boolean | = false | 透過 SSE 串流返回 token |
response_format | object | — | 強制輸出 JSON 物件或符合 Schema 的結果 |
tools | array | — | 模型可呼叫的工具 / 函數聲明 |
tool_choice | string | autononerequired | 工具選擇策略或具體工具名 |
logprobs | boolean | = false | 返回每個 token 的對數概率 |
top_logprobs | integer | 0 ~ 20 | 每個 token 返回的 top 概率數量 |
logit_bias | object | — | 按 token 的 logit 偏置映射 |
user | string | — | 用於風險審計的終端用戶標識 |
替換 <YOUR_API_KEY> 替換為 API 金鑰頁面中的金鑰。
所有請求必須攜帶 Authorization: Bearer <TOKEN> 請求頭。Anthropic 格式的端點也接受 x-api-key 請求頭。
在「令牌」頁面生成 API Key,可以按模型、分組、IP、速率等維度精細化授權。
| 參數 | 類型 | 預設值 / 範圍 | 說明資訊 |
|---|---|---|---|
temperature | number | = 10 ~ 2 | 採樣溫度;越低越穩定 |
top_p | number | = 10 ~ 1 | 核採樣累積概率 |
max_tokens | integer | >= 1 | 回應中最大 token 數 |
frequency_penalty | number | = 0-2 ~ 2 | 懲罰高頻 token 的重複出現 |
presence_penalty | number | = 0-2 ~ 2 | 鼓勵引入新話題 |
stop | array | — | 最多 4 個停止生成的字串 |
seed | integer | — | 盡量保證可復現的採樣種子 |
n | integer | = 1>= 1 | 生成的候選條數 |
stream | boolean | = false | 透過 SSE 串流返回 token |
response_format | object | — | 強制輸出 JSON 物件或符合 Schema 的結果 |
tools | array | — | 模型可呼叫的工具 / 函數聲明 |
tool_choice | string | autononerequired | 工具選擇策略或具體工具名 |
logprobs | boolean | = false | 返回每個 token 的對數概率 |
top_logprobs | integer | 0 ~ 20 | 每個 token 返回的 top 概率數量 |
logit_bias | object | — | 按 token 的 logit 偏置映射 |
user | string | — | 用於風險審計的終端用戶標識 |
| 供應商 | RPM | TPM | RPD |
|---|---|---|---|
| Google AI Studio | 無限制 | 無限制 | 無限制 |
| Google Vertex | 無限制 | 無限制 | 無限制 |
無限制
Gemini 3.1 Pro Preview Customtools 为结合 Bash 与自定义工具的智能体优化,适合代码检索、文件分析和连续执行任务。
Create an API key with access to gemini-3.1-pro-preview-customtools, then use the exact model ID and a supported endpoint from the API access section. Request fields depend on the selected endpoint.
Pricing depends on the selected provider group and the model billing unit. The current input, output, request, or media prices are shown on this page before sign-up.
The model catalog lists a context window of 1048576 tokens. Check the selected endpoint for request limits.
The model catalog lists a maximum output of 65536 tokens. Your request settings may set a lower limit.
Start with the use cases and prompting guidance on this page, then evaluate the model with representative inputs from your project.
