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, 08:15 UTC
fix(web): configure reasoning for the fallback model (#27593)
Co-authored-by: maria-rcks <maria@kuuro.net>
BelKed committed
Nov 1, 2026 at 03:40 UTC
cb1de7ba2386575d1a1215ca2ca3e88c3f649cd5
1 file changed
+51
-28
apps/web/src/components/settings/ProjectDefaultsSettings.tsx
+51
-28
@@ -79,6 +79,7 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
79
const mixedModel = useScopedSettingsMixed(["defaultModelSelection"]);
80
const mixedFallback = useScopedSettingsMixed(["fallbackModelSelection"]);
81
const fallbackSelection = settings.fallbackModelSelection ?? selection;
82
+ const fallbackEntry = entries.find((entry) => entry.instanceId === fallbackSelection?.instanceId);
83
const fallbackModelOptions = getCustomModelOptionsByInstance(
84
settings,
85
providers,
@@ -241,34 +242,56 @@ export function ProjectDefaultsSettings({ category }: { category: ProjectSetting
242
}
243
control={
244
fallbackSelection ? (
244
- <ProviderModelPicker
245
- environmentId={representative?.environmentId ?? null}
246
- activeInstanceId={fallbackSelection.instanceId}
247
- model={fallbackSelection.model}
248
- lockedProvider={null}
249
- instanceEntries={entries}
250
- modelOptionsByInstance={fallbackModelOptions}
251
- triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
252
- triggerAriaLabel="Fallback model"
253
- {...(mixedFallback
254
- ? { triggerLabel: "Mixed" }
255
- : settings.fallbackModelSelection === null
256
- ? { triggerLabel: "None" }
257
- : {})}
258
- getModelDisabledReason={modelDisabledReason}
259
- onInstanceModelChange={(instanceId, model) => {
260
- const reason = modelDisabledReason(instanceId, model);
261
- if (reason) {
262
- toastManager.add({
263
- type: "error",
264
- title: "Fallback model not saved",
265
- description: reason,
266
- });
267
- return;
268
- }
269
- updateSettings({ fallbackModelSelection: createModelSelection(instanceId, model) });
270
- }}
271
- />
245
+ <div className="flex min-w-0 flex-wrap items-center justify-end gap-1.5">
246
+ <ProviderModelPicker
247
+ environmentId={representative?.environmentId ?? null}
248
+ activeInstanceId={fallbackSelection.instanceId}
249
+ model={fallbackSelection.model}
250
+ lockedProvider={null}
251
+ instanceEntries={entries}
252
+ modelOptionsByInstance={fallbackModelOptions}
253
+ triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
254
+ triggerAriaLabel="Fallback model"
255
+ {...(mixedFallback
256
+ ? { triggerLabel: "Mixed" }
257
+ : settings.fallbackModelSelection === null
258
+ ? { triggerLabel: "None" }
259
+ : {})}
260
+ getModelDisabledReason={modelDisabledReason}
261
+ onInstanceModelChange={(instanceId, model) => {
262
+ const reason = modelDisabledReason(instanceId, model);
263
+ if (reason) {
264
+ toastManager.add({
265
+ type: "error",
266
+ title: "Fallback model not saved",
267
+ description: reason,
268
+ });
269
+ return;
270
+ }
271
+ updateSettings({ fallbackModelSelection: createModelSelection(instanceId, model) });
272
+ }}
273
+ />
274
+ {settings.fallbackModelSelection !== null && fallbackEntry && !mixedFallback ? (
275
+ <TraitsPicker
276
+ provider={fallbackEntry.driverKind}
277
+ models={fallbackEntry.models}
278
+ model={fallbackSelection.model}
279
+ modelOptions={fallbackSelection.options ?? []}
280
+ allowPromptInjectedEffort={false}
281
+ planModeEnabled={settings.planModeEnabled}
282
+ triggerClassName={SETTINGS_PICKER_TRIGGER_CLASSNAME}
283
+ onModelOptionsChange={(options) =>
284
+ updateSettings({
285
+ fallbackModelSelection: createModelSelection(
286
+ fallbackSelection.instanceId,
287
+ fallbackSelection.model,
288
+ options,
289
+ ),
290
+ })
291
+ }
292
+ />
293
+ ) : null}
294
+ </div>
295
) : (
296
<span className="text-sm text-muted-foreground">No providers available</span>
297
)