Repository navigation
feat(agent-profiles): add personal-scoped Agent Profiles to the API and launch lookup (OHE-3746) - #753
Merged
Conversation
Merged
2 of 6 tasks
Contributor
|
|
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…nd launch lookup (OHE-3746)
Each org member gets a personal AgentProfiles collection in a new
org_member.agent_profiles column (migration 198), the same envelope as
org.agent_profiles.
- Name-keyed /api/agent-profiles endpoints take scope=personal|org; the
default stays org, so existing callers are unchanged. Personal writes
need only membership and lock the member row. GET /{name} and
/{name}/materialize without a scope try the org collection first and
fall back to the member's own.
- GET / returns both collections, each summary tagged with its scope;
/{id}/activate accepts an id from either and locks the owning row. A
personal name already owned by the org collection is refused (409).
- Conversation start resolves the active id in the personal collection
first, then the org's.
- Renaming an org LLM profile cascades into members' personal profiles;
deleting one is refused while members' personal profiles reference it.
hieptl
force-pushed
the
hieptl/ohe-3456-agent-profiles-api
branch
from
October 24, 2026 08:38
adbfb6c to
0b31e70
Compare
hieptl
marked this pull request as ready for review
October 26, 2026 15:52
2 of 6 tasks
4 of 6 tasks
hieptl
added a commit
that referenced
this pull request
Oct 27, 2026
Resolve the conflicts with main after #753, #1007 and #754 were squash-merged: - routes.ts, routes/settings.tsx: keep main's text and re-add the /settings/agents route and SAAS_ONLY_PATHS entry. - i18n/translation.json: main's file plus the 32 keys only this branch adds; declaration.ts regenerated with make-i18n. - constants/settings-nav.tsx: drop the Agent Context item the auto-merge duplicated, keeping main's copy after the new Agent Profiles item.
hieptl
added a commit
that referenced
this pull request
Oct 27, 2026
…launches-resolve-secret_refs Resolve the conflicts after #753 was squash-merged into main: - storage/agent_profile_resolution.py, storage/saas_settings_store.py: keep this branch's locate_agent_profile and its use in the resolver; main's side was #753's text that this branch rewrote. - live_status_app_conversation_service.py: both launch paths take their custom secrets from this branch's _launch_custom_secrets and the provider tokens from main's _get_provider_token_secrets helper.
hieptl
added a commit
that referenced
this pull request
Oct 27, 2026
…storage-api-and Resolves the conflicts with the merged Agent Profiles work (#753, #754, #755, #763, #1007, #1010, #1011) by keeping both sides: both feature flags and their nav-hiding rules, both LLM-profile delete guards and rename cascades in org_profiles, and the Model Router launch hydration after main's SDK-based Agent Profile resolution in saas_settings_store. The user-menu test keeps the isSettingsPageHidden filter, which covers main's hard-coded agent-page set as well as the Model Router page. Semantic follow-ups: re-add the resolve_profile_llm import main dropped from saas_settings_store (the router hydration still uses it), and renumber the Model Router migration from 199 to 201 chaining off main's 200 (main now holds 199 and 200), and move the alembic head pinned by main's agent-profile upgrade test from 200 to 201 accordingly.
Contributor
|
🚀 Released in 1.81.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HUMAN:
AGENT:
Why
Agent Profiles exist on the cloud backend only as an org-owned collection that admins manage (
EDIT_ORG_SETTINGS); a member can activate one of the org's profiles and nothing else. OHE-3456 asks for personal, user-scoped profiles: a member defines how their own agent runs, against their own MCP servers and secrets. This is the API half; the settings pages follow in #754 and #755.Summary
org_member.agent_profilescolumn (migration 198), the sameAgentProfilesenvelope asorg.agent_profiles. The existing per-member active pointer may now reference a personal or an org profile id./api/agent-profilesis scope-aware. Name-keyed endpoints takescope=personal|org; the default staysorg, so every existing caller is unchanged. Personal writes require only membership and lock the member row;GET /returns both collections with each summary tagged byscope;/{id}/activateaccepts an id from either and locks the row that owns it.GET /{name}and/{name}/materializewithout a scope look in the org collection first and fall back to the member's own. A personal name the org collection already owns is refused with 409.Issue Number
OHE-3746, part of OHE-3456.
How to Test
From the repo root:
Both pass locally (177 tests). Migration 198 round-trips
upgrade head->downgrade 197->upgrade headon the Postgres testcontainer.Manually, as a member of an org with a saved LLM profile:
POST /api/agent-profiles/mine?scope=personalwith{"llm_profile_ref": "<profile>"}-> 201. The same call withoutscope-> 403, as before.GET /api/agent-profileslists the personal profile with"scope": "personal"next to any org profiles tagged"org";GET /api/agent-profiles/mine(no scope) returns it.POST /api/agent-profiles/<id>/activatewith the personal id -> 200. Start a conversation and confirm itsagentprofileidtag is that id.DELETE /api/agent-profiles/mine?scope=personal-> 200 and the member's pointer is cleared; org profiles are untouched.Video/Screenshots
API-only change; no UI in this PR.
Type
Notes
tools,secret_refsandsystem_message_suffixis not in this PR; fix(agent-profiles): align Enterprise launches with the SDK #763 makes the resolved profile authoritative at launch. Whichever lands second re-applies the small two-collection lookup in_resolve_active_agent_profile.Enterprise server image for this PR: