2121 ConversationInfo ,
2222 ConversationPage ,
2323 ConversationSortOrder ,
24- LaunchedProfile ,
24+ LaunchedAgentProfile ,
2525 StartConversationRequest ,
2626 StoredConversation ,
2727 UpdateConversationRequest ,
@@ -245,7 +245,7 @@ def _resolve_agent_from_profile(
245245 profile_id : "UUID" ,
246246 cipher : "Cipher | None" ,
247247 mcp_config : "Any" ,
248- ) -> "tuple[AgentBase, LaunchedProfile ]" :
248+ ) -> "tuple[AgentBase, LaunchedAgentProfile ]" :
249249 """Load and resolve an agent profile by id, returning the built agent + provenance.
250250
251251 Runs synchronously (call via ``asyncio.to_thread`` from async context).
@@ -290,7 +290,10 @@ def _resolve_agent_from_profile(
290290 raise ValueError (f"Profile '{ profile_name } ' failed to resolve: { exc } " ) from exc
291291
292292 agent = settings_config .create_agent ()
293- launched = LaunchedProfile (profile_id = profile .id , revision = profile .revision )
293+ launched = LaunchedAgentProfile (
294+ agent_profile_id = profile .id ,
295+ revision = profile .revision ,
296+ )
294297 return agent , launched
295298
296299
@@ -318,7 +321,7 @@ def _compose_conversation_info(
318321 # The ``acp_model`` fallback is gated on the agent NOT being a live,
319322 # initialized one. Once ``init_state`` has fired, ``current_model_id`` is the
320323 # authoritative resolved value — including ``None`` when an override couldn't
321- # be applied (unknown provider, or a resume whose ``set_session_model`` the
324+ # be applied (unknown provider, or a resume whose model-selection call the
322325 # server rejected) — so falling back to ``acp_model`` there would re-assert an
323326 # override the live session isn't actually running. The fallback is only for
324327 # *cold* reads (``init_state`` hasn't fired, PrivateAttrs still empty), where
@@ -363,7 +366,7 @@ def _compose_conversation_info(
363366 available_models = available_models ,
364367 supports_runtime_model_switch = supports_runtime_model_switch ,
365368 client_tools = stored .client_tools ,
366- launched_profile = stored .launched_profile ,
369+ launched_agent_profile = stored .launched_agent_profile ,
367370 )
368371
369372
@@ -670,7 +673,7 @@ async def _start_conversation(
670673 # Profile resolution must happen before _prepare_request_workspace (which
671674 # asserts request.agent is not None) and before model_dump so the resolved
672675 # agent is captured in request_data.
673- launched_profile : LaunchedProfile | None = None
676+ launched_agent_profile : LaunchedAgentProfile | None = None
674677 if request .agent_profile_id is not None :
675678 # get_settings_store() is safe here: get_instance() initialises the
676679 # singleton with the server cipher before any conversation can start.
@@ -681,7 +684,7 @@ async def _start_conversation(
681684
682685 settings = get_settings_store ().load () or PersistedSettings ()
683686 mcp_config = settings .agent_settings .mcp_config
684- resolved_agent , launched_profile = await asyncio .to_thread (
687+ resolved_agent , launched_agent_profile = await asyncio .to_thread (
685688 _resolve_agent_from_profile ,
686689 request .agent_profile_id ,
687690 self .cipher ,
@@ -751,7 +754,7 @@ async def _start_conversation(
751754 # serialize to plain strings. Pass expose_secrets=True so StaticSecret values
752755 # are preserved through the round-trip; the dict is only used in-process to
753756 # construct StoredConversation, not sent over the network.
754- # agent_profile_id is excluded: it was resolved into `launched_profile `
757+ # agent_profile_id is excluded: it was resolved into `launched_agent_profile `
755758 # above and must not re-trigger the mutual-exclusivity validator.
756759 request_data = request .model_dump (
757760 mode = "json" ,
@@ -772,9 +775,9 @@ async def _start_conversation(
772775 {
773776 "id" : conversation_id ,
774777 ** request_data ,
775- "launched_profile " : (
776- launched_profile .model_dump (mode = "json" )
777- if launched_profile is not None
778+ "launched_agent_profile " : (
779+ launched_agent_profile .model_dump (mode = "json" )
780+ if launched_agent_profile is not None
778781 else None
779782 ),
780783 },
@@ -783,7 +786,7 @@ async def _start_conversation(
783786 else :
784787 stored = StoredConversation (
785788 id = conversation_id ,
786- launched_profile = launched_profile ,
789+ launched_agent_profile = launched_agent_profile ,
787790 ** request_data ,
788791 )
789792 event_service = await self ._start_event_service (stored )
0 commit comments