From 2d1e0f0952fb9823cfb85a79e62ca5a9e80755ef Mon Sep 17 00:00:00 2001 From: Gonka Broker Date: Fri, 26 Jun 2026 19:29:34 +0000 Subject: [PATCH] feat: add Gonka Broker as an LLM provider --- core/llm/autodetect.ts | 2 + core/llm/llms/Gonkabroker.ts | 13 ++++ core/llm/llms/index.ts | 2 + .../model-providers/more/gonkabroker.mdx | 78 +++++++++++++++++++ docs/docs.json | 1 + extensions/vscode/config_schema.json | 2 + .../pages/AddNewModel/configs/providers.ts | 20 +++++ packages/openai-adapters/src/index.ts | 2 + packages/openai-adapters/src/types.ts | 1 + 9 files changed, 121 insertions(+) create mode 100644 core/llm/llms/Gonkabroker.ts create mode 100644 docs/customize/model-providers/more/gonkabroker.mdx diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index c8511554b8b..a781dd78a01 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -74,6 +74,7 @@ const PROVIDER_HANDLES_TEMPLATING: string[] = [ "nous", "zAI", "tensorix", + "gonkabroker", // TODO add these, change to inverted logic so only the ones that need templating are hardcoded // Asksage.ts // Azure.ts @@ -253,6 +254,7 @@ const PARALLEL_PROVIDERS: string[] = [ "scaleway", "minimax", "tensorix", + "gonkabroker", ]; function llmCanGenerateInParallel(provider: string, model: string): boolean { diff --git a/core/llm/llms/Gonkabroker.ts b/core/llm/llms/Gonkabroker.ts new file mode 100644 index 00000000000..81b33a9ccb9 --- /dev/null +++ b/core/llm/llms/Gonkabroker.ts @@ -0,0 +1,13 @@ +import OpenAI from "./OpenAI.js"; + +import type { LLMOptions } from "../../index.js"; + +class Gonkabroker extends OpenAI { + static providerName = "gonkabroker"; + static defaultOptions: Partial = { + apiBase: "https://proxy.gonkabroker.com/v1/", + useLegacyCompletionsEndpoint: false, + }; +} + +export default Gonkabroker; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 4978f0617f2..b43d02f93d9 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -25,6 +25,7 @@ import Fireworks from "./Fireworks"; import Flowise from "./Flowise"; import FunctionNetwork from "./FunctionNetwork"; import Gemini from "./Gemini"; +import Gonkabroker from "./Gonkabroker"; import Groq from "./Groq"; import HuggingFaceInferenceAPI from "./HuggingFaceInferenceAPI"; import HuggingFaceTEIEmbeddingsProvider from "./HuggingFaceTEI"; @@ -71,6 +72,7 @@ import WatsonX from "./WatsonX"; import xAI from "./xAI"; import zAI from "./zAI"; export const LLMClasses = [ + Gonkabroker, Anthropic, Cohere, CometAPI, diff --git a/docs/customize/model-providers/more/gonkabroker.mdx b/docs/customize/model-providers/more/gonkabroker.mdx new file mode 100644 index 00000000000..81214c2f2b2 --- /dev/null +++ b/docs/customize/model-providers/more/gonkabroker.mdx @@ -0,0 +1,78 @@ +--- +title: "Gonka Broker" +description: "Configure Gonka Broker with Continue to access decentralized Gonka compute through an OpenAI-compatible API with predictable, top-up pricing" +--- + +[Gonka Broker](https://gonkabroker.com) is an OpenAI-compatible gateway to decentralized [Gonka](https://gonka.ai) compute. You top up once, your rate is locked at top-up, and billing is flat per token in and out — no crypto wallet required. See [pricing](https://gonkabroker.com/gonka-api-pricing/). + +You can get an API key from [app.gonkabroker.com](https://app.gonkabroker.com). + +## Chat Model + +We recommend `MiniMaxAI/MiniMax-M2.7` for chat and coding tasks. + + + + ```yaml title="config.yaml" + name: My Config + version: 0.0.1 + schema: v1 + + models: + - name: MiniMax M2.7 + provider: gonkabroker + model: MiniMaxAI/MiniMax-M2.7 + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "MiniMax M2.7", + "provider": "gonkabroker", + "model": "MiniMaxAI/MiniMax-M2.7", + "apiKey": "" + } + ] + } + ``` + + + +## Autodetect Models + +Set `model` to `AUTODETECT` to have Continue discover every model Gonka Broker currently serves from its public `/v1/models` endpoint — no need to list them by hand. + + + + ```yaml title="config.yaml" + name: My Config + version: 0.0.1 + schema: v1 + + models: + - name: Gonka Broker + provider: gonkabroker + model: AUTODETECT + apiKey: + ``` + + + ```json title="config.json" + { + "models": [ + { + "title": "Gonka Broker", + "provider": "gonkabroker", + "model": "AUTODETECT", + "apiKey": "" + } + ] + } + ``` + + + +[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Gonkabroker.ts) diff --git a/docs/docs.json b/docs/docs.json index b7a1d83f13a..441f1b36291 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -109,6 +109,7 @@ "customize/model-providers/more/clawrouter", "customize/model-providers/more/deepseek", "customize/model-providers/more/deepinfra", + "customize/model-providers/more/gonkabroker", "customize/model-providers/more/groq", "customize/model-providers/more/llamacpp", "customize/model-providers/more/llamastack", diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index fb3f4c61362..a59cd6c3789 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -229,6 +229,7 @@ "moonshot", "siliconflow", "tensorix", + "gonkabroker", "function-network", "scaleway", "relace", @@ -282,6 +283,7 @@ "### Moonshot\nTo get started with Moonshot AI, obtain your API key from [Moonshot AI](https://platform.moonshot.cn/). Moonshot AI provides high-quality large language models with competitive pricing.\n> [Reference](https://platform.moonshot.cn/docs/api)", "### SiliconFlow\nTo get started with SiliconFlow, obtain your API key from [SiliconCloud](https://cloud.siliconflow.cn/account/ak). SiliconCloud provides cost-effective GenAI services based on excellent open source basic models.\n> [Models](https://siliconflow.cn/zh-cn/models)", "### Tensorix\nTensorix is an OpenAI-compatible API gateway with access to DeepSeek, Llama, Qwen, GLM, and other models. Pay-as-you-go with no subscription required.\nTo get started, create an account and get an API key at [app.tensorix.ai](https://app.tensorix.ai).\n> [Models](https://tensorix.ai/models)", + "### Gonka Broker\nGonka Broker is an OpenAI-compatible gateway to decentralized Gonka compute. Your rate is locked at top-up and billing is flat per token in and out, with no crypto wallet required.\nTo get started, create an account and get an API key at [app.gonkabroker.com](https://app.gonkabroker.com).\n> [Pricing](https://gonkabroker.com/gonka-api-pricing/)", "### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.", "### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).", "### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).", diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 9e2aba08c5c..144a9d0bb62 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -1250,6 +1250,26 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo ], apiKeyUrl: "https://cloud.siliconflow.cn/account/ak", }, + gonkabroker: { + title: "Gonka Broker", + provider: "gonkabroker", + description: + "Gonka Broker is an OpenAI-compatible gateway to decentralized Gonka compute.", + longDescription: + "To get started with Gonka Broker, create an account and get an API key at [app.gonkabroker.com](https://app.gonkabroker.com).", + tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], + collectInputFor: [ + { + inputType: "text", + key: "apiKey", + label: "API Key", + placeholder: "Enter your Gonka Broker API key", + required: true, + }, + ], + packages: [{ ...models.AUTODETECT }], + apiKeyUrl: "https://app.gonkabroker.com", + }, tensorix: { title: "Tensorix", provider: "tensorix", diff --git a/packages/openai-adapters/src/index.ts b/packages/openai-adapters/src/index.ts index 52fb2d33a0c..aa89fdabdaa 100644 --- a/packages/openai-adapters/src/index.ts +++ b/packages/openai-adapters/src/index.ts @@ -176,6 +176,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined { return openAICompatible("https://api.function.network/v1/", config); case "tensorix": return openAICompatible("https://api.tensorix.ai/v1/", config); + case "gonkabroker": + return openAICompatible("https://proxy.gonkabroker.com/v1/", config); case "openrouter": return new OpenRouterApi(config); case "clawrouter": diff --git a/packages/openai-adapters/src/types.ts b/packages/openai-adapters/src/types.ts index 14b9512f75b..99169049170 100644 --- a/packages/openai-adapters/src/types.ts +++ b/packages/openai-adapters/src/types.ts @@ -60,6 +60,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({ z.literal("zAI"), z.literal("scaleway"), z.literal("tensorix"), + z.literal("gonkabroker"), z.literal("ncompass"), z.literal("relace"), z.literal("huggingface-inference-api"),