Admin Gateway model picker offers IDs Vercel AI Gateway cannot serve (alibaba/qwen3.8-flash-next)
Describe the bug
The admin "Add Gateway model" picker can offer alibaba/qwen3.8-flash-next (label Qwen 3.8 Flash Next, with Vercel-style USD pricing filled in). Saving or using that model against Vercel AI Gateway then fails with model_not_found / "The model does not exist".
The picker is treated as a callable catalog. In this case it is not.
To Reproduce
- Open Admin -> AI setting -> Add Gateway model.
- Search for
qwen3.8-flash-next/Qwen 3.8 Flash Next. - Select
alibaba/qwen3.8-flash-next. The form fills:
Model ID: alibaba/qwen3.8-flash-next
Display name: Qwen 3.8 Flash Next
Input: 0.00000012
Output: 0.0000004
Cache Read: 0.00000001
Cache Write: 0.00000375- Add the model and use it (or test it) through the configured AI Gateway.
Expected behavior
The picker should only offer models the configured Gateway can actually serve. A model that returns model_not_found should not appear as a selectable catalog entry, or Add should be blocked until a live test succeeds.
Actual behavior
The ID is selectable in the admin UI. Calling the Gateway returns:
{
"error": {
"message": "The model 'alibaba/qwen3.8-flash-next' does not exist",
"type": "model_not_found",
"code": "model_not_found"
}
}Observed against the public Gateway catalog on 2026-09-11:
GET https://ai-gateway.vercel.sh/v1/models(371 models): includesalibaba/qwen3.8-flash, does not includealibaba/qwen3.8-flash-next.GET https://ai-gateway.vercel.sh/v1/models/alibaba/qwen3.8-flash-> 200GET https://ai-gateway.vercel.sh/v1/models/alibaba/qwen3.8-flash-next-> 404model_not_found- Vercel still has a marketing page for the ID: https://vercel.com/ai-gateway/models/qwen3.8-flash-next (provider listed as
runinfra, not Alibaba Cloud)
Client
- OS: macOS
- Browser: Chrome
- Version: 153
Platform
teable-deployment (Helm), app release.2026-09-11T07-36-49Z.3059
Additional context
Teable fetches the live list from https://ai-gateway.vercel.sh/v1/models in apps/nestjs-backend/src/features/ai/ai-gateway-models.service.ts and caches it in Redis for 1 hour. The admin Add dialog copies that list into the search box (GatewayModelsStep / AddModelDialog). Add only requires id and label; a successful model test is not required.
So a stale cache, a catalog entry that is listed but not routed, or a marketing-only ID can all become a selectable "supported" model. Qwen3.8-Flash-Next is an open-weight / RunInfra-hosted preview; the production Gateway ID that does exist is alibaba/qwen3.8-flash.
Suggested fix:
- Treat
GET /v1/models(or a per-id lookup) as the source of truth for selectable IDs, not the marketing page. - Drop models that 404 on per-id lookup before showing them in the picker.
- Require a successful Gateway test before Add, or at least block Add when the live catalog does not contain the ID.
- Revalidate the cached catalog when the Add dialog opens, instead of serving a 1-hour snapshot as if it were still callable.
Source: teableio/teable