Skip to content

Commit 1f97a54

Browse files
committed
fix(ai-gateway): register chat_router before streaming_router to avoid wildcard route shadowing
1 parent 4a188b5 commit 1f97a54

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎server/ai-gateway/main.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ async def ai_error_handler(request: Request, exc: AIError) -> JSONResponse:
235235
app.include_router(socratic_router) # FEAT-022: 苏格拉底式学习(头脑风暴+四维度评估)
236236
app.include_router(multimodal_router) # Path B: 多模态课堂分析(多图联合 → Markdown 笔记)
237237
app.include_router(course_detect_router) # 课程识别(可选 AI 模式,单图推断课程信息)
238+
app.include_router(chat_router) # 学伴对话(SSE 流式)——必须在 streaming_router 之前注册,避免被 /{feature}/stream 通配拦截
238239
app.include_router(streaming_router) # 流式输出(SSE,全量 AI 功能)
239240
app.include_router(balance_router) # API 余额查询
240241
app.include_router(ritual_recall_router) # v0.26.0 B1.2: 仪式回顾小问
241-
app.include_router(chat_router) # 学伴对话(SSE 流式)
242242

243243

244244
# ============================================================

0 commit comments

Comments
 (0)