Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: update delete runs return type [LET-5777] (#5636)

cthomas026deb294c32
diff --git a/fern/openapi.json b/fern/openapi.json
index 121a1b650..2c45007f2 100644
--- a/fern/openapi.json
+++ b/fern/openapi.json
@@ -11613,9 +11613,7 @@
"description": "Successful Response",
"content": {
"application/json": {
- "schema": {
- "$ref": "#/components/schemas/Run"
- }
+ "schema": {}
}
}
},
diff --git a/letta/server/rest_api/routers/v1/runs.py b/letta/server/rest_api/routers/v1/runs.py
index bb34706cb..e737ee321 100644
--- a/letta/server/rest_api/routers/v1/runs.py
+++ b/letta/server/rest_api/routers/v1/runs.py
@@ -265,7 +265,7 @@ async def list_run_steps(
)
[email protected]("/{run_id}", response_model=Run, operation_id="delete_run")
[email protected]("/{run_id}", response_model=None, operation_id="delete_run")
async def delete_run(
run_id: str,
headers: HeaderParams = Depends(get_headers),
diff --git a/letta/services/run_manager.py b/letta/services/run_manager.py
index 33677f4bc..6c16d5e36 100644
--- a/letta/services/run_manager.py
+++ b/letta/services/run_manager.py
@@ -179,18 +179,15 @@ class RunManager:
@enforce_types
@raise_on_invalid_id(param_name="run_id", expected_prefix=PrimitiveType.RUN)
- async def delete_run(self, run_id: str, actor: PydanticUser) -> PydanticRun:
+ async def delete_run(self, run_id: str, actor: PydanticUser) -> None:
"""Delete a run by its ID."""
async with db_registry.async_session() as session:
run = await RunModel.read_async(db_session=session, identifier=run_id, actor=actor, access_type=AccessType.ORGANIZATION)
if not run:
raise NoResultFound(f"Run with id {run_id} not found")
- pydantic_run = run.to_pydantic()
await run.hard_delete_async(db_session=session, actor=actor)
- return pydantic_run
-
@enforce_types
@raise_on_invalid_id(param_name="run_id", expected_prefix=PrimitiveType.RUN)
async def update_run_by_id_async(