fix(core): patch bug w/ sleeptime agents and client-side tool executions [LET-6081] (#6001)
* fix(core): patch bug w/ sleeptime agents and client-side tool executions * fix: add groupid to approvalcreate * chore: just stage-api && just publish-api
This commit is contained in:
committed by
Caren Thomas
parent
849d0dc64a
commit
4b371dd6fb
@@ -19233,6 +19233,18 @@
|
||||
"title": "Reason",
|
||||
"description": "An optional explanation for the provided approval status",
|
||||
"deprecated": true
|
||||
},
|
||||
"group_id": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Group Id",
|
||||
"description": "The multi-agent group that the message was sent in"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
|
||||
@@ -134,6 +134,7 @@ class ApprovalCreate(MessageCreateBase):
|
||||
approve: Optional[bool] = Field(None, description="Whether the tool has been approved", deprecated=True)
|
||||
approval_request_id: Optional[str] = Field(None, description="The message ID of the approval request", deprecated=True)
|
||||
reason: Optional[str] = Field(None, description="An optional explanation for the provided approval status", deprecated=True)
|
||||
group_id: Optional[str] = Field(default=None, description="The multi-agent group that the message was sent in")
|
||||
|
||||
@model_validator(mode="after")
|
||||
def migrate_deprecated_fields(self):
|
||||
|
||||
@@ -196,6 +196,9 @@ def create_approval_response_message_from_input(
|
||||
denial_reason=input_message.reason,
|
||||
approvals=[maybe_convert_tool_return_message(approval) for approval in input_message.approvals],
|
||||
run_id=run_id,
|
||||
group_id=input_message.group_id
|
||||
if input_message.group_id
|
||||
else (agent_state.multi_agent_group.id if agent_state.multi_agent_group else None),
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user