Skip to content

Add Public AI (TEE) inference provider#2252

Open
sulijia wants to merge 4 commits into
huggingface:mainfrom
sulijia:add-publicai-tee-provider
Open

Add Public AI (TEE) inference provider#2252
sulijia wants to merge 4 commits into
huggingface:mainfrom
sulijia:add-publicai-tee-provider

Conversation

@sulijia

@sulijia sulijia commented Jun 24, 2026

Copy link
Copy Markdown

What this adds

Registers publicai-tee as 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 — new PublicAITeeConversationalTask (extends BaseConversationalTask, base URL https://tee.publicai.io)
  • src/lib/getProviderHelper.ts — register the provider for the conversational task
  • src/types.ts — add publicai-tee to INFERENCE_PROVIDERS and PROVIDERS_HUB_ORGS (org: publicai-tee)
  • src/providers/consts.ts — add the provider to HARDCODED_MODEL_INFERENCE_MAPPING
  • README.md — list the provider and its supported-models endpoint
  • test/InferenceClient.spec.ts — add PublicAI TEE conversational integration tests (gated on HF_PUBLICAI_TEE_KEY)

Verification

Against the package (packages/inference):

  • tsc (check) — passes
  • eslint (lint:check) — passes
  • oxfmt --check (format) — passes

The endpoint was manually verified to return OpenAI-compatible responses for both non-streaming and streaming chat completions (id / created / model / choices / usage present; SSE chunks end with data: [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-tee as a new inference provider for conversational (chat completion) calls against the OpenAI-compatible TEE endpoint at https://tee.publicai.io, via a thin PublicAITeeConversationalTask on BaseConversationalTask.

Wires the provider through INFERENCE_PROVIDERS, PROVIDERS_HUB_ORGS, getProviderHelper, and HARDCODED_MODEL_INFERENCE_MAPPING, and documents it in README.md (provider list and partners models API). Integration tests cover non-streaming and streaming chatCompletion when HF_PUBLICAI_TEE_KEY is set.

Reviewed by Cursor Bugbot for commit 88767d1. Bugbot is set up for automated code reviews on this repo. Configure here.

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>
@sulijia

sulijia commented Jun 24, 2026

Copy link
Copy Markdown
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:

  • Provider id: publicai-tee
  • Owning Hub org (Team plan): publicai-tee
  • Endpoint: https://tee.publicai.io — OpenAI-compatible, TEE-hosted; serves conversational (chat-completion) models, so the helper just extends BaseConversationalTask (no custom route/payload/response handling).

I manually verified the endpoint returns OpenAI-compatible responses for both non-streaming and streaming chat completions (id / created / model / choices / usage present; SSE chunks end with data: [DONE]). Locally, tsc, eslint, and oxfmt --check all pass on the package.

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! 🙏

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