From 4c59c581244167fa9847f06eabd5fb59d2d8c2cd Mon Sep 17 00:00:00 2001 From: Nicho Deng Date: Mon, 2 Nov 2026 17:51:55 +0800 Subject: [PATCH] feat(providers): add cheapaimodel --- README.md | 2 +- docs/providers-and-models.md | 25 +++++++++++++-- src/chrome/icons/providers/SOURCES.md | 1 + src/chrome/icons/providers/cheapaimodel.svg | 1 + src/chrome/src/providers/provider-catalog.js | 1 + src/firefox/icons/providers/SOURCES.md | 1 + src/firefox/icons/providers/cheapaimodel.svg | 1 + src/firefox/src/providers/provider-catalog.js | 1 + test/run.js | 32 ++++++++++++++++--- 9 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 src/chrome/icons/providers/cheapaimodel.svg create mode 100644 src/firefox/icons/providers/cheapaimodel.svg diff --git a/README.md b/README.md index a21649ecd..6db69dfc2 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ preview `ollama launch webbrain --model ` handoff. Details: **Cloud APIs** — OpenAI, Anthropic Claude, Google Gemini, Azure OpenAI, AWS Bedrock, Mistral, DeepSeek, xAI Grok, MiniMax, Kimi, Qwen, z.ai GLM, Groq, Together, Cloudflare, Nvidia NIM, Hugging Face, Fireworks, OpenRouter, and more. -The Providers page ships **118 built-in provider cards on Chromium** (117 on Firefox), +The Providers page ships **119 built-in provider cards on Chromium** (118 on Firefox), including an endpoint-free local WebGPU option with the tested LFM2.5 2.6B preset and an experimental custom Hugging Face ONNX repository option — see the [full catalog](docs/providers-and-models.md#extended-provider-catalog). diff --git a/docs/providers-and-models.md b/docs/providers-and-models.md index 470dfb2aa..4300aba6d 100644 --- a/docs/providers-and-models.md +++ b/docs/providers-and-models.md @@ -510,16 +510,16 @@ times the standard rate. ### Extended provider catalog -WebBrain also ships 84 disabled-by-default provider cards. Most are sourced +WebBrain also ships 85 disabled-by-default provider cards. Most are sourced from the OpenCode provider catalog snapshot at commit `62e4641235d7847dadc60da37cca8a023dd54fc1`; provider-specific additions use their official API documentation. Together with the original cards, the -Providers page lists **118 built-in providers on Chromium** and **117 on Firefox**; the +Providers page lists **119 built-in providers on Chromium** and **118 on Firefox**; the difference is the Chromium-only in-browser WebGPU runtime. | IDs | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `api-route`, `302ai`, `abacus`, `aihubmix`, `alibaba-coding-plan`, `alibaba-coding-plan-cn`, `atlascloud`, `azure-cognitive-services`, `bailing`, `baseten`, `berget`, `cerebras`, `cheaperinference`, `chutes`, `clarifai`, `cloudferro-sherlock`, `cohere`, `cortecs`, `deepinfra`, `digitalocean`, `dinference`, `drun`, `evroc`, `fastrouter`, `friendli` | +| `api-route`, `302ai`, `abacus`, `aihubmix`, `alibaba-coding-plan`, `alibaba-coding-plan-cn`, `atlascloud`, `azure-cognitive-services`, `bailing`, `baseten`, `berget`, `cerebras`, `cheapaimodel`, `cheaperinference`, `chutes`, `clarifai`, `cloudferro-sherlock`, `cohere`, `cortecs`, `deepinfra`, `digitalocean`, `dinference`, `drun`, `evroc`, `fastrouter`, `friendli` | | `freebuff2api`, `google-vertex`, `google-vertex-anthropic`, `helicone`, `iflowcn`, `inception`, `inference`, `io-net`, `jiekou`, `kilo`, `kimi-for-coding`, `kuae-cloud-coding-plan`, `llama`, `lucidquery`, `meganova`, `minimax-cn-coding-plan`, `minimax-coding-plan`, `moark`, `modelscope`, `morph` | | `nano-gpt`, `nearai`, `nebius`, `nova`, `novita-ai`, `ollama-cloud`, `opencode`, `opencode-go`, `opper`, `orcarouter`, `ovhcloud`, `perplexity`, `perplexity-agent`, `poe`, `pollinations`, `privatemode-ai`, `qihang-ai`, `qiniu-ai`, `requesty`, `scaleway`, `siliconflow`, `siliconflow-cn`, `stackit` | | `stepfun`, `submodel`, `synthetic`, `tencent-coding-plan`, `upstage`, `v0`, `venice`, `vercel`, `vivgrid`, `vultr`, `wandb`, `xiaomi`, `zai-coding-plan`, `zenmux`, `zhipuai`, `zhipuai-coding-plan` | @@ -630,6 +630,25 @@ click **Test Connection**. Interactive Ask streaming, tool calls, and vision work through the existing OpenAI-compatible path. Vision depends on the model: `deepseek-ai/deepseek-v4-flash` and `deepseek-ai/deepseek-v3.2` are text-only. +#### cheapaimodel + +[cheapaimodel](https://cheapaimodel.ai) is an OpenAI-compatible, pay-per-token +gateway for open-weight models (DeepSeek, GLM, Kimi) and Grok at +`https://api.cheapaimodel.ai/v1`. Model IDs are bare (such as +`deepseek-v4-1-flash`, `glm-5.3-flash`, `glm-5.3`, and `grok-4.7`); the full +list is on the [models page](https://cheapaimodel.ai/models). See the +[docs](https://cheapaimodel.ai/docs). + +In WebBrain, open **Providers -> LLM -> cheapaimodel**. Create an API key in the +[console](https://console.cheapaimodel.ai/keys), paste it into the card, keep +the default `deepseek-v4-1-flash` model (1000000 tokens), then click **Test +Connection**. Interactive Ask streaming, tool calls, and vision work through +the existing OpenAI-compatible path. Vision depends on the model: use +`deepseek-v4-1-flash` or `grok-4.7`. `glm-5.3` is text-only, and `glm-5.3-flash` +rejects WebBrain's vision requests because it cannot turn reasoning off (HTTP +400); both work for text chat and tool calls. `kimi-k3` only accepts a +temperature of 1 or 0.6, so it is not suggested on this card. + ### Ask response streaming Providers with `supportsAskStreaming` stream visible text during interactive diff --git a/src/chrome/icons/providers/SOURCES.md b/src/chrome/icons/providers/SOURCES.md index 2842abebf..cf91d6442 100644 --- a/src/chrome/icons/providers/SOURCES.md +++ b/src/chrome/icons/providers/SOURCES.md @@ -21,6 +21,7 @@ Most brand marks come from [Lobe Icons](https://github.com/lobehub/lobe-icons) | nearai | WebBrain-authored simple N mark (not an official NEAR brand asset) | | cheaperinference | Cheaper Inference logo mark (cheaperinference.com) | | opper | Opper official logo mark (opper.ai) | +| cheapaimodel | cheapaimodel logo mark (cheapaimodel.ai) | Brand trademarks remain property of their owners; used only for provider identification in the settings UI. diff --git a/src/chrome/icons/providers/cheapaimodel.svg b/src/chrome/icons/providers/cheapaimodel.svg new file mode 100644 index 000000000..44c2ed1dd --- /dev/null +++ b/src/chrome/icons/providers/cheapaimodel.svg @@ -0,0 +1 @@ +cheapaimodel diff --git a/src/chrome/src/providers/provider-catalog.js b/src/chrome/src/providers/provider-catalog.js index f79747ae6..41e338ade 100644 --- a/src/chrome/src/providers/provider-catalog.js +++ b/src/chrome/src/providers/provider-catalog.js @@ -73,6 +73,7 @@ const PROVIDERS = [ provider('baseten', 'Baseten', 'https://inference.baseten.co/v1', 'moonshotai/Kimi-K3', 1048576, { apiKeyUrl: 'https://docs.baseten.co/inference/model-apis/overview', supportsVision: true, inputCostPerMillionUsd: 3, cacheReadCostPerMillionUsd: 0.3, outputCostPerMillionUsd: 15 }), provider('berget', 'Berget.AI', 'https://api.berget.ai/v1', 'meta-llama/Llama-3.3-70B-Instruct', 128000, { apiKeyUrl: 'https://api.berget.ai', inputCostPerMillionUsd: 0.99, outputCostPerMillionUsd: 0.99 }), provider('cerebras', 'Cerebras', 'https://api.cerebras.ai/v1', 'gemma-4-31b', 131072, { category: 'cloud', apiKeyUrl: 'https://cloud.cerebras.ai/', supportsVision: true, inputCostPerMillionUsd: 0.99, outputCostPerMillionUsd: 1.49 }), + provider('cheapaimodel', 'cheapaimodel', 'https://api.cheapaimodel.ai/v1', 'deepseek-v4-1-flash', 1000000, { apiKeyUrl: 'https://console.cheapaimodel.ai/keys', supportsVision: true, suggestions: ['deepseek-v4-1-flash', 'glm-5.3-flash', 'glm-5.3', 'grok-4.7'] }), provider('cheaperinference', 'Cheaper Inference', 'https://api.cheaperinference.com/v1', 'gpt-5.4-mini', 400000, { apiKeyUrl: 'https://cheaperinference.com', supportsVision: true, suggestions: ['gpt-5.4-mini', 'claude-sonnet-5', 'gemini-3.5-flash', 'deepseek-v4-flash'] }), provider('chutes', 'Chutes', 'https://llm.chutes.ai/v1', 'moonshotai/Kimi-K2.6-TEE', 262144, { apiKeyUrl: 'https://chutes.ai/', supportsVision: true, inputCostPerMillionUsd: 0.66, cacheReadCostPerMillionUsd: 0.33, outputCostPerMillionUsd: 3.5 }), provider('clarifai', 'Clarifai', 'https://api.clarifai.com/v2/ext/openai/v1', 'moonshotai/chat-completion/models/Kimi-K2_6', 262144, { apiKeyUrl: 'https://clarifai.com/settings/security', supportsVision: true, inputCostPerMillionUsd: 0.95, outputCostPerMillionUsd: 4, apiKeyPlaceholder: 'Personal access token' }), diff --git a/src/firefox/icons/providers/SOURCES.md b/src/firefox/icons/providers/SOURCES.md index 668cd35d9..303ff2fcd 100644 --- a/src/firefox/icons/providers/SOURCES.md +++ b/src/firefox/icons/providers/SOURCES.md @@ -21,6 +21,7 @@ Most brand marks come from [Lobe Icons](https://github.com/lobehub/lobe-icons) | nearai | WebBrain-authored simple N mark (not an official NEAR brand asset) | | cheaperinference | Cheaper Inference logo mark (cheaperinference.com) | | opper | Opper official logo mark (opper.ai) | +| cheapaimodel | cheapaimodel logo mark (cheapaimodel.ai) | Brand trademarks remain property of their owners; used only for provider identification in the settings UI. diff --git a/src/firefox/icons/providers/cheapaimodel.svg b/src/firefox/icons/providers/cheapaimodel.svg new file mode 100644 index 000000000..44c2ed1dd --- /dev/null +++ b/src/firefox/icons/providers/cheapaimodel.svg @@ -0,0 +1 @@ +cheapaimodel diff --git a/src/firefox/src/providers/provider-catalog.js b/src/firefox/src/providers/provider-catalog.js index f79747ae6..41e338ade 100644 --- a/src/firefox/src/providers/provider-catalog.js +++ b/src/firefox/src/providers/provider-catalog.js @@ -73,6 +73,7 @@ const PROVIDERS = [ provider('baseten', 'Baseten', 'https://inference.baseten.co/v1', 'moonshotai/Kimi-K3', 1048576, { apiKeyUrl: 'https://docs.baseten.co/inference/model-apis/overview', supportsVision: true, inputCostPerMillionUsd: 3, cacheReadCostPerMillionUsd: 0.3, outputCostPerMillionUsd: 15 }), provider('berget', 'Berget.AI', 'https://api.berget.ai/v1', 'meta-llama/Llama-3.3-70B-Instruct', 128000, { apiKeyUrl: 'https://api.berget.ai', inputCostPerMillionUsd: 0.99, outputCostPerMillionUsd: 0.99 }), provider('cerebras', 'Cerebras', 'https://api.cerebras.ai/v1', 'gemma-4-31b', 131072, { category: 'cloud', apiKeyUrl: 'https://cloud.cerebras.ai/', supportsVision: true, inputCostPerMillionUsd: 0.99, outputCostPerMillionUsd: 1.49 }), + provider('cheapaimodel', 'cheapaimodel', 'https://api.cheapaimodel.ai/v1', 'deepseek-v4-1-flash', 1000000, { apiKeyUrl: 'https://console.cheapaimodel.ai/keys', supportsVision: true, suggestions: ['deepseek-v4-1-flash', 'glm-5.3-flash', 'glm-5.3', 'grok-4.7'] }), provider('cheaperinference', 'Cheaper Inference', 'https://api.cheaperinference.com/v1', 'gpt-5.4-mini', 400000, { apiKeyUrl: 'https://cheaperinference.com', supportsVision: true, suggestions: ['gpt-5.4-mini', 'claude-sonnet-5', 'gemini-3.5-flash', 'deepseek-v4-flash'] }), provider('chutes', 'Chutes', 'https://llm.chutes.ai/v1', 'moonshotai/Kimi-K2.6-TEE', 262144, { apiKeyUrl: 'https://chutes.ai/', supportsVision: true, inputCostPerMillionUsd: 0.66, cacheReadCostPerMillionUsd: 0.33, outputCostPerMillionUsd: 3.5 }), provider('clarifai', 'Clarifai', 'https://api.clarifai.com/v2/ext/openai/v1', 'moonshotai/chat-completion/models/Kimi-K2_6', 262144, { apiKeyUrl: 'https://clarifai.com/settings/security', supportsVision: true, inputCostPerMillionUsd: 0.95, outputCostPerMillionUsd: 4, apiKeyPlaceholder: 'Personal access token' }), diff --git a/test/run.js b/test/run.js index e6620641a..bb100963a 100644 --- a/test/run.js +++ b/test/run.js @@ -76744,7 +76744,7 @@ test('_defaultConfigs: every entry carries an explicit category', () => { test('extended provider catalog is complete, mirrored, safe, and excluded-provider clean', async () => { const expectedIds = ` api-route 302ai abacus aihubmix alibaba-coding-plan alibaba-coding-plan-cn - atlascloud azure-cognitive-services bailing baseten berget cerebras cheaperinference chutes clarifai + atlascloud azure-cognitive-services bailing baseten berget cerebras cheapaimodel cheaperinference chutes clarifai cloudferro-sherlock cohere cortecs deepinfra digitalocean dinference drun evroc fastrouter freebuff2api friendli google-vertex google-vertex-anthropic helicone iflowcn inception inference io-net jiekou kilo kimi-for-coding @@ -76758,7 +76758,7 @@ test('extended provider catalog is complete, mirrored, safe, and excluded-provid `.trim().split(/\s+/); const excluded = ['github-models', 'github-copilot', 'gitlab', 'sap-ai-core']; - assert.equal(expectedIds.length, 84); + assert.equal(expectedIds.length, 85); assert.deepEqual(ProviderCatalogCh.ADDITIONAL_PROVIDER_IDS, expectedIds); assert.deepEqual(ProviderCatalogFx.ADDITIONAL_PROVIDER_IDS, expectedIds); assert.deepEqual( @@ -76773,8 +76773,8 @@ test('extended provider catalog is complete, mirrored, safe, and excluded-provid ]) { const defaults = new PM()._defaultConfigs(); // Includes the sidepanel-only WebBrain Compass XL runtime profile, which is - // deliberately omitted from the 118/117 Settings provider cards. - const expectedDefaultCount = label === 'chrome' ? 119 : 118; + // deliberately omitted from the 119/118 Settings provider cards. + const expectedDefaultCount = label === 'chrome' ? 120 : 119; assert.equal( Object.keys(defaults).length, expectedDefaultCount, @@ -76998,6 +76998,30 @@ test('extended provider catalog is complete, mirrored, safe, and excluded-provid ProviderCatalogCh.ADDITIONAL_PROVIDER_UI.atlascloud.suggestions, ['qwen/qwen3.7-plus', 'deepseek-ai/deepseek-v4-flash', 'deepseek-ai/deepseek-v3.2', 'moonshotai/kimi-k2.6'], ); + assert.deepEqual( + { + baseUrl: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.baseUrl, + model: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.model, + contextWindow: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.contextWindow, + supportsVision: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.supportsVision, + supportsTools: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.supportsTools, + supportsAskStreaming: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.supportsAskStreaming, + apiKeyUrl: ProviderCatalogCh.ADDITIONAL_PROVIDER_DEFAULTS.cheapaimodel.apiKeyUrl, + }, + { + baseUrl: 'https://api.cheapaimodel.ai/v1', + model: 'deepseek-v4-1-flash', + contextWindow: 1000000, + supportsVision: true, + supportsTools: true, + supportsAskStreaming: true, + apiKeyUrl: 'https://console.cheapaimodel.ai/keys', + }, + ); + assert.deepEqual( + ProviderCatalogCh.ADDITIONAL_PROVIDER_UI.cheapaimodel.suggestions, + ['deepseek-v4-1-flash', 'glm-5.3-flash', 'glm-5.3', 'grok-4.7'], + ); assert.deepEqual( ProviderCatalogCh.ADDITIONAL_PROVIDER_UI['kimi-for-coding'].suggestions, ['kimi-for-coding', 'kimi-for-coding-highspeed', 'k3'],