Current behavior: When my Inngest workflow functions run on Vercel, they fail to connect to OpenAI API with error: "AIGatewayError: Error making AI request: Post "https://api.openai.com/v1/chat/completions": Unable to make request to api.openai.com:443 at IP 64:ff9b::a29f:8cf5: NAT64 address". This started happening suddenly today, though it worked previously.
Expected behavior: Inngest functions should successfully connect to OpenAI API and complete their workflows without NAT64/IPv6 translation errors.
-
Deploy Next.js app using Inngest workflows to Vercel
-
Trigger an Inngest workflow that makes OpenAI API calls
-
Observe the NAT64 connection error in logs
// src/lib/ai/ai-network.tsimport { createAgent } from "@inngest/agent-kit";import { openai } from "inngest";
export const SummaryDealAgent = createAgent({ name: "Summary Deal Agent", system: dealActivitySummaryPrompt, model: openai({ model: "gpt-4o-mini", apiKey: process.env.OPENAI_API_KEY }),});
// Additional agent configurations follow similar patternProject information:
-
Framework: Next.js
-
Deployment: Vercel
-
Workflow Engine: Inngest
-
External API: OpenAI
-
Environment: Production
-
Region: Tried multiple regions without success
-
Error Context: NAT64 address (64:ff9b::a29f:8cf5) indicates IPv6-to-IPv4 translation issue
-
Note: Application works correctly in local development, issue only appears in Vercel deployment