Why
useForHarness decides whether an AI integration may drive an agent harness conversation. The whole path exists except the one control that sets it:
- the flag is in the config schema for all five AI variants, defaulting to
false (apps/server/src/api/v1/integrations/schemas.ts:180,188,196,204,217)
- the gate reads it (
apps/ai-gateway/src/api/v1/harness-conversations/send-message/service.ts:26)
- the filtered list endpoint exists:
GET /api/v1/integrations/:projectId/list-basic?useForHarness=true (get-basic-list)
- the portal already calls that endpoint with the filter (
apps/portal/src/services/integrations.ts:25, query/integrationsQuery.ts:21)
Nothing can set it to true. Two comments in the codebase already say so:
schemas.ts:174 - TODO(ui): build a toggle in the AI integration form to flip useForHarness.
send-message/service.ts:18 - ...and there is no UI yet to flip useForHarness.
Result: the harness falls back to the project's configured default agent, and a user cannot opt any other AI integration into the pool.
What
Add a useForHarness checkbox to the AI connector form in the portal: apps/portal/src/components/integrations/connectors/AiForm.tsx.
- AI group only. Database, KV, and observability configs have no such field and must not grow one.
- Applies to every AI variant the form serves: OpenAI, Anthropic, Gemini, Mistral, and OpenAI-Compatible (
showBaseUrl).
- Defaults to unchecked - the schema default is
false and nothing should become harness-eligible implicitly.
- Reads the current value on edit and persists it on create and update, like the other config fields via
setField.
- Use
Checkbox from @fluxify/components, not a raw HeroUI checkbox (see AGENT.md - the shared one is theme-aware and self-contained).
- Give it a short description saying what it does: this integration can be selected to run agent harness conversations.
Remove the TODO(ui) comment at schemas.ts:174 and correct the stale "there is no UI yet" sentence in send-message/service.ts:18 once it ships.
Out of scope
Any change to how the harness picks a model when several integrations are eligible. This issue only exposes the flag.
Done when
- An AI integration can be created and edited with
useForHarness on or off from apps/portal.
- The value round-trips: saved, reloaded on edit, and reflected in
list-basic?useForHarness=true.
- A newly created AI integration is not harness-eligible unless the box was ticked.
- Non-AI integration forms are unchanged.
bun run --cwd apps/portal lint passes.
Why
useForHarnessdecides whether an AI integration may drive an agent harness conversation. The whole path exists except the one control that sets it:false(apps/server/src/api/v1/integrations/schemas.ts:180,188,196,204,217)apps/ai-gateway/src/api/v1/harness-conversations/send-message/service.ts:26)GET /api/v1/integrations/:projectId/list-basic?useForHarness=true(get-basic-list)apps/portal/src/services/integrations.ts:25,query/integrationsQuery.ts:21)Nothing can set it to
true. Two comments in the codebase already say so:schemas.ts:174-TODO(ui): build a toggle in the AI integration form to flip useForHarness.send-message/service.ts:18-...and there is no UI yet to flip useForHarness.Result: the harness falls back to the project's configured default agent, and a user cannot opt any other AI integration into the pool.
What
Add a
useForHarnesscheckbox to the AI connector form in the portal:apps/portal/src/components/integrations/connectors/AiForm.tsx.showBaseUrl).falseand nothing should become harness-eligible implicitly.setField.Checkboxfrom@fluxify/components, not a raw HeroUI checkbox (see AGENT.md - the shared one is theme-aware and self-contained).Remove the
TODO(ui)comment atschemas.ts:174and correct the stale "there is no UI yet" sentence insend-message/service.ts:18once it ships.Out of scope
Any change to how the harness picks a model when several integrations are eligible. This issue only exposes the flag.
Done when
useForHarnesson or off fromapps/portal.list-basic?useForHarness=true.bun run --cwd apps/portal lintpasses.