From 026deb294c32cad147f399554dfb7b80e4a501b0 Mon Sep 17 00:00:00 2001 From: cthomas Date: Wed, 22 Oct 2025 16:00:03 -0700 Subject: [PATCH] feat: update delete runs return type [LET-5777] (#5636) feat: update delete runs return type --- fern/openapi.json | 4 +--- letta/server/rest_api/routers/v1/runs.py | 2 +- letta/services/run_manager.py | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/fern/openapi.json b/fern/openapi.json index 121a1b65..2c45007f 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 bb34706c..e737ee32 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( ) -@router.delete("/{run_id}", response_model=Run, operation_id="delete_run") +@router.delete("/{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 33677f4b..6c16d5e3 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(