feat(api): retire ChatGPT plan sign-in by default
ci / checks (push) Successful in 57s
ci / test (push) Successful in 1m0s
ci / chart (push) Successful in 4s
ci / web (push) Successful in 21s
ci / docker (push) Successful in 1m48s
ci / publish-edge-image (push) Successful in 12s
ci / publish-edge-chart (push) Successful in 4s

A room's provider serves every member, while a ChatGPT plan belongs to
one account, so sharing it breaks OpenAI's terms. Together now hides
the chatgpt kind, refuses to store a new one, and fails a room that
still points at it with a message that names the API-key route.

Existing provider rows stay in the database. The room settings dialog
keeps the room's current provider visible even when its kind is
retired, so the room shows what it is pinned to instead of silently
losing it. Creating or updating a room to that provider is refused.

`RHEMA_TOGETHER_I_WANT_CHATGPT_BAN=1` lifts the block for a single-user
local test. The value has to be exactly `1`; any other value leaves the
block in place.
This commit is contained in:
vhaudiquet committed 2026-12-03 16:10:14 +01:00
1 parent 62fa380ec0
commit 64d7f359f5
8 files changed
+157 -34

No files matched your search

+10 -6
View File
@@ -600,7 +600,7 @@ it. No route, log line, or event carries a stored key.
### Provider sign-in
GitHub Copilot, ChatGPT, and Mistral Vibe do not ask for a key. The
GitHub Copilot and Mistral Vibe do not ask for a key. The
server runs the adapter's `InteractiveLogin` and keeps a per-account
record of its last update. The browser asks the server to start the
flow, polls the record, and renders the instruction, URL, and code. It
@@ -612,10 +612,14 @@ their owner can read or cancel them. They live in memory, so a restart
drops a sign-in in progress. No provider row exists until the adapter
completes.
ChatGPT's callback returns to loopback port 1455, or 1457 when 1455 is
taken. The machine that runs the browser must forward that port to the
server before opening the URL. Copilot's device code and Mistral Vibe's
console sign-in need no inbound port.
Together does not offer ChatGPT plan sign-in by default. A ChatGPT
subscription is personal, and a room's provider serves every member,
so a shared room uses an API-key kind such as `openai`. Existing
`chatgpt` provider rows stay in the database but fail with a clear
message, and neither a new room nor a room settings change can point
at that kind. Setting `RHEMA_TOGETHER_I_WANT_CHATGPT_BAN=1` lifts the
block for a single-user local test; it does not make a shared room
compliant.
A sign-in URL can carry a short-lived device or PKCE token. The server
does not log it, and it is not the stored provider key.
@@ -775,7 +779,7 @@ This repository, as committed:
- A model picker over the provider's live catalog, with context,
output, price, and vision from the adapter and models.dev. A custom
id is always accepted. The add-provider dialog asks for a kind and
key, or runs a sign-in for GitHub Copilot, ChatGPT, and Mistral Vibe.
key, or runs a sign-in for GitHub Copilot and Mistral Vibe.
An OpenAI provider also takes a base URL and an explicit chat
completions or responses API, so one kind reaches OpenAI itself and
any compatible server. The room chooses the model.