fix: properly serialize Pydantic HttpUrl in webhook config

Use model_dump(mode='json') instead of deprecated dict() method to ensure
Pydantic special types (HttpUrl, UUID, etc.) are properly serialized to
JSON-compatible native Python types.

This fixes webhook delivery failures caused by HttpUrl objects remaining
as Pydantic types in the webhook_config dict, which caused JSON
serialization errors and httpx request failures.

Also update mcp requirement to >=1.18.0 for compatibility.
This commit is contained in:
unclecode
2025-10-22 15:50:25 +08:00
parent 52da8d72bc
commit f8606f6865
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ async def crawl_job_enqueue(
):
webhook_config = None
if payload.webhook_config:
webhook_config = payload.webhook_config.dict()
webhook_config = payload.webhook_config.model_dump(mode='json')
return await handle_crawl_job(
_redis,