fix: convert datetime to ISO string format for PostgreSQL timestamp compatibility

Fixes timestamp type mismatch error in tool_registry_writer.py when
inserting into LiteLLM_ToolTable. PostgreSQL expects timestamp format
not timezone-aware datetime objects.

Closes #23585
This commit is contained in:
Jah-yee 2026-03-14 06:11:53 +08:00
parent 56557bfae1
commit cac533c2a8

View file

@ -83,7 +83,7 @@ async def batch_upsert_tools(
data = [item for item in items if item.get("tool_name")]
if not data:
return
now = datetime.now(timezone.utc)
now = datetime.now(timezone.utc).isoformat()
table = prisma_client.db.litellm_tooltable
for item in data:
tool_name = item.get("tool_name", "")