@devries-cameron20 / t3code Mirror · read-only / commits / 76fa23df2e
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 23, 21:45 UTC

fix(provider): mark OpenCode v2 incompatible (#14198)

Julius Marminge committed Sep 28, 2026 at 19:00 UTC 76fa23df2ef09c8d9624cc6ce1273d32452b3d1c
6 files changed +92 -32
apps/mobile/src/features/threads/ThreadComposer.tsx
+5 -1
@@ -663,7 +663,11 @@ export const ThreadComposer = memo(function ThreadComposer(props: ThreadComposer
663 ? "assertive"
664 : "polite"
665 }
666 - className="px-3 py-2 text-xs text-foreground"
666 + className={
667 + selectedProviderStatus.compatibilityAdvisory.status === "broken"
668 + ? "bg-danger px-3 py-2 text-xs text-danger-foreground"
669 + : "px-3 py-2 text-xs text-foreground"
670 + }
671 >
672 {selectedProviderStatus.compatibilityAdvisory.message}
673 </Text>
apps/server/src/provider/model-manifest.json
+5 -3
@@ -1,6 +1,6 @@
1 {
2 "version": 1,
3 - "updatedAt": "2026-09-28T20:00:00Z",
3 + "updatedAt": "2026-09-29T01:03:44Z",
4 "compatibility": [
5 {
6 "driver": "codex",
@@ -43,9 +43,11 @@
43 {
44 "driver": "opencode",
45 "t3CodeRange": ">=0.0.42",
46 - "recommendedRange": ">=1.14.19",
46 + "recommendedRange": ">=1.14.19 <2.0.0",
47 + "recommendedVersion": "1.14.19",
48 "ranges": [
48 - { "range": ">=1.14.19", "status": "supported" },
49 + { "range": ">=2.0.0", "status": "broken" },
50 + { "range": ">=1.14.19 <2.0.0", "status": "supported" },
51 { "range": "<1.14.19", "status": "broken" }
52 ]
53 },
apps/server/src/provider/providerCompatibility.test.ts
-18
@@ -65,24 +65,6 @@ describe("provider compatibility", () => {
65 }
66 });
67
68 - it("supports Codex 0.156 and marks Codex without Thread.projectId broken", () => {
69 - const bundled = ModelManifest.BUNDLED_MODEL_MANIFEST.compatibility;
70 - for (const [t3CodeVersion, codexVersion, expected] of [
71 - ["0.0.42", "0.148.0", "broken"],
72 - ["0.0.42", "0.149.0", "unsupported"],
73 - ["0.0.42", "0.155.0", "unsupported"],
74 - ["0.0.42", "0.156.0", "supported"],
75 - ["0.0.43-nightly.20260924.2200", "0.153.3", "unsupported"],
76 - ["0.0.43-nightly.20260924.2200", "0.156.1", "supported"],
77 - ] as const) {
78 - assert.strictEqual(
79 - resolveProviderCompatibility(bundled, driver, codexVersion, t3CodeVersion)?.status,
80 - expected,
81 - `T3 Code ${t3CodeVersion} with Codex ${codexVersion}`,
82 - );
83 - }
84 - });
85 -
68 it("compares Cursor build dates without treating semver prereleases as stable", () => {
69 const cursor = ProviderDriverKind.make("cursor");
70 const cursorPolicy: ProviderCompatibilityPolicy = {
apps/server/src/provider/providerMaintenanceRunner.test.ts
+5 -1
@@ -216,7 +216,11 @@ const makeTestRunner = (
216 manifest: ModelManifest.ModelManifestData = {
217 version: 1,
218 currentModels: {},
219 - compatibility: [{ driver: CODEX_DRIVER, t3CodeRange: ">=0.0.42", ranges: [] }],
219 + compatibility: [CODEX_DRIVER, CURSOR_DRIVER, OPENCODE_DRIVER].map((driver) => ({
220 + driver,
221 + t3CodeRange: ">=0.0.42",
222 + ranges: [],
223 + })),
224 },
225 ) =>
226 Effect.service(ProviderMaintenanceRunner.ProviderMaintenanceRunner).pipe(
apps/web/src/components/chat/ProviderStatusBanner.test.ts
+54
@@ -56,6 +56,60 @@ describe("compatibility banners", () => {
56 ).toBeNull();
57 });
58
59 + it("shows downgrade guidance instead of a broken OpenCode inventory timeout", () => {
60 + const message = "This provider version is known to be incompatible. Use 1.14.19.";
61 + const broken: ServerProvider = {
62 + ...provider,
63 + driver: ProviderDriverKind.make("opencode"),
64 + version: "2.0.3",
65 + status: "error",
66 + auth: { status: "unknown" },
67 + message: "Failed to load OpenCode provider inventory: Timed out waiting for server start.",
68 + compatibilityAdvisory: {
69 + status: "broken",
70 + message,
71 + recommendedVersion: "1.14.19",
72 + recommendedRange: ">=1.14.19 <2.0.0",
73 + },
74 + };
75 + expect(shouldShowProviderStatusBanner(broken, null)).toBe(true);
76 + const timeoutOnly: ServerProvider = {
77 + ...broken,
78 + compatibilityAdvisory: {
79 + ...broken.compatibilityAdvisory!,
80 + status: "supported",
81 + message: null,
82 + },
83 + };
84 + expect(shouldShowProviderStatusBanner(broken, getProviderStatusBannerKey(timeoutOnly))).toBe(
85 + true,
86 + );
87 + expect(shouldShowProviderStatusBanner(broken, getProviderStatusBannerKey(broken))).toBe(false);
88 + expect(
89 + shouldShowProviderStatusBanner(
90 + {
91 + ...broken,
92 + compatibilityAdvisory: { ...broken.compatibilityAdvisory!, message: "Use 1.14.20." },
93 + },
94 + getProviderStatusBannerKey(broken),
95 + ),
96 + ).toBe(true);
97 + expect(getProviderStatusMessage(broken)).toBe(message);
98 + expect(
99 + getProviderStatusMessage({
100 + ...broken,
101 + compatibilityAdvisory: {
102 + ...broken.compatibilityAdvisory!,
103 + status: "supported",
104 + message: null,
105 + },
106 + }),
107 + ).toBe(broken.message);
108 + expect(getProviderStatusMessage({ ...broken, auth: { status: "unauthenticated" } })).toBe(
109 + broken.message,
110 + );
111 + });
112 +
113 it("keeps authentication failures ahead of compatibility warnings even without a probe message", () => {
114 const unauthenticated: ServerProvider = {
115 ...provider,
apps/web/src/components/chat/ProviderStatusBanner.tsx
+23 -9
@@ -9,19 +9,25 @@ import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
9 /** Unsupported and broken versions fail mid-turn, so they warn even when ready. */
10 function getIncompatibleVersion(status: ServerProvider) {
11 const compatibility = status.compatibilityAdvisory;
12 - return compatibility?.status === "unsupported" || compatibility?.status === "broken"
12 + if (status.status === "error" && status.auth.status === "unauthenticated") return null;
13 + return compatibility?.status === "broken" ||
14 + (status.status === "ready" && compatibility?.status === "unsupported")
15 ? compatibility
16 : null;
17 }
18
19 export function getProviderStatusBannerKey(status: ServerProvider | null): string | null {
20 if (!status || status.status === "disabled") return null;
19 - if (status.status === "ready") {
20 - const incompatible = getIncompatibleVersion(status);
21 - return incompatible
22 - ? [status.instanceId, incompatible.status, status.version ?? ""].join("\u0000")
23 - : null;
21 + const incompatible = getIncompatibleVersion(status);
22 + if (incompatible) {
23 + return [
24 + status.instanceId,
25 + incompatible.status,
26 + status.version ?? "",
27 + incompatible.message ?? "",
28 + ].join("\u0000");
29 }
30 + if (status.status === "ready") return null;
31 // Antigravity checks saved credentials when a session starts. Its local
32 // health check leaves auth unknown after a restart, which is not a failure.
33 if (
@@ -53,8 +59,15 @@ export function hasProviderSetup(status: ServerProvider): boolean {
59 );
60 }
61
56 -/** Keep the environment's error intact in both the banner and model picker. */
62 +/** Broken-version guidance takes precedence over startup failures it can cause. */
63 export function getProviderStatusMessage(status: ServerProvider): string {
64 + if (
65 + status.auth.status !== "unauthenticated" &&
66 + status.compatibilityAdvisory?.status === "broken" &&
67 + status.compatibilityAdvisory.message
68 + ) {
69 + return status.compatibilityAdvisory.message;
70 + }
71 if (status.message) return status.message;
72 const providerName = status.displayName?.trim() || formatProviderDriverKindLabel(status.driver);
73 if (!status.installed && hasProviderSetup(status)) {
@@ -90,14 +103,15 @@ export const ProviderStatusBanner = memo(function ProviderStatusBanner({
103
104 const providerName = status.displayName?.trim() || formatProviderDriverKindLabel(status.driver);
105 const isUnauthenticated = status.status === "error" && status.auth.status === "unauthenticated";
93 - const incompatible = status.status === "ready" ? getIncompatibleVersion(status) : null;
106 + const incompatible = getIncompatibleVersion(status);
107 const title = isUnauthenticated
108 ? `${providerName} is unauthenticated`
109 : incompatible
110 ? `${providerName} ${status.version ?? ""} is ${incompatible.status === "broken" ? "known to be broken" : "unsupported"}`
111 : `${providerName} provider status`;
112 const message = incompatible?.message ?? getProviderStatusMessage(status);
100 - const isWarning = status.status === "warning" || incompatible !== null;
113 + const isWarning =
114 + incompatible?.status !== "broken" && (status.status === "warning" || incompatible !== null);
115
116 return (
117 <div className="pointer-events-auto mx-auto w-fit max-w-[calc(100%-2rem)] pt-3">