rohitg00/ai-engineering-from-scratch · error · ValueError
unsupported input request: {method}
Error message
unsupported input request: {method} What it means
Error "unsupported input request: {method}" thrown in rohitg00/ai-engineering-from-scratch.
Source
Thrown at certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py:590
method = request.get("method")
if method == "roots/list":
responses[key] = {
"roots": [{"uri": "file:///workspace", "name": "Workspace"}],
}
elif method == "sampling/createMessage":
responses[key] = {
"role": "assistant",
"content": {"type": "text", "text": "Check correctness and rollback risk."},
"model": "study-model",
"stopReason": "endTurn",
}
elif method == "elicitation/create":
responses[key] = {
"action": "accept",
"content": {"goal": "find correctness risks"},
}
else:
raise ValueError(f"unsupported input request: {method}")
return responses
def streamable_http_profile() -> dict[str, Any]:
return {
"endpoint": "/mcp",
"method": "POST",
"oneMessagePerPost": True,
"protocolSessions": False,
"responseTypes": ["application/json", "text/event-stream"],
"requestScopedSSE": True,
"changeNotifications": "subscriptions/listen",
"supportsGetStream": False,
"supportsDeleteSession": False,
"supportsLastEventId": False,
}
View on GitHub (pinned to 39ea8a1c6d)
When it happens
Trigger: Thrown at certifications/claude/lessons/11-mcp-server-design-and-integration/code/main.py:590 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rohitg00/ai-engineering-from-scratch@39ea8a1c6d (2026-08-26).
Data as JSON: /api/errors/881521e3831ee297.
Report an issue: GitHub.