@gonkabroker/ai-sdk-provider
v0.1.2
Published
Gonka Broker provider for the Vercel AI SDK — OpenAI-compatible access to open-source models on the decentralized Gonka network.
Readme
@gonkabroker/ai-sdk-provider
Gonka Broker provider for the Vercel AI SDK. OpenAI-compatible access to open-source models (MiniMax, Kimi, …) running on the decentralized Gonka network — no crypto or wallet needed.
Built on @ai-sdk/openai-compatible.
Install
npm install @gonkabroker/ai-sdk-providerUsage
Set your API key (get one in the app at gonkabroker.com):
export GONKABROKER_API_KEY="gnk-prx-..."import { gonkabroker } from '@gonkabroker/ai-sdk-provider';
import { generateText } from 'ai';
const { text } = await generateText({
model: gonkabroker('MiniMaxAI/MiniMax-M2.7'),
prompt: 'Explain decentralized inference in one sentence.',
});
console.log(text);Custom configuration
import { createGonkaBroker } from '@gonkabroker/ai-sdk-provider';
const gonkabroker = createGonkaBroker({
apiKey: process.env.GONKABROKER_API_KEY, // optional; this is the default
// baseURL: 'https://proxy.gonkabroker.com/v1', // override if needed
// headers: { 'X-My-Header': '...' },
});Streaming and tool calling
Streaming (streamText) and tool calling are supported through the OpenAI-compatible base.
import { gonkabroker } from '@gonkabroker/ai-sdk-provider';
import { streamText } from 'ai';
const result = streamText({
model: gonkabroker('moonshotai/Kimi-K2.6'),
prompt: 'Write a haiku about GPUs.',
});
for await (const chunk of result.textStream) process.stdout.write(chunk);Models
Any model id accepted by Gonka Broker works. The package ships auto-complete hints for the
models available at publish time; the authoritative, always-current list is the public
catalog at GET /v1/models.
License
MIT
