Add Public AI (TEE) inference provider#2252
Open
sulijia wants to merge 4 commits into
Open
Conversation
Register `publicai-tee` as a new inference provider backed by an OpenAI-compatible, TEE-hosted endpoint (https://tee.publicai.io). - providers/publicai-tee.ts: PublicAITeeConversationalTask (BaseConversationalTask) - getProviderHelper.ts / types.ts / consts.ts: register the provider - README.md: list the provider and its supported-models endpoint - test: add PublicAI TEE conversational integration tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author
|
Hi @Wauplin @hanouticelina @SBrandeis @celinah 👋 This PR is the JS client integration step of registering Public AI (TEE) as a new inference provider, following the register-as-a-provider guide. Details:
I manually verified the endpoint returns OpenAI-compatible responses for both non-streaming and streaming chat completions ( Could you please approve the CI run and take a look when you have a moment? Also happy to hear the next steps for server-side enablement of the provider. Thanks a lot! 🙏 |
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.
What this adds
Registers
publicai-teeas a new inference provider, backed by an OpenAI-compatible, TEE-hosted endpoint (https://tee.publicai.io). It serves conversational (chat-completion) models.The endpoint follows the OpenAI chat-completions spec, so the helper simply extends
BaseConversationalTask— no custom route/payload/response handling is needed.Changes
src/providers/publicai-tee.ts— newPublicAITeeConversationalTask(extendsBaseConversationalTask, base URLhttps://tee.publicai.io)src/lib/getProviderHelper.ts— register the provider for theconversationaltasksrc/types.ts— addpublicai-teetoINFERENCE_PROVIDERSandPROVIDERS_HUB_ORGS(org:publicai-tee)src/providers/consts.ts— add the provider toHARDCODED_MODEL_INFERENCE_MAPPINGREADME.md— list the provider and its supported-models endpointtest/InferenceClient.spec.ts— addPublicAI TEEconversational integration tests (gated onHF_PUBLICAI_TEE_KEY)Verification
Against the package (
packages/inference):tsc(check) — passeseslint(lint:check) — passesoxfmt --check(format) — passesThe endpoint was manually verified to return OpenAI-compatible responses for both non-streaming and streaming chat completions (
id/created/model/choices/usagepresent; SSE chunks end withdata: [DONE]).🤖 Generated with Claude Code
Note
Low Risk
Additive provider registration with no changes to shared routing or auth logic; behavior matches existing OpenAI-compatible conversational providers like
publicai.Overview
Adds
publicai-teeas a new inference provider for conversational (chat completion) calls against the OpenAI-compatible TEE endpoint athttps://tee.publicai.io, via a thinPublicAITeeConversationalTaskonBaseConversationalTask.Wires the provider through
INFERENCE_PROVIDERS,PROVIDERS_HUB_ORGS,getProviderHelper, andHARDCODED_MODEL_INFERENCE_MAPPING, and documents it inREADME.md(provider list and partners models API). Integration tests cover non-streaming and streamingchatCompletionwhenHF_PUBLICAI_TEE_KEYis set.Reviewed by Cursor Bugbot for commit 88767d1. Bugbot is set up for automated code reviews on this repo. Configure here.