Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor(api): reuse IdentityDict TypedDict in logging filters (#34593)
YBoy01ba0e050f33
diff --git a/api/core/logging/filters.py b/api/core/logging/filters.pyindex 1e8aa8d566b..dee1432363c 100644--- a/api/core/logging/filters.py+++ b/api/core/logging/filters.py@@ -6,6 +6,7 @@ import loggingimport flaskfrom core.logging.context import get_request_id, get_trace_id+from core.logging.structured_formatter import IdentityDictclass TraceContextFilter(logging.Filter):@@ -60,7 +61,7 @@ class IdentityContextFilter(logging.Filter):record.user_type = identity.get("user_type", "")return True- def _extract_identity(self) -> dict[str, str]:+ def _extract_identity(self) -> IdentityDict:"""Extract identity from current_user if in request context."""try:if not flask.has_request_context():@@ -77,7 +78,7 @@ class IdentityContextFilter(logging.Filter):from models import Accountfrom models.model import EndUser- identity: dict[str, str] = {}+ identity: IdentityDict = {}if isinstance(user, Account):if user.current_tenant_id: