@devries-cameron20 / t3code Mirror · read-only / commits / 236be55fae
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 23:15 UTC

fix(providers): declare CLI-owned setup capabilities (#18425)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Nicholas Gerasimatos committed Oct 19, 2026 at 21:23 UTC 236be55faec614990bbc05ce6ea8123b1c709845
4 files changed +8 -2
apps/server/src/provider/ProviderRegistry.test.ts
+3
@@ -443,6 +443,7 @@ it.layer(
443 assert.strictEqual(status.auth.type, "chatgpt");
444 assert.strictEqual(status.auth.label, "ChatGPT Pro 20x Subscription");
445 assert.strictEqual(status.auth.email, "test@example.com");
446 + assert.deepStrictEqual(status.setup, { canAuthenticate: false, canInstall: false });
447 assert.deepStrictEqual(status.models, [
448 {
449 slug: "gpt-live-codex",
@@ -589,6 +590,7 @@ it.layer(
590 assert.strictEqual(status.status, "error");
591 assert.strictEqual(status.installed, false);
592 assert.strictEqual(status.auth.status, "unknown");
593 + assert.deepStrictEqual(status.setup, { canAuthenticate: false, canInstall: false });
594 assert.include(status.message, binaryPath);
595 assert.include(status.message, "Settings → Providers → Codex → Binary path on the server");
596 assert.strictEqual(
@@ -3719,6 +3721,7 @@ it.layer(
3721 assert.notStrictEqual(ghost, undefined);
3722 assert.strictEqual(ghost?.driver, "ghostDriver");
3723 assert.strictEqual(ghost?.availability, "unavailable");
3724 + assert.strictEqual(Object.hasOwn(ghost ?? {}, "setup"), false);
3725 assert.match(ghost?.unavailableReason ?? "", /ghostDriver/);
3726 }).pipe(Effect.provide(runtimeServices));
3727 }),
apps/server/src/provider/unavailableProviderSnapshot.ts
+2 -1
@@ -25,7 +25,8 @@ export const buildUnavailableProviderSnapshot = Effect.fn(
25 const checkedAt = input.checkedAt ?? (yield* nowIso);
26 const displayName = input.displayName?.trim() || (input.driverKind as string);
27
28 - const base = buildServerProvider({
28 + // No driver ran, so its setup capabilities are still unknown.
29 + const { setup: _setup, ...base } = buildServerProvider({
30 presentation: { displayName },
31 enabled: false,
32 checkedAt,
apps/web/src/components/settings/CodexSetupSection.tsx
+1 -1
@@ -131,7 +131,7 @@ export function CodexSetupSection(props: CodexSetupSectionProps) {
131 ) : null
132 }
133 />
134 - ) : props.mode === "existing" ? null : props.provider?.setup === undefined ? (
134 + ) : props.mode === "existing" ? null : !props.provider?.setup?.canAuthenticate ? (
135 props.presentation === "onboarding" ? (
136 <CodexWelcomeCard
137 title={props.displayName || props.provider?.displayName || "Codex"}
packages/provider-core/src/server/snapshotProbe.ts
+2
@@ -265,6 +265,8 @@ export function buildServerProvider(input: {
265 version: input.probe.version,
266 status: input.enabled ? input.probe.status : "disabled",
267 auth: input.probe.auth,
268 + // Drivers with in-app setup replace these CLI-owned defaults.
269 + setup: { canAuthenticate: false, canInstall: false },
270 checkedAt: input.checkedAt,
271 ...(input.probe.message ? { message: input.probe.message } : {}),
272 models: input.models,