Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
38fc87a
fix(app-server): honour a profile's tool selection on a cloud launch
simonrosenberg Sep 21, 2026
5365e5f
style: sort the new imports
simonrosenberg Sep 21, 2026
5c41024
fix(agent-profiles): resolve cloud profiles with the browser available
simonrosenberg Sep 28, 2026
2cce849
fix(app-conversation): keep cloud launches within the selected tools
simonrosenberg Sep 28, 2026
2cfbb3f
fix(app-conversation): keep cloud launches correct after the tool-cat…
Sep 28, 2026
712ced7
Merge remote-tracking branch 'origin/main' into honour-profile-tools-…
Sep 28, 2026
c21da84
Merge remote-tracking branch 'origin/main' into honour-profile-tools-…
Sep 28, 2026
7e5aead
Address review: migrate empty profile tools, drop ineffective sub-age…
Sep 28, 2026
4dee4af
Serve /api/tools/catalog so the cloud profile editor gets the tool pi…
Sep 28, 2026
18be46c
Merge origin/main into honour-profile-tools-on-cloud-launch
Sep 28, 2026
851f786
Launch profile tools on the pinned SDK and follow main's migration head
Sep 28, 2026
4338307
Fold legacy tool switches into tools when saving a profile
Sep 28, 2026
840041e
Drop pre-catalog SDK compat and the global tool switches
Sep 29, 2026
821bcb7
Resolve the cloud launch's tools with the SDK's launch_tool_specs
Sep 29, 2026
7be4dbd
Keep switch_llm on default-tools PLAN launches; limit migration 173 t…
simonrosenberg Sep 29, 2026
0bc7459
Honour settings tools on non-profile cloud launches; scope forwarded …
simonrosenberg Sep 29, 2026
f7d2c90
Keep unreadable agent profiles when rewriting the org envelope
simonrosenberg Sep 29, 2026
67806b6
Drop the stale drop-on-load note from the profile transaction docstring
simonrosenberg Sep 29, 2026
8936dfa
Forward every built-in sub-agent; sub-agent scoping moves to follow-u…
simonrosenberg Sep 30, 2026
8f8e866
Merge remote-tracking branch 'origin/main' into honour-profile-tools-…
simonrosenberg Sep 30, 2026
77e9d3f
Fix xhigh review findings on stored tool switches and hidden profiles
simonrosenberg Sep 30, 2026
c55c304
Drop a test comment naming the removed profile validator
simonrosenberg Sep 30, 2026
c8df3db
Merge remote-tracking branch 'origin/main' into honour-profile-tools-…
simonrosenberg Sep 30, 2026
1406407
Merge remote-tracking branch 'origin/main' into honour-profile-tools-…
simonrosenberg Oct 2, 2026
7e4a4c2
fix(migrations): renumber the empty-tools migration to 175
simonrosenberg Oct 2, 2026
12298dd
fix(settings): don't re-fold the org's tools under a stale member dif…
simonrosenberg Oct 2, 2026
9d785e7
Merge remote-tracking branch 'origin/main' into honour-profile-tools-…
simonrosenberg Oct 2, 2026
7103618
test(settings): stop expecting an ACP save to write the member's llm
simonrosenberg Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions frontend/__tests__/routes/agent-settings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ describe("AgentSettingsScreen — minimal generic ACP UX", () => {
agent_settings: {
...MOCK_DEFAULT_USER_SETTINGS.agent_settings,
agent_kind: "openhands",
enable_sub_agents: false,
tool_concurrency_limit: toolConcurrencyLimit,
},
});
Expand Down Expand Up @@ -346,7 +345,6 @@ describe("AgentSettingsScreen — Agent Context / memory toggle", () => {
agent_settings: {
...MOCK_DEFAULT_USER_SETTINGS.agent_settings,
agent_kind: "openhands",
enable_sub_agents: false,
},
});

