-
Notifications
You must be signed in to change notification settings - Fork 190
Description
Summary
PR #2465 introduced _ConversationInfoBase plus separate ConversationInfo and ACPConversationInfo response DTOs to keep /api/conversations pinned to the legacy Agent contract while exposing ACP-capable schemas under /api/acp/conversations.
That shape is safe, but it duplicates most of ConversationState and creates a maintenance risk: future fields added to ConversationState may need to be mirrored manually into the response DTOs.
Goal
Evaluate whether we can simplify the response models without changing the OpenAPI or runtime serialization behavior that PR #2465 was protecting.
Specifically, test whether this style is equivalent:
class ConversationInfo(ConversationState):
agent: Agent
title: str | None = None
metrics: MetricsSnapshot | None = None
created_at: datetime
updated_at: datetime
class ACPConversationInfo(ConversationState):
agent: ACPEnabledAgent
title: str | None = None
metrics: MetricsSnapshot | None = None
created_at: datetime
updated_at: datetimeAcceptance criteria
- Verify whether subclassing
ConversationStatepreserves the exact OpenAPI split:/api/conversationsstays Agent-only/api/acp/conversationsstays ACP-capable
- Verify serialization still behaves correctly for nested types like secrets and agent payloads
- If equivalent, replace
_ConversationInfoBasewith the simpler inheritance model - If not equivalent, keep the current structure and add a regression test that catches DTO drift against
ConversationState
Notes
This is intentionally a follow-up and not something to fold back into PR #2465 unless the schema equivalence is trivial and fully verified.