fix: widen actions_taken to list[Any] and improve bot error replies

DispatchResponse declared actions_taken as list[dict] but agents return
list[str], causing a 422 on every successful upload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Carlos Garcia
2026-05-16 16:31:45 -04:00
parent cf3fe5e0a5
commit bb1e93fabb
2 changed files with 18 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import hmac
import logging
import time
import uuid
from typing import Optional
from typing import Any, Optional
from fastapi import APIRouter, Depends, HTTPException, Request, status
from pydantic import BaseModel, Field
@@ -31,7 +31,7 @@ class DispatchResponse(BaseModel):
reply: str
agent_reports: list[dict] = []
escalations: list[str] = []
actions_taken: list[dict] = []
actions_taken: list[Any] = []
session_id: Optional[str] = None