@devries-cameron20 / t3code-1 / commits / 4d5bf2d557
Fork 0

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

fix(opencode): label xhigh reasoning Extra High (#39451)

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

Daniel committed Nov 19, 2026 at 18:07 UTC 4d5bf2d5579f10a521e0ab4899fcef96de5e4b41
2 files changed +22 -8
packages/provider-opencode/src/server/status.test.ts
+12 -2
@@ -683,6 +683,10 @@ it.layer(layerTest)("checkOpenCodeProviderStatus", (it) => {
683 variantDescriptor.options.find((option) => option.isDefault === true)?.id,
684 "medium",
685 );
686 + NodeAssert.equal(
687 + variantDescriptor.options.find((option) => option.id === "xhigh")?.label,
688 + "Extra High",
689 + );
690 const agentDescriptor = model.capabilities?.optionDescriptors?.find(
691 (descriptor) => descriptor.id === "agent" && descriptor.type === "select",
692 );
@@ -853,7 +857,7 @@ it.layer(layerTest)("checkOpenCodeProviderStatus", (it) => {
857 providerID: "opencode",
858 id: "space-bunny-free",
859 name: "Space Bunny Free",
856 - variants: [{ id: "low" }, { id: "medium" }, { id: "high" }],
860 + variants: [{ id: "low" }, { id: "medium" }, { id: "high" }, { id: "xhigh" }],
861 },
862 {
863 providerID: "opencode-go",
@@ -886,7 +890,13 @@ it.layer(layerTest)("checkOpenCodeProviderStatus", (it) => {
890 ?.capabilities?.optionDescriptors?.[0];
891 NodeAssert.deepEqual(
892 variant?.type === "select" ? variant.options.map((option) => option.id) : [],
889 - ["low", "medium", "high"],
893 + ["low", "medium", "high", "xhigh"],
894 + );
895 + NodeAssert.equal(
896 + variant?.type === "select"
897 + ? variant.options.find((option) => option.id === "xhigh")?.label
898 + : undefined,
899 + "Extra High",
900 );
901 const goVariant = snapshot.models.find(
902 (model) => model.slug === "opencode-go/deepseek-v4.1-flash",
packages/provider-opencode/src/server/status.ts
+10 -6
@@ -190,6 +190,10 @@ function titleCaseSlug(value: string): string {
190 return segments.join(" ");
191 }
192
193 +function reasoningVariantLabel(value: string): string {
194 + return value === "xhigh" ? "Extra High" : titleCaseSlug(value);
195 +}
196 +
197 function inferDefaultVariant(
198 providerID: string,
199 variants: ReadonlyArray<string>,
@@ -244,11 +248,11 @@ function openCodeCapabilitiesForModel(input: {
248 }): ModelCapabilities {
249 const variantValues = Object.keys(input.model.variants ?? {});
250 const defaultVariant = inferDefaultVariant(input.providerID, variantValues);
247 - const variantOptions = variantValues.map((value) =>
248 - defaultVariant === value
249 - ? { id: value, label: titleCaseSlug(value), isDefault: true as const }
250 - : { id: value, label: titleCaseSlug(value) },
251 - );
251 + const variantOptions = variantValues.map((id) => ({
252 + id,
253 + label: reasoningVariantLabel(id),
254 + ...(id === defaultVariant ? { isDefault: true as const } : {}),
255 + }));
256 const primaryAgents = input.agents.filter(
257 (agent) => !agent.hidden && (agent.mode === "primary" || agent.mode === "all"),
258 );
@@ -684,7 +688,7 @@ function openCode2ModelCapabilities(model: OpenCode2Model): ModelCapabilities {
688 type: "select",
689 options: variants.map((id) => ({
690 id,
687 - label: titleCaseSlug(id),
691 + label: reasoningVariantLabel(id),
692 ...(id === defaultVariant ? { isDefault: true } : {}),
693 })),
694 ...(defaultVariant === undefined ? {} : { currentValue: defaultVariant }),