Skip to content

Commit 2d17c33

Browse files
committed
Add plan_id to InputTask and update API logic
Introduces a plan_id field to the InputTask model and ensures it is set if missing in the process_request API endpoint. Also updates response to include plan_id, modifies .env.sample, switches dependency from fastmcp to mcp in pyproject.toml, and comments out user ownership check in team_service.
1 parent d37be31 commit 2d17c33

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

src/backend/.env.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ MCP_SERVER_DESCRIPTION=My MCP Server
2626
TENANT_ID=
2727
CLIENT_ID=
2828
BACKEND_API_URL=http://localhost:8000
29-
FRONTEND_SITE_NAME=*
30-
SUPPORTED_MODELS=
29+
FRONTEND_SITE_NAME=
30+
SUPPORTED_MODELS='["o3","o4-mini","gpt-4.1","gpt-4.1-mini"]'
3131
AZURE_AI_SEARCH_CONNECTION_NAME=
3232
AZURE_AI_SEARCH_INDEX_NAME=
3333
AZURE_AI_SEARCH_ENDPOINT=

src/backend/common/models/messages_kernel.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ class InputTask(KernelBaseModel):
248248
"""Message representing the initial input task from the user."""
249249

250250
session_id: str
251+
plan_id: str
251252
description: str # Initial goal
252253
team_id: str
253254

src/backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ dependencies = [
3131
"uvicorn>=0.34.2",
3232
"pylint-pydantic>=0.3.5",
3333
"pexpect>=4.9.0",
34-
"fastmcp==2.11.3",
34+
"mcp>=1.13.1"
3535
]

src/backend/v3/api/router.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def start_comms(websocket: WebSocket, process_id: str):
5454
connection_config.add_connection(process_id=process_id, connection=websocket, user_id=user_id)
5555
track_event_if_configured("WebSocketConnectionAccepted", {"process_id": process_id, "user_id": user_id})
5656

57-
# Keep the connection open - FastAPI will close the connection if this returns
57+
# Keep the connection open - FastAPI will close the connection if this returns
5858
try:
5959
# Keep the connection open - FastAPI will close the connection if this returns
6060
while True:
@@ -224,6 +224,8 @@ async def process_request(background_tasks: BackgroundTasks, input_task: InputTa
224224

225225
if not input_task.session_id:
226226
input_task.session_id = str(uuid.uuid4())
227+
if not input_task.plan_id:
228+
input_task.plan_id = str(uuid.uuid4())
227229

228230
try:
229231
current_user_id.set(user_id) # Set context
@@ -240,6 +242,7 @@ async def run_with_context():
240242
return {
241243
"status": "Request started successfully",
242244
"session_id": input_task.session_id,
245+
"plan_id": input_task.plan_id,
243246
}
244247

245248
except Exception as e:

src/backend/v3/common/services/team_service.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,13 @@ async def get_team_configuration(
204204
return None
205205

206206
# Verify the configuration belongs to the user
207-
if team_config.user_id != user_id:
208-
self.logger.warning(
209-
"Access denied: config %s does not belong to user %s",
210-
team_id,
211-
user_id,
212-
)
213-
return None
207+
# if team_config.user_id != user_id:
208+
# self.logger.warning(
209+
# "Access denied: config %s does not belong to user %s",
210+
# team_id,
211+
# user_id,
212+
# )
213+
# return None
214214

215215
return team_config
216216

0 commit comments

Comments
 (0)