mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
fix(mcp): sort submissions newest-first; force active status on admin-created servers
This commit is contained in:
parent
a1e62e8c56
commit
8963a54f1a
2 changed files with 5 additions and 1 deletions
|
|
@ -513,7 +513,7 @@ async def get_mcp_submissions(
|
|||
"""
|
||||
rows = await prisma_client.db.litellm_mcpservertable.find_many(
|
||||
where={"submitted_at": {"not": None}},
|
||||
order={"submitted_at": "asc"},
|
||||
order={"submitted_at": "desc"},
|
||||
)
|
||||
items = [LiteLLM_MCPServerTable(**r.model_dump()) for r in rows]
|
||||
|
||||
|
|
|
|||
|
|
@ -1026,6 +1026,10 @@ if MCP_AVAILABLE:
|
|||
|
||||
# TODO: audit log for create
|
||||
|
||||
# Admin-created servers are always active regardless of any lifecycle fields
|
||||
# in the payload — prevents an admin from accidentally creating a pending server.
|
||||
payload.approval_status = MCPApprovalStatus.active
|
||||
|
||||
# Attempt to create the mcp server
|
||||
try:
|
||||
new_mcp_server = await create_mcp_server(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue