mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
[Fix] Standardize MCP endpoint HTTP status codes
- PUT /v1/mcp/server: 202 → 200 (synchronous update returns body)
- DELETE /v1/mcp/server: 202 → 204 (synchronous delete, no body)
- Also fix description typo ("deleting" → "updating") on PUT endpoint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0ca13cc6a5
commit
d7890fb278
1 changed files with 5 additions and 5 deletions
|
|
@ -1491,10 +1491,10 @@ if MCP_AVAILABLE:
|
|||
|
||||
@router.delete(
|
||||
"/server/{server_id}",
|
||||
description="Allows deleting mcp serves in the db",
|
||||
description="Allows deleting mcp servers in the db",
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
response_class=JSONResponse,
|
||||
status_code=status.HTTP_202_ACCEPTED,
|
||||
status_code=status.HTTP_204_NO_CONTENT,
|
||||
)
|
||||
@management_endpoint_wrapper
|
||||
async def remove_mcp_server(
|
||||
|
|
@ -1588,7 +1588,7 @@ if MCP_AVAILABLE:
|
|||
if litellm.store_audit_logs:
|
||||
pass
|
||||
|
||||
return Response(status_code=status.HTTP_202_ACCEPTED)
|
||||
return Response(status_code=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
@router.post(
|
||||
"/server/{server_id}/user-credential",
|
||||
|
|
@ -1848,10 +1848,10 @@ if MCP_AVAILABLE:
|
|||
|
||||
@router.put(
|
||||
"/server",
|
||||
description="Allows deleting mcp serves in the db",
|
||||
description="Allows updating mcp servers in the db",
|
||||
dependencies=[Depends(user_api_key_auth)],
|
||||
response_model=LiteLLM_MCPServerTable,
|
||||
status_code=status.HTTP_202_ACCEPTED,
|
||||
status_code=status.HTTP_200_OK,
|
||||
)
|
||||
@management_endpoint_wrapper
|
||||
async def edit_mcp_server(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue