Add GonkaRouter provider#1723
Open
Ryanchen911 wants to merge 1 commit into
Open
Conversation
Integrates GonkaRouter as an OpenAI-compatible provider, reusing the open-ai-base transformers (same pattern as lambda / gonkabroker). GonkaRouter is an OpenAI-compatible AI model router providing unified access to open-source models (MiniMax, Kimi, Qwen, and more) on the decentralized Gonka network. https://gonkarouter.io - src/providers/gonkarouter/api.ts: base URL https://api.gonkarouter.io/v1, Authorization: Bearer auth, /chat/completions + /completions endpoints - src/providers/gonkarouter/index.ts: wires chatComplete/complete through open-ai-base. Pure pass-through - no baked-in default model. - src/globals.ts, src/providers/index.ts: register the provider Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds GonkaRouter as a new provider. GonkaRouter is an OpenAI-compatible AI model router that provides unified access to open-source models (MiniMax, Kimi, Qwen, and more) running on the decentralized Gonka network. See https://gonkarouter.io.
The integration reuses the
open-ai-basetransformers, mirroring the existinglambda/gonkabrokerproviders.Changes
src/providers/gonkarouter/api.ts— base URLhttps://api.gonkarouter.io/v1,Authorization: Bearerauth, maps/chat/completionsand/completions.src/providers/gonkarouter/index.ts— wireschatCompleteandcompletethroughopen-ai-base.src/globals.ts— adds theGONKAROUTERconstant and aVALID_PROVIDERSentry.src/providers/index.ts— adds the import and provider-map entry.Model handling
Pure pass-through — no default model is baked in (
{ model: undefined }clears the inherited base default). A request without a model surfaces a clean "model required" error from GonkaRouter rather than routing to a phantom model. Model identity belongs to the caller.https://api.gonkarouter.io/v1Authorization: Bearer <apiKey>/chat/completions,/completionsGET https://api.gonkarouter.io/v1/modelsMotivation
Lets Portkey users route to open-source models on the Gonka network through the standard OpenAI-compatible surface.
Related Issues
N/A
Testing
npm run build— succeeds.npm run format:check— passes (also enforced by the pre-push hook).GET https://api.gonkarouter.io/v1/models→401without a keyPOST https://api.gonkarouter.io/v1/chat/completions→401 {"error":{"code":"unauthorized","message":"missing Authorization or x-api-key header"}}without a key