Conversation
jonpry
requested review from
SBrandeis,
hanouticelina and
julien-c
as code owners
August 9, 2026 17:17
jonpry
force-pushed
the
add-consensus-protocol-provider
branch
from
August 9, 2026 17:19
6a00fc8 to
00205ff
Compare
Adds Consensus Protocol (https://api.consensusprotocol.org) as a third-party inference provider, following the existing provider registration pattern. - providers/consensus-protocol.ts: BaseConversationalTask helper - types.ts: INFERENCE_PROVIDERS + PROVIDERS_HUB_ORGS (consensus-protocol) - lib/getProviderHelper.ts: import + PROVIDERS entry - providers/consts.ts: HARDCODED_MODEL_INFERENCE_MAPPING entry - README.md: both provider lists - test/InferenceClient.spec.ts: conversational + streaming tests
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.
Adds Consensus Protocol as an inference provider, per step 2 of register-as-a-provider.
Consensus Protocol serves open-weight models (Qwen3, GPT-OSS) over an OpenAI-compatible API at
https://api.consensusprotocol.org.Implementation
A plain
BaseConversationalTaskwith no overrides — the endpoint is OpenAI-compatible on/v1/chat/completionsand accepts the key viaAuthorization: Bearer, so the default helper works as-is.providers/consensus-protocol.tstypes.tsINFERENCE_PROVIDERS+PROVIDERS_HUB_ORGSlib/getProviderHelper.tsPROVIDERSentryproviders/consts.tsHARDCODED_MODEL_INFERENCE_MAPPINGentryREADME.mdtest/InferenceClient.spec.tsProvider slug is
consensus-protocoland the Hub org isconsensus-protocol— kept aligned per the "InferenceProvider should == org namespace" convention intypes.ts.Testing
pnpm check(tsc),pnpm lint:check(eslint),pnpm format:check(oxfmt) — all cleanQwen/Qwen3-Coder-30B-A3B-Instruct→qwen3-coder-30b— greenNote
Low Risk
Additive provider registration with no changes to existing routing or auth; risk is limited to new optional
provider: "consensus-protocol"usage.Overview
Registers Consensus Protocol (
consensus-protocol) as a third-party inference provider soInferenceClientcan route conversational chat (including streaming) tohttps://api.consensusprotocol.orgvia the standard OpenAI-compatibleBaseConversationalTaskhelper.Wiring follows the usual provider pattern: slug and Hub org in
types.ts,PROVIDERSingetProviderHelper.ts, an empty dev mapping slot inconsts.ts, README provider/model list links, and integration tests forchatCompletion/chatCompletionStreamusingHF_CONSENSUS_PROTOCOL_KEY.Reviewed by Cursor Bugbot for commit 00205ff. Bugbot is set up for automated code reviews on this repo. Configure here.