Gemini 3.1 Pro 已在 AI Gateway 上线
发布: (2026年2月19日 GMT+8 21:00)
2 分钟阅读
原文: Vercel Blog
Source: Vercel Blog
2026年2月19日 · 1 分钟阅读
Gemini 3.1 Pro 预览版现已在 AI Gateway 上推出
Google 的 Gemini 3.1 Pro 预览版已通过 AI Gateway 提供。此版本在软件工程和代理工作流方面带来了质量提升,在金融和电子表格任务中的可用性也更佳。同时,它在保持性能的前提下降低了 token 消耗。
使用模型
在 AI SDK 中将模型标识符设为 google/gemini-3.1-pro-preview。该模型支持 medium 思考层级,以便更细致地控制成本、性能和速度。
import { streamText } from 'ai';
const result = streamText({
model: 'google/gemini-3.1-pro-preview',
prompt: `Review this pull request for security vulnerabilities,
suggest fixes, and update the test suite to cover edge cases.`,
providerOptions: {
google: {
thinking_level: 'medium',
},
},
});
AI Gateway 功能
AI Gateway 提供统一的 API,用于:
- 调用模型并跟踪使用量/费用
- 配置重试、故障转移以及性能优化,以实现高于提供商的正常运行时间
- 内置 observability
- 支持 Bring Your Own Key
- 智能提供商路由与自动重试
资源
- 了解更多关于 [AI Gateway]
- 查看 [AI Gateway model leaderboard]
- 在 [model playground] 中尝试模型