bytedance/deer-flow · error · HTTPException
rating must be +1 or -1
Error message
rating must be +1 or -1
What it means
Error "rating must be +1 or -1" thrown in bytedance/deer-flow.
Source
Thrown at backend/app/gateway/routers/feedback.py:72
negative: int = 0
# ---------------------------------------------------------------------------
# Endpoints
# ---------------------------------------------------------------------------
@router.put("/{thread_id}/runs/{run_id}/feedback", response_model=FeedbackResponse)
@require_permission("threads", "write", owner_check=True, require_existing=True)
async def upsert_feedback(
thread_id: ThreadId,
run_id: str,
body: FeedbackUpsertRequest,
request: Request,
) -> dict[str, Any]:
"""Create or update feedback for a run (idempotent)."""
if body.rating not in (1, -1):
raise HTTPException(status_code=400, detail="rating must be +1 or -1")
user_id = await get_current_user(request)
run_store = get_run_store(request)
run = await run_store.get(run_id)
if run is None:
raise HTTPException(status_code=404, detail=f"Run {run_id} not found")
if run.get("thread_id") != thread_id:
raise HTTPException(status_code=404, detail=f"Run {run_id} not found in thread {thread_id}")
feedback_repo = get_feedback_repo(request)
return await feedback_repo.upsert(
run_id=run_id,
thread_id=thread_id,
rating=body.rating,
user_id=user_id,
comment=body.comment,
)View on GitHub (pinned to 1dd6ba1acb)
Solutions
- Send rating as exactly +1 (thumbs up) or -1 (thumbs down) in the request body.
- Check the client code mapping UI actions to rating values.
When it happens
Trigger: Thrown at backend/app/gateway/routers/feedback.py:72 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14).
Data as JSON: /api/errors/ac26667341fcdefa.
Report an issue: GitHub.