Skip to content

provider: add Gonka Broker#1699

Open
iamoeco wants to merge 1 commit into
Portkey-AI:mainfrom
gonkabroker:add-gonkabroker-provider
Open

provider: add Gonka Broker#1699
iamoeco wants to merge 1 commit into
Portkey-AI:mainfrom
gonkabroker:add-gonkabroker-provider

Conversation

@iamoeco

@iamoeco iamoeco commented Jun 25, 2026

Copy link
Copy Markdown

Description: (required)

  • Add Gonka Broker as a new provider. Gonka Broker is an OpenAI-compatible inference API, so the integration reuses the open-ai-base chat/completion params and response transformers, mirroring the existing lambda provider.
  • New src/providers/gonkabroker/api.ts sets the base URL https://proxy.gonkabroker.com/v1, a Authorization: Bearer header, and /chat/completions + /completions endpoint mapping.
  • New src/providers/gonkabroker/index.ts wires chatComplete and complete via open-ai-base. No default model is baked in: the provider is a pure pass-through, so the inherited open-ai-base default (gpt-3.5-turbo) is cleared with { model: undefined }. An omitted model then returns a clean error from the upstream API instead of silently routing to a model the provider does not serve. Model identity belongs to the caller.
  • Register the provider: GONKABROKER const + VALID_PROVIDERS entry in src/globals.ts, and the import + provider-map entry in src/providers/index.ts.

Tests Run/Test cases added: (required)

  • Verified against a locally running gateway (npm run dev:node) with a real API key. POST /v1/chat/completions with x-portkey-provider: gonkabroker returned HTTP 200 with a valid OpenAI-shaped completion ("provider":"gonkabroker").
  • Verified a request without model returns an error from the provider rather than routing to a default model, confirming the pass-through behavior.
  • npm run format:check passes; npm run build succeeds.

Type of Change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

@iamoeco

iamoeco commented Jul 3, 2026

Copy link
Copy Markdown
Author

Hi @VisargD @narengogi — gentle bump 🙏 The only pending check is the first-contributor CI gate awaiting a maintainer's "approve and run". The PR mirrors the existing lambda provider (4 files, pure pass-through, mergeable). Could you approve the run and take a look? Thanks!

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