Support LLM gateway with Dyad API key (#23)

* Do not make API key input (password) - hurts usability
* Support LLM gateway (and add GPT 4.1 mini model)
* Show Dyad Pro button
* Fix to use auto (not dyad) for detecting dyad pro
* Fix description of gpt 4.1-mini
This commit is contained in:
Will Chen
2025-04-26 08:52:08 -07:00
committed by GitHub
parent 0dcbb44e2b
commit 2ad10ba039
4 changed files with 49 additions and 9 deletions

View File

@@ -14,6 +14,11 @@ export const MODEL_OPTIONS: Record<RegularModelProvider, ModelOption[]> = {
displayName: "GPT 4.1",
description: "OpenAI's flagship model",
},
{
name: "gpt-4.1-mini",
displayName: "GPT 4.1 Mini",
description: "OpenAI's lightweight, but intelligent model",
},
{
name: "o3-mini",
displayName: "o3 mini",
@@ -55,40 +60,40 @@ export const MODEL_OPTIONS: Record<RegularModelProvider, ModelOption[]> = {
export const PROVIDERS: Record<
RegularModelProvider,
{
name: string;
displayName: string;
hasFreeTier?: boolean;
websiteUrl?: string;
gatewayPrefix: string;
}
> = {
openai: {
name: "openai",
displayName: "OpenAI",
hasFreeTier: false,
websiteUrl: "https://platform.openai.com/api-keys",
gatewayPrefix: "",
},
anthropic: {
name: "anthropic",
displayName: "Anthropic",
hasFreeTier: false,
websiteUrl: "https://console.anthropic.com/settings/keys",
gatewayPrefix: "anthropic/",
},
google: {
name: "google",
displayName: "Google",
hasFreeTier: true,
websiteUrl: "https://aistudio.google.com/app/apikey",
gatewayPrefix: "gemini/",
},
openrouter: {
name: "openrouter",
displayName: "OpenRouter",
hasFreeTier: true,
websiteUrl: "https://openrouter.ai/settings/keys",
gatewayPrefix: "openrouter/",
},
auto: {
name: "auto",
displayName: "Dyad",
websiteUrl: "https://academy.dyad.sh/settings",
gatewayPrefix: "",
},
};