Skip to content

πŸ™Œ OpenHands: AI-Driven Development

APP-1197 Mark conversation endpoints as deprecated with updated docs (#13775)

Tim O'Farrellb9b10ebf5ebb
diff --git a/openhands/server/routes/conversation.py b/openhands/server/routes/conversation.py
index 5dd3970efe..7172f29d18 100644
--- a/openhands/server/routes/conversation.py
+++ b/openhands/server/routes/conversation.py
@@ -83,7 +83,7 @@ def _get_v0_conversation_config(
}
[email protected]('/config', deprecated=True)
async def get_remote_runtime_config(
conversation_id: str,
app_conversation_info_service: AppConversationInfoService = app_conversation_info_service_dependency,
@@ -91,6 +91,10 @@ async def get_remote_runtime_config(
) -> JSONResponse:
"""Retrieve the runtime configuration.
+ .. deprecated::
+ This endpoint is deprecated. The config is now returned as part of
+ GET /api/v1/app-conversation/{conversation_id}. Use that endpoint instead.
+
For V0 conversations: returns runtime_id and session_id from the runtime.
For V1 conversations: returns sandbox_id as runtime_id and conversation_id as session_id.
"""
diff --git a/openhands/server/routes/feedback.py b/openhands/server/routes/feedback.py
index 468ff03c61..8a02439047 100644
--- a/openhands/server/routes/feedback.py
+++ b/openhands/server/routes/feedback.py
@@ -24,7 +24,7 @@ app = APIRouter(
)
[email protected]('/submit-feedback')
[email protected]('/submit-feedback', deprecated=True)
async def submit_feedback(
request: Request, conversation: ServerConversation = Depends(get_conversation)
) -> JSONResponse:
@@ -32,6 +32,10 @@ async def submit_feedback(
This function stores the provided feedback data.
+ .. deprecated::
+ Submitting feedback in OSS doesn't really make sense. This endpoint is deprecated
+ and will be removed.
+
To submit feedback:
```sh
curl -X POST -d '{"email": "[email protected]"}' -H "Authorization:"
diff --git a/openhands/server/routes/manage_conversations.py b/openhands/server/routes/manage_conversations.py
index 7f464845b2..1d2661d369 100644
--- a/openhands/server/routes/manage_conversations.py
+++ b/openhands/server/routes/manage_conversations.py
@@ -704,13 +704,18 @@ async def _delete_v0_conversation(conversation_id: str, user_id: str | None) ->
return True
[email protected]('/conversations/{conversation_id}/remember-prompt')
[email protected]('/conversations/{conversation_id}/remember-prompt', deprecated=True)
async def get_prompt(
event_id: int,
conversation_id: str = Depends(validate_conversation_id),
user_settings: SettingsStore = Depends(get_user_settings_store),
metadata: ConversationMetadata = Depends(get_conversation_metadata),
):
+ """Get the remember prompt for the microagent UI.
+
+ .. deprecated::
+ This endpoint is deprecated. Microagent UI is deprecated in V1.
+ """
# get event store for the conversation
event_store = EventStore(
sid=conversation_id, file_store=file_store, user_id=metadata.user_id
@@ -1467,7 +1472,7 @@ def _create_combined_page_id(
return base64.b64encode(json.dumps(next_page_data).encode()).decode()
[email protected]('/microagent-management/conversations')
[email protected]('/microagent-management/conversations', deprecated=True)
async def get_microagent_management_conversations(
selected_repository: str,
page_id: str | None = None,
@@ -1478,6 +1483,9 @@ async def get_microagent_management_conversations(
) -> ConversationInfoResultSet:
"""Get conversations for the microagent management page with pagination support.
+ .. deprecated::
+ This endpoint is deprecated. Microagent UI is deprecated in V1.
+
This endpoint returns conversations with conversation_trigger = 'microagent_management'
and only includes conversations with active PRs. Pagination is supported.
diff --git a/openhands/server/routes/public.py b/openhands/server/routes/public.py
index 49dab2f36c..6c8067f87c 100644
--- a/openhands/server/routes/public.py
+++ b/openhands/server/routes/public.py
@@ -36,10 +36,14 @@ async def get_litellm_models(
return models
[email protected]('/agents', response_model=list[str])
[email protected]('/agents', response_model=list[str], deprecated=True)
async def get_agents() -> list[str]:
"""Get all agents supported by LiteLLM.
+ .. deprecated::
+ This endpoint is deprecated. The agent definitions are now part of the
+ OpenAPI schema so this is no longer required.
+
To get the agents:
```sh
curl http://localhost:3000/api/agents
@@ -51,10 +55,14 @@ async def get_agents() -> list[str]:
return sorted(Agent.list_agents())
[email protected]('/security-analyzers', response_model=list[str])
[email protected]('/security-analyzers', response_model=list[str], deprecated=True)
async def get_security_analyzers() -> list[str]:
"""Get all supported security analyzers.
+ .. deprecated::
+ This endpoint is deprecated. The security analyzers are now part of the
+ OpenAPI schema so this is no longer required.
+
To get the security analyzers:
```sh
curl http://localhost:3000/api/security-analyzers
diff --git a/openhands/server/routes/trajectory.py b/openhands/server/routes/trajectory.py
index 6fd8685fdc..5a87ea118a 100644
--- a/openhands/server/routes/trajectory.py
+++ b/openhands/server/routes/trajectory.py
@@ -24,12 +24,16 @@ app = APIRouter(
)
[email protected]('/trajectory')
[email protected]('/trajectory', deprecated=True)
async def get_trajectory(
metadata: ConversationMetadata = Depends(get_conversation_metadata),
) -> JSONResponse:
"""Get trajectory.
+ .. deprecated::
+ This endpoint is deprecated. Use the V1 endpoint
+ ``GET /app-conversation/{conversation_id}/download`` instead.
+
This function retrieves the current trajectory and returns it.
Uses the local EventStore which reads events from the file store,
so it works with both standalone and nested conversation managers.