Vercel 10 月 30 日在 AI Gateway 上架了 InclusionAI 的 Ling 3.1 Flash 1019,并写明免费到 2026 年 11 月 3 日。模型名是 inclusionai/ling-3.1-flash-1019,上下文 100 万 token。免费期内请求仍会出现在消费面板并带完整调用记录,只是不计费;11 月 3 日起按公布价收费。
限免期限和调用方式
出处是 Vercel 的 changelog。原文写的是 now available on AI Gateway, free until November 3, 2026。changelog 把这款模型定位在 coding、multi-step reasoning,以及会调工具的 agent;1M 上下文适合长文档、代码和较长的任务历史。
模型页上的 Model ID 就是 inclusionai/ling-3.1-flash-1019,上下文 1,000,000,最大输出 262,144,当前提供方显示为 novita。
Chat Completions 官方示例里,base URL 是 https://ai-gateway.vercel.sh/v1,密钥走环境变量 AI_GATEWAY_API_KEY。curl 大致是这样:
curl https://ai-gateway.vercel.sh/v1/chat/completions \
-H "Authorization: Bearer $AI_GATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "inclusionai/ling-3.1-flash-1019",
"messages": [{"role": "user", "content": "用一句话介绍 Spring Boot"}]
}'
接 Claude Code、Codex、Cursor 这类编码代理时,官方给的命令是:
npx vercel ai-gateway setup
然后在代理里选 inclusionai/ling-3.1-flash-1019。免费层和付费层的规则在 AI Gateway 计费文档。每个 Vercel team 都有免费层,免费层只能用部分模型,并且按模型限流,超了返回 429。
用 Spring AI 接网关
这里用 Spring Boot 4.1.1 和 Spring AI 2.0.1,JDK 21,依赖 OpenAI starter,改 base-url 指向 AI Gateway。
<properties>
<java.version>21</java.version>
<spring-ai.version>2.0.1</spring-ai.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>${spring-ai.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-model-openai</artifactId>
</dependency>
</dependencies>
配置文件:
spring:
ai:
openai:
api-key: ${AI_GATEWAY_API_KEY}
base-url: https://ai-gateway.vercel.sh/v1
chat:
model: inclusionai/ling-3.1-flash-1019
控制器:
package com.example.demo;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class ChatController {
private final ChatClient chatClient;
public ChatController(ChatClient.Builder builder) {
this.chatClient = builder.build();
}
@GetMapping("/chat")
public String chat(@RequestParam(defaultValue = "用一句话介绍 Spring Boot") String q) {
return chatClient.prompt()
.user(q)
.call()
.content();
}
}
编译输出:
[INFO] --- compiler:3.15.0:compile (default-compile) @ vercel-ling-demo ---
[INFO] Compiling 2 source files with javac [debug parameters release 21] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.398 s
[INFO] Finished at: 2026-11-01T08:09:25+08:00
[INFO] ------------------------------------------------------------------------
这个项目已编译但未实际调用 API,手上没有 AI Gateway 的 Key。空 Key 直接请求网关时返回的是:
curl -s -w '\nHTTP %{http_code}\n' https://ai-gateway.vercel.sh/v1/chat/completions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ' \
-d '{"model":"inclusionai/ling-3.1-flash-1019","messages":[{"role":"user","content":"hi"}]}'
{"error":{"message":"Authentication failed. Create an API key and set in AI_GATEWAY_API_KEY environment variable: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai-gateway%2Fapi-keys%3FshowCreateKeyModal","type":"authentication_error"}}
HTTP 401
同一网关上,10 月写过 MiniMax M3.1 Flash 的限免窗口,见 Vercel AI Gateway 上 MiniMax M3.1 Flash 限免到 10 月 22 日。这次是另一款模型、另一段截止日,changelog 写的是 11 月 3 日。
一起交流
分享你的思考,让讨论更进一步。