Infer × Vercel AI SDK · live check @ai-sdk/openai 4.0.37
Point the OpenAI Responses provider at Infer.
Create a direct provider with Infer’s /v1 base URL, then select .responses(...). Every captured SDK call stayed on /v1/responses.
Pinned setup
Install the versions that were checked.
The base URL ends at /v1; the explicit Responses model factory appends /responses. Keep the Infer key in the environment.
npm install --save-exact ai@7.0.59 @ai-sdk/openai@4.0.37 zod@4.4.3Read current status for infer/gpt-5.6-terra:balanced, verify the account email, fund the wallet, and create a capped API key.
maxOutputTokens: 64 was the proof ceiling, not a general output-policy recommendation. The validation-only fetch observer recorded paths and assigned a fresh idempotency key to each outbound call; it is not needed to select the Responses endpoint.
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";
const infer = createOpenAI({
name: "infer",
apiKey: process.env.INFER_API_KEY,
baseURL: "https://infer.flow7.org/v1",
});
const model = infer.responses(
"infer/gpt-5.6-terra:balanced",
);
const { text } = await generateText({
model,
prompt: "Your bounded task",
maxOutputTokens: 64,
maxRetries: 0,
telemetry: { isEnabled: false },
providerOptions: {
openai: {
store: false,
strictJsonSchema: true,
},
},
});
console.log(text);
This code makes a direct SDK-to-Infer request. It does not use Vercel AI Gateway. Check status and test the workload before raising output or spend limits.
Dated production record
Five completions. Five receipts. $0.004222 total.
Checked August 11, 2026 with retries disabled and two isolated API keys, each capped at exactly $0.05 daily and monthly. Both keys were revoked after request, receipt, wallet, and reservation reconciliation. This is a compatibility record, not workload or uptime certification.
generateText returned the exact bounded text for $0.000464: rcpt_5f70276e8753797b9317e3a8.streamText consumed the Responses event sequence and exact text for $0.000462: rcpt_56b2916c812b4ff1e1c42ae7.rcpt_46aee7172ffe29f9f7495ccc.function_call and function_call_output, then returned the exact nonce for $0.000270: rcpt_21764e11574fb67f0d9d7b48.text.format.type = "json_schema" and returned the validated object for $0.001530: rcpt_1710163bf79046d7edee6d1f.id and array-valued annotations (rcpt_93b75a017a658445de0d5633, $0.000710), then a function_call item needed an id and status (rcpt_153f8acb1a084f762da16b7c, $0.001402). Infer normalized both item types before the five-request matrix passed./v1/responses. No /v1/chat/completions request was observed.Claim boundary
What this proves—and what it does not.
- 01
AI SDK, not Vercel AI Gateway.
The checked setup sends requests directly to Infer through
@ai-sdk/openai. It does not use or validate Vercel AI Gateway, and it is not evidence of a Vercel partnership, endorsement, or certification. - 02
A custom provider, not a native Infer package.
Infer is configured with
createOpenAIand a custom base URL; it is not a named provider built into AI SDK.@ai-sdk/openai-compatiblewas not used because the current package targets Chat Completions rather than this Responses proof. - 03
SSE-compatible, not real-time upstream streaming.
streamTextconsumed Infer’s Responses SSE sequence. Infer currently buffers the upstream response before emitting that sequence, so this record does not establish first-token latency or long-stream behavior. - 04
One narrow local tool loop.
The proof forced one read-only local function, executed it once, and completed one tool-result turn. Parallel calls, state-changing tools, approvals, repair, MCP, agent classes, and built-in or hosted tools remain untested.
- 05
One native schema path.
The checked
Output.objectrequest used one strict Zod schema mapped to Responses-nativejson_schema. It does not certify arbitrary schemas, multimodal input, files, audio, or images. - 06
No state, UI, or recovery claim.
previousResponseId, Conversations, background mode, cancellation, retries, failover, AI SDK UI, framework hooks, and long-running workloads remain untested. Retries were set to zero. - 07
Versions and selector are bounded.
The record covers the pinned Node and package versions with
infer/gpt-5.6-terra:balanced. Other selectors, tiers, releases, and broader Responses features require their own checks. - 08
No supplier attestation.
The receipts prove Infer-routed requests completed and record customer charges. They do not disclose or attest the upstream supplier identity.
Start with one capped request.
Create an account, verify the email, add service credit, and check the selected route before running the pinned setup.