From 39f829510755b3fac9aed82493c504b5523f36c4 Mon Sep 17 00:00:00 2001 From: aiapienthusiast <327629069+aiapienthusiast@users.noreply.github.com> Date: Thu, 1 Oct 2026 19:25:07 +0400 Subject: [PATCH] feat: add Cheaper Inference provider preset --- src/agent/provider.test.ts | 2 +- src/shared/providerCatalog.ts | 7 ++++++- webview-ui/sidebar/types.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/agent/provider.test.ts b/src/agent/provider.test.ts index 1191bd99..afac30e3 100644 --- a/src/agent/provider.test.ts +++ b/src/agent/provider.test.ts @@ -53,7 +53,7 @@ describe("kindMatches", () => { describe("PROVIDER_PRESETS", () => { it("has all expected providers", () => { - const expected = ["openai", "anthropic", "google", "openrouter", "ollama", "llamacpp", "mimo", "atlascloud", "astraflow"] as const; + const expected = ["openai", "anthropic", "google", "openrouter", "ollama", "llamacpp", "mimo", "atlascloud", "astraflow", "cheaperinference"] as const; for (const key of expected) { expect(PROVIDER_PRESETS[key]).toBeDefined(); } diff --git a/src/shared/providerCatalog.ts b/src/shared/providerCatalog.ts index aa84136d..73a9c2ec 100644 --- a/src/shared/providerCatalog.ts +++ b/src/shared/providerCatalog.ts @@ -85,6 +85,11 @@ const PRESETS = { "baseUrl": "https://api-us-ca.umodelverse.ai/v1", "needsKey": true }, + "cheaperinference": { + "label": "Cheaper Inference", + "baseUrl": "https://api.cheaperinference.com/v1", + "needsKey": true + }, "xai": { "label": "xAI", "baseUrl": "https://api.x.ai/v1", @@ -444,5 +449,5 @@ const PRESETS = { } as const; export type ProviderKind = keyof typeof PRESETS; export const PROVIDER_PRESETS: Record = PRESETS; -export const POPULAR_KINDS: ProviderKind[] = ["anthropic","openai","google","xai","deepseek","moonshot","z-ai","minimax","qwen","openrouter","mimo","atlascloud","astraflow","alicode-intl","alicode","azure","blackbox","byteplus","cerebras","chutes","cloudflare-ai","cohere","commandcode","featherless","fireworks","glm-cn","glm","groq","hyperbolic","kimchi","minimax-cn","mistral","nebius","nvidia","ollama-cloud","opencode-go","opencode-zen","perplexity","perplexity-agent","siliconflow","together","venice","vercel-ai-gateway","vertex-partner","vertex","volcengine-ark","alims-intl","api-airforce","baidu","bazaarlink","kilo-gateway","llm7","tencent","morph","poolside","tokenrouter","alitp-intl"]; +export const POPULAR_KINDS: ProviderKind[] = ["anthropic","openai","google","xai","deepseek","moonshot","z-ai","minimax","qwen","openrouter","mimo","atlascloud","astraflow","cheaperinference","alicode-intl","alicode","azure","blackbox","byteplus","cerebras","chutes","cloudflare-ai","cohere","commandcode","featherless","fireworks","glm-cn","glm","groq","hyperbolic","kimchi","minimax-cn","mistral","nebius","nvidia","ollama-cloud","opencode-go","opencode-zen","perplexity","perplexity-agent","siliconflow","together","venice","vercel-ai-gateway","vertex-partner","vertex","volcengine-ark","alims-intl","api-airforce","baidu","bazaarlink","kilo-gateway","llm7","tencent","morph","poolside","tokenrouter","alitp-intl"]; export const FREE_KINDS: ProviderKind[] = ["opencode"]; diff --git a/webview-ui/sidebar/types.ts b/webview-ui/sidebar/types.ts index e57fe954..86e6c8ff 100644 --- a/webview-ui/sidebar/types.ts +++ b/webview-ui/sidebar/types.ts @@ -63,7 +63,7 @@ export interface ModelOption { value: string; } -export type ModelKind = "openai" | "anthropic" | "google" | "openrouter" | "ollama" | "llamacpp" | "mimo" | "atlascloud" | "astraflow" | "claude-code" | "codex" | "antigravity"; +export type ModelKind = "openai" | "anthropic" | "google" | "openrouter" | "ollama" | "llamacpp" | "mimo" | "atlascloud" | "astraflow" | "cheaperinference" | "claude-code" | "codex" | "antigravity"; export interface ModelDef { id: string;