feat(vercel-ai-gateway): support embeddings, images and credit usage

Extend Vercel AI Gateway beyond chat: add OpenAI-compatible embeddings
and image generation endpoints, credit balance fetch on the usage
dashboard, retry on 429, and models catalog fetcher.

Thinking/reasoning mapping is omitted pending a project-wide refactor.

Co-authored-by: Ngô Tấn Tài <tantai@newnol.io.vn>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ngô Tấn Tài
2026-06-13 10:54:51 +07:00
committed by decolua
parent d9b030011f
commit b33cbb0280
10 changed files with 164 additions and 2 deletions

View File

@@ -129,7 +129,8 @@ export const PROVIDERS = {
},
"vercel-ai-gateway": {
baseUrl: "https://ai-gateway.vercel.sh/v1/chat/completions",
format: "openai"
format: "openai",
retry: { 429: 2 }
},
glm: {
baseUrl: "https://api.z.ai/api/anthropic/v1/messages",