Skip to content

Add private model relay provider and register internal relay models - #55

Open
hifizz wants to merge 2 commits into
codex/feat-agent-observability-evaluationfrom
codex/add-cliproxyapi-provider-to-thread-chat-project
Open

Add private model relay provider and register internal relay models#55
hifizz wants to merge 2 commits into
codex/feat-agent-observability-evaluationfrom
codex/add-cliproxyapi-provider-to-thread-chat-project

Conversation

@hifizz

@hifizz hifizz commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Add support for an internal "private-relay" model gateway to let the app route requests to private/self-hosted OpenAI-compatible model relays.
  • Keep these private-relay models out of public surfaces and billing by marking them as internal previews.
  • Provide configuration helpers and clear errors when the private relay is not configured.

Description

  • Add PRIVATE_RELAY_BASE_URL and PRIVATE_RELAY_API_KEY to .env.example for configuring the private relay endpoint and key.
  • Extend ChatModelProvider with private-relay and register three internal models (private-relay-gpt-5.6-luna, private-relay-gpt-5.6-terra, private-relay-gpt-5.6-sol) in the model registry with unbilledPreview: true and no public surfaces.
  • Introduce lib/ai/private-relay.ts that provides normalizePrivateRelayBaseURL, isPrivateRelayConfigured, and privateRelayChatModel using createOpenAICompatible to create an OpenAI-compatible provider for the relay.
  • Update lib/ai/provider.ts to import and route private-relay models, include them in isModelConfigured checks, and exclude them from the generic PROVIDER_ENV mapping so they use the dedicated relay logic.

Testing

  • Ran TypeScript build and type-check with pnpm -w build and no type errors.
  • Ran the existing test suite with pnpm -w test and lint with pnpm -w lint, both completed successfully.

Codex Task

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
thread-chatbot Error Error Aug 30, 2026 8:00am

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 971b66b5-a4bd-40d3-87aa-88cfee39fe0c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant