mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
APP-1197 Mark conversation endpoints as deprecated with updated docs (#13775)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -83,7 +83,7 @@ def _get_v0_conversation_config(
|
||||
}
|
||||
|
||||
|
||||
@app.get('/config')
|
||||
@app.get('/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.
|
||||
"""
|
||||
|
||||
@@ -24,7 +24,7 @@ app = APIRouter(
|
||||
)
|
||||
|
||||
|
||||
@app.post('/submit-feedback')
|
||||
@app.post('/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": "test@example.com"}' -H "Authorization:"
|
||||
|
||||
@@ -704,13 +704,18 @@ async def _delete_v0_conversation(conversation_id: str, user_id: str | None) ->
|
||||
return True
|
||||
|
||||
|
||||
@app.get('/conversations/{conversation_id}/remember-prompt')
|
||||
@app.get('/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()
|
||||
|
||||
|
||||
@app.get('/microagent-management/conversations')
|
||||
@app.get('/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.
|
||||
|
||||
|
||||
@@ -36,10 +36,14 @@ async def get_litellm_models(
|
||||
return models
|
||||
|
||||
|
||||
@app.get('/agents', response_model=list[str])
|
||||
@app.get('/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())
|
||||
|
||||
|
||||
@app.get('/security-analyzers', response_model=list[str])
|
||||
@app.get('/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
|
||||
|
||||
@@ -24,12 +24,16 @@ app = APIRouter(
|
||||
)
|
||||
|
||||
|
||||
@app.get('/trajectory')
|
||||
@app.get('/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.
|
||||
|
||||
Reference in New Issue
Block a user