Skip to content

Add GonkaRouter provider#1723

Open
Ryanchen911 wants to merge 1 commit into
Portkey-AI:mainfrom
Ryanchen911:add-gonkarouter-provider
Open

Add GonkaRouter provider#1723
Ryanchen911 wants to merge 1 commit into
Portkey-AI:mainfrom
Ryanchen911:add-gonkarouter-provider

Conversation

@Ryanchen911

Copy link
Copy Markdown

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-base transformers, mirroring the existing lambda / gonkabroker providers.

Changes

  • src/providers/gonkarouter/api.ts — base URL https://api.gonkarouter.io/v1, Authorization: Bearer auth, maps /chat/completions and /completions.
  • src/providers/gonkarouter/index.ts — wires chatComplete and complete through open-ai-base.
  • src/globals.ts — adds the GONKAROUTER constant and a VALID_PROVIDERS entry.
  • 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.

Base URL https://api.gonkarouter.io/v1
Auth Authorization: Bearer <apiKey>
Endpoints /chat/completions, /completions
Model catalog GET https://api.gonkarouter.io/v1/models

Motivation

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).
  • Verified the live endpoints exist and enforce auth:
    • GET https://api.gonkarouter.io/v1/models401 without a key
    • POST https://api.gonkarouter.io/v1/chat/completions401 {"error":{"code":"unauthorized","message":"missing Authorization or x-api-key header"}} without a key

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant