Hi Edward,
Good update. If the overseas platform is working now, I’d treat StepFun’s “use the overseas endpoint for overseas invocation” as the most reliable rule for direct calls.
For direct StepFun calls, yes, I would separate them like this:
1China mainland / domestic StepFun account:2https://api.stepfun.com/step_plan/v134Overseas / international StepFun account:5https://api.stepfun.ai/step_plan/v16
So for the OpenAI-compatible chat completions path, that becomes:
1https://api.stepfun.com/step_plan/v1/chat/completions2https://api.stepfun.ai/step_plan/v1/chat/completions3
For Vercel AI Gateway, I would think about it differently: your app’s baseURL should be the AI Gateway endpoint, not StepFun’s endpoint directly:
1https://ai-gateway.vercel.sh/v12
Then you call the StepFun model through the Gateway model ID, using your AI Gateway key. BYOK means Gateway can use your provider credentials, but I would not assume you can choose api.stepfun.com vs api.stepfun.ai as the upstream route unless the Gateway UI/docs expose that option for StepFun specifically.
So my practical recommendation would be:
1Need strict China/overseas endpoint control?2→ Call StepFun directly and choose .com or .ai yourself.34Want unified logging, budgets, model routing, and Gateway behavior?5→ Use Vercel AI Gateway, but test whether its StepFun route matches your region/compliance needs.6
I’d run both paths with the same prompt and log only non-sensitive fields:
1provider: direct-stepfun-cn / direct-stepfun-overseas / vercel-ai-gateway2vercel region: process.env.VERCEL_REGION3status code4latency5error type6request timestamp7
If direct api.stepfun.ai works from Vercel but Gateway has a different failure pattern, then it’s a Gateway/provider-routing question. If Gateway works consistently, it may be the cleaner option for observability and budgets.