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
fix: resolve pyright bad-index errors in parser.py (#32507)
Tyson Cung84533cbfe051
diff --git a/api/core/tools/utils/parser.py b/api/core/tools/utils/parser.pyindex 584975de050..67079665e6a 100644--- a/api/core/tools/utils/parser.py+++ b/api/core/tools/utils/parser.py@@ -2,7 +2,7 @@ import refrom json import dumps as json_dumpsfrom json import loads as json_loadsfrom json.decoder import JSONDecodeError-from typing import Any+from typing import Any, TypedDictimport httpxfrom flask import request@@ -14,6 +14,12 @@ from core.tools.entities.tool_entities import ApiProviderSchemaType, ToolParametfrom core.tools.errors import ToolApiSchemaError, ToolNotSupportedError, ToolProviderNotFoundError+class _OpenAPIInterface(TypedDict):+ path: str+ method: str+ operation: dict[str, Any]++class ApiBasedToolSchemaParser:@staticmethoddef parse_openapi_to_tool_bundle(@@ -35,17 +41,17 @@ class ApiBasedToolSchemaParser:server_url = matched_servers[0] if matched_servers else server_url# list all interfaces- interfaces = []+ interfaces: list[_OpenAPIInterface] = []for path, path_item in openapi["paths"].items():methods = ["get", "post", "put", "delete", "patch", "head", "options", "trace"]for method in methods:if method in path_item:interfaces.append(- {- "path": path,- "method": method,- "operation": path_item[method],- }+ _OpenAPIInterface(+ path=path,+ method=method,+ operation=path_item[method],+ ))# get all parameters