Skip to content

Commit dbd889c

Browse files
committed
feat: add Vercel AI Gateway as a preset for custom models
1 parent 22678e1 commit dbd889c

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

app/src/main/settingsWindow.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export function createSettingsWindow(tab?: SettingsWindowTab) {
6767
'https://openrouter.ai',
6868
'https://platform.openai.com',
6969
'https://console.anthropic.com',
70-
'https://aistudio.google.com'
70+
'https://aistudio.google.com',
71+
'https://vercel.com',
72+
'https://ai-gateway.vercel.sh'
7173
]
7274

7375
let isAllowedUrl = ALLOWED_DOMAINS.some((domain) => details.url.startsWith(domain))
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script>
2+
import image from './vercel.png'
3+
</script>
4+
5+
<img src={image} {...$$restProps} />
42.7 KB
Loading

packages/icons/src/lib/main.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ import LinkExternal from './Icons/LinkExternal.svelte'
151151
import Ollama from './Icons/Ollama.svelte'
152152
import OpenRouter from './Icons/OpenRouter.svelte'
153153
import HuggingFace from './Icons/HuggingFace.svelte'
154+
import Vercel from './Icons/Vercel.svelte'
154155

155156
import DynamicIcon from './DynamicIcon.svelte'
156157

@@ -309,7 +310,8 @@ export const icons = {
309310
book: Book,
310311
ollama: Ollama,
311312
openrouter: OpenRouter,
312-
huggingface: HuggingFace
313+
huggingface: HuggingFace,
314+
vercel: Vercel
313315
}
314316

315317
export type Icons = keyof typeof icons
@@ -470,5 +472,6 @@ export {
470472
LinkExternal,
471473
Ollama,
472474
OpenRouter,
473-
HuggingFace
475+
HuggingFace,
476+
Vercel
474477
}

packages/types/src/ai.types.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ export enum CUSTOM_MODELS {
362362
Ollama = 'Ollama',
363363
OpenRouter = 'OpenRouter',
364364
HuggingFaceTogether = 'Hugging Face Together AI',
365-
HuggingFace = 'Hugging Face Inference Endpoint'
365+
HuggingFace = 'Hugging Face Inference Endpoint',
366+
VercelAiGateway = 'Vercel AI Gateway'
366367
}
367368

368369
export type CustomModelType = keyof typeof CUSTOM_MODELS
@@ -408,6 +409,14 @@ export const CUSTOM_MODEL_DEFINITIONS: Record<CUSTOM_MODELS, CustomModelDefiniti
408409
provider_url: 'https://api-inference.huggingface.co/models/',
409410
model_page: 'https://huggingface.co/models?inference_provider=together&sort=trending',
410411
api_key_page: 'https://huggingface.co/settings/tokens'
412+
},
413+
[CUSTOM_MODELS.VercelAiGateway]: {
414+
id: CUSTOM_MODELS.VercelAiGateway,
415+
label: 'Vercel AI Gateway',
416+
icon: 'vercel',
417+
provider_url: 'https://ai-gateway.vercel.sh/v1/chat/completions',
418+
model_page: 'https://vercel.com/ai-gateway/models',
419+
api_key_page: 'https://vercel.com/d?to=/[team]/~/ai?title=Get Started with Vercel AI Gateway',
411420
}
412421
}
413422

0 commit comments

Comments
 (0)