Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): model settings show "No reasoning" instead of labeling every model #27891

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/27891/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 1 changed file with 27 additions and 12 deletions.

x
0 of 1 viewed, 1 left
27 additions and 12 deletionsapps/web/src/components/settings/ProviderModelsSection.tsxModified
View file
@@ -5,6 +5,7 @@
type ProviderInstanceId,
type ServerProviderModel,
} from "@t3tools/contracts";
+import { REASONING_SELECT_DESCRIPTOR_IDS } from "@t3tools/client-runtime/model-traits";
import { type CustomModelDefinition, normalizeCustomModelSlug } from "@t3tools/shared/model";
​
import { useStableCallback } from "../../hooks/useStableCallback";
@@ -27,7 +28,21 @@
​
const FILTER_THRESHOLD = 8;
​
-function describeModelCapabilities(model: ServerProviderModel): string[] {
+const PROVIDER_ALIAS_SLUGS = new Set(["default", "auto"]);
+​
+function hasReasoningControl(model: ServerProviderModel): boolean {
+ return (model.capabilities?.optionDescriptors ?? []).some((descriptor) =>
+ REASONING_SELECT_DESCRIPTOR_IDS.has(descriptor.id),
+ );
+}
+​
+// Reasoning is the norm, so only its absence is labeled, and only when other models have it.
+// Custom and null capabilities are fallbacks or user-written, not discovered, so they prove nothing.
+// Alias slugs ("default", Cursor's "auto") defer to the provider's own model choice, so reasoning is unknown.
+function describeModelCapabilities(
+ model: ServerProviderModel,
+ flagMissingReasoning: boolean,
+): string[] {
const descriptors = model.capabilities?.optionDescriptors ?? [];