Expand Down
2 changes: 0 additions & 2 deletions frontend/src/i18n/declaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ export enum I18nKey {
SETTINGS$SDK_SCHEMA_UNAVAILABLE = "SETTINGS$SDK_SCHEMA_UNAVAILABLE",
SCHEMA$AGENT$DESCRIPTION = "SCHEMA$AGENT$DESCRIPTION",
SCHEMA$AGENT$LABEL = "SCHEMA$AGENT$LABEL",
SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION = "SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION",
SCHEMA$ENABLE_SUB_AGENTS$LABEL = "SCHEMA$ENABLE_SUB_AGENTS$LABEL",
SCHEMA$CONDENSER$ENABLED$DESCRIPTION = "SCHEMA$CONDENSER$ENABLED$DESCRIPTION",
SCHEMA$CONDENSER$ENABLED$LABEL = "SCHEMA$CONDENSER$ENABLED$LABEL",
SCHEMA$CONDENSER$MAX_SIZE$DESCRIPTION = "SCHEMA$CONDENSER$MAX_SIZE$DESCRIPTION",
Expand Down
34 changes: 0 additions & 34 deletions frontend/src/i18n/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2294,40 +2294,6 @@
"uk": "Агент",
"ca": "Agent"
},
"SCHEMA$ENABLE_SUB_AGENTS$DESCRIPTION": {
"en": "Enable sub-agent delegation via TaskToolSet.",
"ja": "TaskToolSet を介したサブエージェントへの委任を有効にします。",
"zh-CN": "通过 TaskToolSet 启用子智能体委派。",
"zh-TW": "透過 TaskToolSet 啟用子智能體委派。",
"ko-KR": "TaskToolSet을 통한 하위 에이전트 위임을 활성화합니다.",
"no": "Aktiver delegering til underagenter via TaskToolSet.",
"it": "Abilita la delega ai sottoagenti tramite TaskToolSet.",
"pt": "Ative a delegação para subagentes via TaskToolSet.",
"es": "Habilita la delegación a subagentes mediante TaskToolSet.",
"ar": "مكّن تفويض المهام إلى الوكلاء الفرعيين عبر TaskToolSet.",
"fr": "Activez la délégation aux sous-agents via TaskToolSet.",
"tr": "TaskToolSet aracılığıyla alt ajanlara yetki devrini etkinleştirin.",
"de": "Aktivieren Sie die Delegierung an Sub-Agenten über TaskToolSet.",
"uk": "Увімкніть делегування субагентам через TaskToolSet.",
"ca": "Activa la delegació a subagents mitjançant TaskToolSet."
},
"SCHEMA$ENABLE_SUB_AGENTS$LABEL": {
"en": "Enable sub-agents",
"ja": "サブエージェントを有効にする",
"zh-CN": "启用子智能体",
"zh-TW": "啟用子智能體",
"ko-KR": "하위 에이전트 활성화",
"no": "Aktiver underagenter",
"it": "Abilita sottoagenti",
"pt": "Ativar subagentes",
"es": "Habilitar subagentes",
"ar": "تمكين الوكلاء الفرعيين",
"fr": "Activer les sous-agents",
"tr": "Alt ajanları etkinleştir",
"de": "Sub-Agenten aktivieren",
"uk": "Увімкнути субагентів",
"ca": "Activa subagents"
},
"SCHEMA$CONDENSER$ENABLED$DESCRIPTION": {
"en": "Enable the LLM summarizing condenser.",
"ja": "LLM要約コンデンサーを有効にします。",
Expand Down
16 changes: 0 additions & 16 deletions frontend/src/mocks/settings-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,6 @@ const MOCK_AGENT_SETTINGS_SCHEMA: NonNullable<
key: "general",
label: "General",
fields: [
{
key: "enable_sub_agents",
label: "Enable sub-agents",
description:
"Allow the agent to delegate work to specialized built-in sub-agents.",
section: "general",
section_label: "General",
value_type: "boolean",
default: false,
choices: [],
depends_on: [],
prominence: "major",
secret: false,
required: false,
},
{
key: "tool_concurrency_limit",
label: "Parallel tool calls",
Expand Down Expand Up @@ -438,7 +423,6 @@ export const MOCK_DEFAULT_USER_SETTINGS: Settings = {
api_key: null,
model: DEFAULT_MODEL,
},
enable_sub_agents: false,
tool_concurrency_limit: 1,
mcp_config: MOCK_MCP_CONFIG,
},
Expand Down
87 changes: 3 additions & 84 deletions frontend/src/routes/agent-settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ import { useAgentSettingsSchema } from "#/hooks/query/use-agent-settings-schema"
import { useConfig } from "#/hooks/query/use-config";
import { useSettings } from "#/hooks/query/use-settings";
import { I18nKey } from "#/i18n/declaration";
import { SettingsFieldSchema, SettingsValue } from "#/types/settings";
import { SettingsValue } from "#/types/settings";
import { Typography } from "#/ui/typography";
import {
displayErrorToast,
displaySuccessToast,
} from "#/utils/custom-toast-handlers";
import { createPermissionGuard } from "#/utils/org/permission-guard";
import { retrieveAxiosErrorMessage } from "#/utils/retrieve-axios-error-message";
import {
resolveSchemaFieldDescription,
resolveSchemaFieldLabel,
} from "#/utils/sdk-settings-field-metadata";
import {
coerceFieldValue,
getAgentSettingValue,
Expand All @@ -40,26 +36,11 @@ import {
import { cn } from "#/utils/utils";
import type { ACPProviderConfig } from "#/api/option-service/option.types";

const ENABLE_SUB_AGENTS_FIELD_KEY = "enable_sub_agents";
const TOOL_CONCURRENCY_FIELD_KEY = "tool_concurrency_limit";
const CUSTOM_PRESET = "custom";
const CUSTOM_MODEL_KEY = "__custom__";
const EMPTY_ACP_PROVIDERS: ACPProviderConfig[] = [];

function findEnableSubAgentsField(
fields: SettingsFieldSchema[] | undefined,
): SettingsFieldSchema | undefined {
return fields?.find((field) => field.key === ENABLE_SUB_AGENTS_FIELD_KEY);
}

function getEnableSubAgentsValue(
settingsValue: unknown,
field: SettingsFieldSchema | undefined,
) {
if (typeof settingsValue === "boolean") return settingsValue;
return field?.default === true;
}

function toStringArray(value: unknown): string[] {
return Array.isArray(value)
? value.filter((v): v is string => typeof v === "string")
Expand Down Expand Up @@ -102,26 +83,10 @@ export default function AgentSettingsScreen() {
const isAcpEnabled = !!config?.feature_flags?.enable_acp;
const acpProviders = config?.acp_providers ?? EMPTY_ACP_PROVIDERS;

// ── Sub-agents (OpenHands mode) ──────────────────────────────────────────
const fields = useMemo(
() => schema?.sections.flatMap((section) => section.fields),
[schema],
);
const subAgentsField = findEnableSubAgentsField(fields);
const initialSubAgentsEnabled = useMemo(
() =>
getEnableSubAgentsValue(
settings?.agent_settings?.[ENABLE_SUB_AGENTS_FIELD_KEY],
subAgentsField,
),
[subAgentsField, settings?.agent_settings],
);
const [isSubAgentsEnabled, setIsSubAgentsEnabled] = useState(
initialSubAgentsEnabled,
);
useEffect(() => {
setIsSubAgentsEnabled(initialSubAgentsEnabled);
}, [initialSubAgentsEnabled]);

// ── Parallel tool calls (OpenHands mode) ─────────────────────────────────
// Surfaced only when the backend schema exposes the field, so older
Expand Down Expand Up @@ -220,12 +185,10 @@ export default function AgentSettingsScreen() {
selectedProvider,
);

const subAgentsDirty = isSubAgentsEnabled !== initialSubAgentsEnabled;
const toolConcurrencyDirty = toolConcurrency !== initialToolConcurrency;
const memoryDirty = isMemoryEnabled !== initialMemoryEnabled;
const settingsDirty =
isDirty ||
(!isAcp && (subAgentsDirty || toolConcurrencyDirty || memoryDirty));
isDirty || (!isAcp && (toolConcurrencyDirty || memoryDirty));
const credentialsDirty = isAcp && credentialForm.isDirty;
const canSave = settingsDirty || credentialsDirty;
const isSavingAny = isPending || credentialForm.isSaving;
Expand Down Expand Up @@ -259,8 +222,7 @@ export default function AgentSettingsScreen() {
// Agent-kind flip: backend resets to defaults, send kind alone.
agentSettingsDiff = { agent_kind: "openhands" };
} else {
// Sub-agents toggle and/or parallel tool calls.
agentSettingsDiff = { enable_sub_agents: isSubAgentsEnabled };
agentSettingsDiff = {};

if (toolConcurrencyField) {
let coerced: SettingsValue;
Expand Down Expand Up @@ -342,49 +304,6 @@ export default function AgentSettingsScreen() {
</section>
)}

{/* OpenHands: sub-agents toggle */}
{!isAcp && (
<section className="grid gap-4 xl:grid-cols-2">
{subAgentsField ? (
<div className={formControlSwitchFieldClassName}>
<SettingsSwitch
testId="agent-settings-enable-sub-agents"
isToggled={isSubAgentsEnabled}
onToggle={setIsSubAgentsEnabled}
>
{resolveSchemaFieldLabel(
t,
subAgentsField.key,
subAgentsField.label,
)}
</SettingsSwitch>
{resolveSchemaFieldDescription(
t,
subAgentsField.key,
subAgentsField.description,
) ? (
<Typography.Paragraph
className={cn(
formControlSwitchDescriptionClassName,
"text-tertiary-alt text-xs leading-5",
)}
>
{resolveSchemaFieldDescription(
t,
subAgentsField.key,
subAgentsField.description,
)}
</Typography.Paragraph>
) : null}
</div>
) : (
<Typography.Paragraph className="text-tertiary-alt">
{t(I18nKey.SETTINGS$SDK_SCHEMA_UNAVAILABLE)}
</Typography.Paragraph>
)}
</section>
)}

{/* OpenHands: parallel tool calls — only when the schema exposes it */}
{!isAcp && toolConcurrencyField ? (
<section className="grid gap-4 xl:grid-cols-2">
Expand Down
1 change: 0 additions & 1 deletion frontend/src/services/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export const DEFAULT_SETTINGS: Settings = {
critic_enabled: false,
enable_iterative_refinement: false,
},
enable_sub_agents: false,
mcp_config: {
sse_servers: [],
stdio_servers: [],
Expand Down
76 changes: 76 additions & 0 deletions migrations/versions/175_unset_empty_agent_profile_tools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
"""Store agent profiles' empty ``tools`` as unset.

``[]`` selects no tools while ``null`` selects the standard set; existing
``[]`` rows were saved meaning the standard set.

Revision ID: 175
Revises: 174
Create Date: 2026-09-30 00:00:00.000000
"""

import json
import logging
from typing import Any, Sequence

import sqlalchemy as sa
from alembic import op

revision: str = '175'
down_revision: str | None = '174'
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None

logger = logging.getLogger(__name__)


def _schema_version(profile: dict[str, Any]) -> int:
version = profile.get('schema_version')
if isinstance(version, int) and not isinstance(version, bool):
return version
return 1


def _unset_empty_tools(agent_profiles: dict[str, Any]) -> bool:
changed = False
for profile in (agent_profiles.get('profiles') or {}).values():
if (
isinstance(profile, dict)
and profile.get('agent_kind', 'openhands') == 'openhands'
and profile.get('tools') == []
and _schema_version(profile) < 3
):
profile['tools'] = None
changed = True
return changed


def upgrade() -> None:
from storage.encrypt_utils import decrypt_value, encrypt_value

bind = op.get_bind()
rows = bind.execute(
sa.text('SELECT id, agent_profiles FROM org WHERE agent_profiles IS NOT NULL')
).mappings()
for row in list(rows):
try:
agent_profiles = json.loads(decrypt_value(row['agent_profiles']))
if not isinstance(agent_profiles, dict) or not _unset_empty_tools(
agent_profiles
):
continue
except Exception:
logger.warning(
'Skipping org %s: unreadable agent_profiles', row['id'], exc_info=True
)
continue
bind.execute(
sa.text('UPDATE org SET agent_profiles = :agent_profiles WHERE id = :id'),
{
'agent_profiles': encrypt_value(json.dumps(agent_profiles)),
'id': row['id'],
},
)


def downgrade() -> None:
pass
Loading
Loading