From 563882f7092f6475b2dc8a741d5167a7f72c96da Mon Sep 17 00:00:00 2001 From: ayattara Date: Tue, 25 Aug 2026 09:51:49 +0000 Subject: [PATCH] fix(settings): require explicit inference profile capability --- .../settings/plugins/plugin-config-form.agent-profile.test.tsx | 1 + .../components/settings/utility-agent-profile-picker.test.ts | 2 ++ apps/web/components/settings/utility-agent-profile-picker.tsx | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/components/settings/plugins/plugin-config-form.agent-profile.test.tsx b/apps/web/components/settings/plugins/plugin-config-form.agent-profile.test.tsx index 6fc6635180..72fc10f35f 100644 --- a/apps/web/components/settings/plugins/plugin-config-form.agent-profile.test.tsx +++ b/apps/web/components/settings/plugins/plugin-config-form.agent-profile.test.tsx @@ -25,6 +25,7 @@ const profile = (overrides: Partial): AgentProfileOption => agent_name: "claude", cli_passthrough: false, enabled: true, + inference_capable: true, ...overrides, }); diff --git a/apps/web/components/settings/utility-agent-profile-picker.test.ts b/apps/web/components/settings/utility-agent-profile-picker.test.ts index 6aaa04a207..1f2f4a2544 100644 --- a/apps/web/components/settings/utility-agent-profile-picker.test.ts +++ b/apps/web/components/settings/utility-agent-profile-picker.test.ts @@ -9,6 +9,7 @@ const profile = (overrides: Partial = {}): AgentProfileOptio agent_name: "Mock", cli_passthrough: false, enabled: true, + inference_capable: true, ...overrides, }); @@ -20,6 +21,7 @@ describe("utilityProfileEligibility", () => { ["CLI passthrough profile", profile({ cli_passthrough: true }), false], ["workspace profile", profile({ workspace_id: "workspace-1" }), false], ["non-inference profile", profile({ inference_capable: false }), false], + ["profile with unknown inference support", profile({ inference_capable: undefined }), false], ])("returns %s = %s", (_label, candidate, expected) => { expect(utilityProfileEligibility(candidate)).toBe(expected); }); diff --git a/apps/web/components/settings/utility-agent-profile-picker.tsx b/apps/web/components/settings/utility-agent-profile-picker.tsx index 22481f4c58..de0467ed16 100644 --- a/apps/web/components/settings/utility-agent-profile-picker.tsx +++ b/apps/web/components/settings/utility-agent-profile-picker.tsx @@ -10,7 +10,7 @@ export const utilityProfileEligibility = ( includeWorkspaceProfiles = false, ) => profile.enabled !== false && - profile.inference_capable !== false && + profile.inference_capable === true && (dynamicRoutingEnabled || profile.kind !== "dynamic") && (includeWorkspaceProfiles || (!profile.cli_passthrough && !profile.workspace_id));