diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 624c00413..2a52b9257 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,12 @@ version: 2 updates: - - package-ecosystem: uv # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: uv + directory: "/" schedule: interval: "weekly" + groups: + security-updates: + applies-to: security-updates + patterns: + - "*" diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..24ee5b1be --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.13 diff --git a/lib/crewai-tools/src/crewai_tools/generate_tool_specs.py b/lib/crewai-tools/src/crewai_tools/generate_tool_specs.py index ebf10bdbf..9e1847271 100644 --- a/lib/crewai-tools/src/crewai_tools/generate_tool_specs.py +++ b/lib/crewai-tools/src/crewai_tools/generate_tool_specs.py @@ -8,8 +8,9 @@ from typing import Any from crewai.tools.base_tool import BaseTool, EnvVar from pydantic import BaseModel +from pydantic.fields import FieldInfo from pydantic.json_schema import GenerateJsonSchema -from pydantic_core import PydanticOmit +from pydantic_core import PydanticOmit, PydanticUndefined from crewai_tools import tools @@ -44,6 +45,9 @@ class ToolSpecExtractor: schema = self._unwrap_schema(core_schema) fields = schema.get("schema", {}).get("fields", {}) + # Use model_fields to get defaults (handles both default and default_factory) + model_fields = tool_class.model_fields + tool_info = { "name": tool_class.__name__, "humanized_name": self._extract_field_default( @@ -54,9 +58,9 @@ class ToolSpecExtractor: ).strip(), "run_params_schema": self._extract_params(fields.get("args_schema")), "init_params_schema": self._extract_init_params(tool_class), - "env_vars": self._extract_env_vars(fields.get("env_vars")), - "package_dependencies": self._extract_field_default( - fields.get("package_dependencies"), fallback=[] + "env_vars": self._extract_env_vars_from_model_fields(model_fields), + "package_dependencies": self._extract_package_deps_from_model_fields( + model_fields ), } @@ -103,10 +107,27 @@ class ToolSpecExtractor: return {} @staticmethod - def _extract_env_vars( - env_vars_field: dict[str, Any] | None, + def _get_field_default(field: FieldInfo | None) -> Any: + """Get default value from a FieldInfo, handling both default and default_factory.""" + if not field: + return None + + default_value = field.default + if default_value is PydanticUndefined or default_value is None: + if field.default_factory: + return field.default_factory() + return None + + return default_value + + @staticmethod + def _extract_env_vars_from_model_fields( + model_fields: dict[str, FieldInfo], ) -> list[dict[str, Any]]: - if not env_vars_field: + default_value = ToolSpecExtractor._get_field_default( + model_fields.get("env_vars") + ) + if not default_value: return [] return [ @@ -116,10 +137,22 @@ class ToolSpecExtractor: "required": env_var.required, "default": env_var.default, } - for env_var in env_vars_field.get("schema", {}).get("default", []) + for env_var in default_value if isinstance(env_var, EnvVar) ] + @staticmethod + def _extract_package_deps_from_model_fields( + model_fields: dict[str, FieldInfo], + ) -> list[str]: + default_value = ToolSpecExtractor._get_field_default( + model_fields.get("package_dependencies") + ) + if not isinstance(default_value, list): + return [] + + return default_value + @staticmethod def _extract_init_params(tool_class: type[BaseTool]) -> dict[str, Any]: ignored_init_params = [ @@ -152,7 +185,7 @@ class ToolSpecExtractor: if __name__ == "__main__": - output_file = Path(__file__).parent / "tool.specs.json" + output_file = Path(__file__).parent.parent.parent / "tool.specs.json" extractor = ToolSpecExtractor() extractor.extract_all_tools() diff --git a/lib/crewai-tools/src/crewai_tools/tools/stagehand_tool/stagehand_tool.py b/lib/crewai-tools/src/crewai_tools/tools/stagehand_tool/stagehand_tool.py index ba7048ba9..70eaa296c 100644 --- a/lib/crewai-tools/src/crewai_tools/tools/stagehand_tool/stagehand_tool.py +++ b/lib/crewai-tools/src/crewai_tools/tools/stagehand_tool/stagehand_tool.py @@ -4,7 +4,7 @@ import os import re from typing import Any -from crewai.tools import BaseTool +from crewai.tools import BaseTool, EnvVar from pydantic import BaseModel, Field @@ -137,7 +137,21 @@ class StagehandTool(BaseTool): - 'observe': For finding elements in a specific area """ args_schema: type[BaseModel] = StagehandToolSchema - package_dependencies: list[str] = Field(default_factory=lambda: ["stagehand"]) + package_dependencies: list[str] = Field(default_factory=lambda: ["stagehand<=0.5.9"]) + env_vars: list[EnvVar] = Field( + default_factory=lambda: [ + EnvVar( + name="BROWSERBASE_API_KEY", + description="API key for Browserbase services", + required=False, + ), + EnvVar( + name="BROWSERBASE_PROJECT_ID", + description="Project ID for Browserbase services", + required=False, + ), + ] + ) # Stagehand configuration api_key: str | None = None diff --git a/lib/crewai-tools/tests/test_generate_tool_specs.py b/lib/crewai-tools/tests/test_generate_tool_specs.py index 290d099b9..2f56ed1e6 100644 --- a/lib/crewai-tools/tests/test_generate_tool_specs.py +++ b/lib/crewai-tools/tests/test_generate_tool_specs.py @@ -23,23 +23,26 @@ class MockTool(BaseTool): ) my_parameter: str = Field("This is default value", description="What a description") my_parameter_bool: bool = Field(False) + # Use default_factory like real tools do (not direct default) package_dependencies: list[str] = Field( - ["this-is-a-required-package", "another-required-package"], description="" + default_factory=lambda: ["this-is-a-required-package", "another-required-package"] + ) + env_vars: list[EnvVar] = Field( + default_factory=lambda: [ + EnvVar( + name="SERPER_API_KEY", + description="API key for Serper", + required=True, + default=None, + ), + EnvVar( + name="API_RATE_LIMIT", + description="API rate limit", + required=False, + default="100", + ), + ] ) - env_vars: list[EnvVar] = [ - EnvVar( - name="SERPER_API_KEY", - description="API key for Serper", - required=True, - default=None, - ), - EnvVar( - name="API_RATE_LIMIT", - description="API rate limit", - required=False, - default="100", - ), - ] @pytest.fixture diff --git a/lib/crewai-tools/tool.specs.json b/lib/crewai-tools/tool.specs.json index ea38e6941..74e5ace4e 100644 --- a/lib/crewai-tools/tool.specs.json +++ b/lib/crewai-tools/tool.specs.json @@ -63,20 +63,12 @@ "title": "Api Key" }, "datasources": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Datasources" + "items": { + "additionalProperties": true, + "type": "object" + }, + "title": "Datasources", + "type": "array" }, "mind_name": { "anyOf": [ @@ -157,7 +149,23 @@ } }, "additionalProperties": true, - "properties": {}, + "properties": { + "download_pdfs": { + "default": false, + "title": "Download Pdfs", + "type": "boolean" + }, + "save_dir": { + "default": "./arxiv_pdfs", + "title": "Save Dir", + "type": "string" + }, + "use_title_as_filename": { + "default": false, + "title": "Use Title As Filename", + "type": "boolean" + } + }, "title": "ArxivPaperTool", "type": "object" }, @@ -290,7 +298,14 @@ }, { "description": "Scrapes structured data using Bright Data Dataset API from a URL and optional input parameters", - "env_vars": [], + "env_vars": [ + { + "default": null, + "description": "API key for Bright Data", + "name": "BRIGHT_DATA_API_KEY", + "required": true + } + ], "humanized_name": "Bright Data Dataset Tool", "init_params_schema": { "$defs": { @@ -456,7 +471,14 @@ }, { "description": "Tool to perform web search using Bright Data SERP API.", - "env_vars": [], + "env_vars": [ + { + "default": null, + "description": "API key for Bright Data", + "name": "BRIGHT_DATA_API_KEY", + "required": true + } + ], "humanized_name": "Bright Data SERP Search", "init_params_schema": { "$defs": { @@ -664,7 +686,14 @@ }, { "description": "Tool to perform web scraping using Bright Data Web Unlocker", - "env_vars": [], + "env_vars": [ + { + "default": null, + "description": "API key for Bright Data", + "name": "BRIGHT_DATA_API_KEY", + "required": true + } + ], "humanized_name": "Bright Data Web Unlocker Scraping", "init_params_schema": { "$defs": { @@ -947,10 +976,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -985,24 +1173,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -1019,7 +2002,7 @@ "description": "Input for CSVSearchTool.", "properties": { "csv": { - "description": "Mandatory csv path you want to search", + "description": "File path or URL of a CSV file to be searched", "title": "Csv", "type": "string" }, @@ -1044,10 +2027,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -1082,24 +2224,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -1315,7 +3252,11 @@ }, "name": "ComposioTool", "package_dependencies": [], - "run_params_schema": {} + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } }, { "description": "Create a new Contextual AI RAG agent with documents and datastore", @@ -1793,45 +3734,21 @@ "type": "object" } }, - "description": "Tool to search the Couchbase database", + "description": "Tool to search the Couchbase database.", "properties": { "bucket_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": [ - null - ], - "title": "Bucket Name" + "description": "The name of the Couchbase bucket to search", + "title": "Bucket Name", + "type": "string" }, "cluster": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "default": null, + "description": "An instance of the Couchbase Cluster connected to the desired Couchbase server.", "title": "Cluster" }, "collection_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": [ - null - ], - "title": "Collection Name" + "description": "The name of the Couchbase collection to search", + "title": "Collection Name", + "type": "string" }, "embedding_key": { "anyOf": [ @@ -1847,18 +3764,9 @@ "title": "Embedding Key" }, "index_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": [ - null - ], - "title": "Index Name" + "description": "The name of the Couchbase index to search", + "title": "Index Name", + "type": "string" }, "limit": { "anyOf": [ @@ -1873,31 +3781,24 @@ "title": "Limit" }, "scope_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": [ - null - ], - "title": "Scope Name" + "description": "The name of the Couchbase scope containing the collection to search.", + "title": "Scope Name", + "type": "string" }, "scoped_index": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Scoped Index" + "default": true, + "description": "Specify whether the index is scoped. Is True by default.", + "title": "Scoped Index", + "type": "boolean" } }, + "required": [ + "cluster", + "collection_name", + "scope_name", + "bucket_name", + "index_name" + ], "title": "CouchbaseFTSVectorSearchTool", "type": "object" }, @@ -1926,10 +3827,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -1964,24 +4024,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -2006,7 +4861,7 @@ "type": "null" } ], - "description": "Mandatory docx path you want to search", + "description": "File path or URL of a DOCX file to be searched", "title": "Docx" }, "search_query": { @@ -2084,14 +4939,46 @@ "type": "integer" }, "quality": { + "anyOf": [ + { + "enum": [ + "standard", + "hd", + "low", + "medium", + "high", + "auto" + ], + "type": "string" + }, + { + "type": "null" + } + ], "default": "standard", - "title": "Quality", - "type": "string" + "title": "Quality" }, "size": { + "anyOf": [ + { + "enum": [ + "auto", + "1024x1024", + "1536x1024", + "1024x1536", + "256x256", + "512x512", + "1792x1024", + "1024x1792" + ], + "type": "string" + }, + { + "type": "null" + } + ], "default": "1024x1024", - "title": "Size", - "type": "string" + "title": "Size" } }, "title": "DallETool", @@ -2355,10 +5242,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -2393,24 +5439,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -2453,6 +6294,12 @@ "description": "API key for Exa services", "name": "EXA_API_KEY", "required": false + }, + { + "default": null, + "description": "API url for the Exa services", + "name": "EXA_BASE_URL", + "required": false } ], "humanized_name": "EXASearchTool", @@ -2508,6 +6355,19 @@ "required": false, "title": "Api Key" }, + "base_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "API server url", + "required": false, + "title": "Base Url" + }, "client": { "anyOf": [ {}, @@ -2750,7 +6610,7 @@ "type": "object" } }, - "description": "A tool for reading file contents.\n\nThis tool inherits its schema handling from BaseTool to avoid recursive schema\ndefinition issues. The args_schema is set to FileReadToolSchema which defines\nthe required file_path parameter. The schema should not be overridden in the\nconstructor as it would break the inheritance chain and cause infinite loops.\n\nThe tool supports two ways of specifying the file path:\n1. At construction time via the file_path parameter\n2. At runtime via the file_path parameter in the tool's input\n\nArgs:\n file_path (Optional[str]): Path to the file to be read. If provided,\n this becomes the default file path for the tool.\n **kwargs: Additional keyword arguments passed to BaseTool.\n\nExample:\n >>> tool = FileReadTool(file_path=\"/path/to/file.txt\")\n >>> content = tool.run() # Reads /path/to/file.txt\n >>> content = tool.run(file_path=\"/path/to/other.txt\") # Reads other.txt\n >>> content = tool.run(file_path=\"/path/to/file.txt\", start_line=100, line_count=50) # Reads lines 100-149", + "description": "A tool for reading file contents.\n\nThis tool inherits its schema handling from BaseTool to avoid recursive schema\ndefinition issues. The args_schema is set to FileReadToolSchema which defines\nthe required file_path parameter. The schema should not be overridden in the\nconstructor as it would break the inheritance chain and cause infinite loops.\n\nThe tool supports two ways of specifying the file path:\n1. At construction time via the file_path parameter\n2. At runtime via the file_path parameter in the tool's input\n\nArgs:\n file_path (Optional[str]): Path to the file to be read. If provided,\n this becomes the default file path for the tool.\n **kwargs: Additional keyword arguments passed to BaseTool.\n\nExample:\n >>> tool = FileReadTool(file_path=\"/path/to/file.txt\")\n >>> content = tool.run() # Reads /path/to/file.txt\n >>> content = tool.run(file_path=\"/path/to/other.txt\") # Reads other.txt\n >>> content = tool.run(\n ... file_path=\"/path/to/file.txt\", start_line=100, line_count=50\n ... ) # Reads lines 100-149", "properties": { "file_path": { "anyOf": [ @@ -2952,7 +6812,7 @@ "type": "object" } }, - "description": "Tool for crawling websites using Firecrawl. To run this tool, you need to have a Firecrawl API key.\n\nArgs:\n api_key (str): Your Firecrawl API key.\n config (dict): Optional. It contains Firecrawl API parameters.\n\nDefault configuration options:\n max_depth (int): Maximum depth to crawl. Default: 2\n ignore_sitemap (bool): Whether to ignore sitemap. Default: True\n limit (int): Maximum number of pages to crawl. Default: 100\n allow_backward_links (bool): Allow crawling backward links. Default: False\n allow_external_links (bool): Allow crawling external links. Default: False\n scrape_options (ScrapeOptions): Options for scraping content\n - formats (list[str]): Content formats to return. Default: [\"markdown\", \"screenshot\", \"links\"]\n - only_main_content (bool): Only return main content. Default: True\n - timeout (int): Timeout in milliseconds. Default: 30000", + "description": "Tool for crawling websites using Firecrawl v2 API. To run this tool, you need to have a Firecrawl API key.\n\nArgs:\n api_key (str): Your Firecrawl API key.\n config (dict): Optional. It contains Firecrawl v2 API parameters.\n\nDefault configuration options (Firecrawl v2 API):\n max_discovery_depth (int): Maximum depth for discovering pages. Default: 2\n ignore_sitemap (bool): Whether to ignore sitemap. Default: True\n limit (int): Maximum number of pages to crawl. Default: 10\n allow_external_links (bool): Allow crawling external links. Default: False\n allow_subdomains (bool): Allow crawling subdomains. Default: False\n delay (int): Delay between requests in milliseconds. Default: None\n scrape_options (dict): Options for scraping content\n - formats (list[str]): Content formats to return. Default: [\"markdown\"]\n - only_main_content (bool): Only return main content. Default: True\n - timeout (int): Timeout in milliseconds. Default: 10000", "properties": { "api_key": { "anyOf": [ @@ -3050,7 +6910,7 @@ "type": "object" } }, - "description": "Tool for scraping webpages using Firecrawl. To run this tool, you need to have a Firecrawl API key.\n\nArgs:\n api_key (str): Your Firecrawl API key.\n config (dict): Optional. It contains Firecrawl API parameters.\n\nDefault configuration options:\n formats (list[str]): Content formats to return. Default: [\"markdown\"]\n onlyMainContent (bool): Only return main content. Default: True\n includeTags (list[str]): Tags to include. Default: []\n excludeTags (list[str]): Tags to exclude. Default: []\n headers (dict): Headers to include. Default: {}\n waitFor (int): Time to wait for page to load in ms. Default: 0\n json_options (dict): Options for JSON extraction. Default: None", + "description": "Tool for scraping webpages using Firecrawl v2 API. To run this tool, you need to have a Firecrawl API key.\n\nArgs:\n api_key (str): Your Firecrawl API key.\n config (dict): Optional. It contains Firecrawl v2 API parameters.\n\nDefault configuration options (Firecrawl v2 API):\n formats (list[str]): Content formats to return. Default: [\"markdown\"]\n only_main_content (bool): Only return main content excluding headers, navs, footers, etc. Default: True\n include_tags (list[str]): Tags to include in the output. Default: []\n exclude_tags (list[str]): Tags to exclude from the output. Default: []\n max_age (int): Returns cached version if younger than this age in milliseconds. Default: 172800000 (2 days)\n headers (dict): Headers to send with the request (e.g., cookies, user-agent). Default: {}\n wait_for (int): Delay in milliseconds before fetching content. Default: 0\n mobile (bool): Emulate scraping from a mobile device. Default: False\n skip_tls_verification (bool): Skip TLS certificate verification. Default: True\n timeout (int): Request timeout in milliseconds. Default: None\n remove_base64_images (bool): Remove base64 images from output. Default: True\n block_ads (bool): Enable ad-blocking and cookie popup blocking. Default: True\n proxy (str): Proxy type (\"basic\", \"stealth\", \"auto\"). Default: \"auto\"\n store_in_cache (bool): Store page in Firecrawl index and cache. Default: True", "properties": { "api_key": { "anyOf": [ @@ -3141,7 +7001,7 @@ "type": "object" } }, - "description": "Tool for searching webpages using Firecrawl. To run this tool, you need to have a Firecrawl API key.\n\nArgs:\n api_key (str): Your Firecrawl API key.\n config (dict): Optional. It contains Firecrawl API parameters.\n\nDefault configuration options:\n limit (int): Maximum number of pages to crawl. Default: 5\n tbs (str): Time before search. Default: None\n lang (str): Language. Default: \"en\"\n country (str): Country. Default: \"us\"\n location (str): Location. Default: None\n timeout (int): Timeout in milliseconds. Default: 60000", + "description": "Tool for searching webpages using Firecrawl v2 API. To run this tool, you need to have a Firecrawl API key.\n\nArgs:\n api_key (str): Your Firecrawl API key.\n config (dict): Optional. It contains Firecrawl v2 API parameters.\n\nDefault configuration options (Firecrawl v2 API):\n limit (int): Maximum number of search results to return. Default: 5\n tbs (str): Time-based search filter (e.g., \"qdr:d\" for past day). Default: None\n location (str): Location for search results. Default: None\n timeout (int): Request timeout in milliseconds. Default: None\n scrape_options (dict): Options for scraping the search results. Default: {\"formats\": [\"markdown\"]}\n - formats (list[str]): Content formats to return. Default: [\"markdown\"]\n - only_main_content (bool): Only return main content. Default: True\n - include_tags (list[str]): Tags to include. Default: []\n - exclude_tags (list[str]): Tags to exclude. Default: []\n - wait_for (int): Delay before fetching content in ms. Default: 0\n - timeout (int): Request timeout in milliseconds. Default: None", "properties": { "api_key": { "anyOf": [ @@ -3195,13 +7055,13 @@ "env_vars": [ { "default": null, - "description": "Personal Access Token for CrewAI AMP API", + "description": "Personal Access Token for CrewAI Enterprise API", "name": "CREWAI_PERSONAL_ACCESS_TOKEN", "required": true }, { "default": null, - "description": "Base URL for CrewAI AMP API", + "description": "Base URL for CrewAI Enterprise API", "name": "CREWAI_PLUS_URL", "required": false } @@ -3304,10 +7164,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -3342,24 +7361,809 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." }, "content_types": { "description": "Content types you want to be included search, options: [code, repo, pr, issue]", @@ -3373,6 +8177,16 @@ "title": "Gh Token", "type": "string" }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" + }, "summarize": { "default": false, "title": "Summarize", @@ -3580,7 +8394,7 @@ "type": "object" } }, - "description": "A CrewAI tool for invoking external crew/flows APIs.\n\nThis tool provides CrewAI Platform API integration with external crew services, supporting:\n- Dynamic input schema configuration\n- Automatic polling for task completion\n- Bearer token authentication\n- Comprehensive error handling\n\nExample:\n Basic usage:\n >>> tool = InvokeCrewAIAutomationTool(\n ... crew_api_url=\"https://api.example.com\",\n ... crew_bearer_token=\"your_token\",\n ... crew_name=\"My Crew\",\n ... crew_description=\"Description of what the crew does\"\n ... )\n \n With custom inputs:\n >>> custom_inputs = {\n ... \"param1\": Field(..., description=\"Description of param1\"),\n ... \"param2\": Field(default=\"default_value\", description=\"Description of param2\")\n ... }\n >>> tool = InvokeCrewAIAutomationTool(\n ... crew_api_url=\"https://api.example.com\",\n ... crew_bearer_token=\"your_token\",\n ... crew_name=\"My Crew\",\n ... crew_description=\"Description of what the crew does\",\n ... crew_inputs=custom_inputs\n ... )\n \n Example:\n >>> tools=[\n ... InvokeCrewAIAutomationTool(\n ... crew_api_url=\"https://canary-crew-[...].crewai.com\",\n ... crew_bearer_token=\"[Your token: abcdef012345]\",\n ... crew_name=\"State of AI Report\",\n ... crew_description=\"Retrieves a report on state of AI for a given year.\",\n ... crew_inputs={\n ... \"year\": Field(..., description=\"Year to retrieve the report for (integer)\")\n ... }\n ... )\n ... ]", + "description": "A CrewAI tool for invoking external crew/flows APIs.\n\nThis tool provides CrewAI Platform API integration with external crew services, supporting:\n- Dynamic input schema configuration\n- Automatic polling for task completion\n- Bearer token authentication\n- Comprehensive error handling\n\nExample:\n Basic usage:\n >>> tool = InvokeCrewAIAutomationTool(\n ... crew_api_url=\"https://api.example.com\",\n ... crew_bearer_token=\"your_token\",\n ... crew_name=\"My Crew\",\n ... crew_description=\"Description of what the crew does\",\n ... )\n\n With custom inputs:\n >>> custom_inputs = {\n ... \"param1\": Field(..., description=\"Description of param1\"),\n ... \"param2\": Field(\n ... default=\"default_value\", description=\"Description of param2\"\n ... ),\n ... }\n >>> tool = InvokeCrewAIAutomationTool(\n ... crew_api_url=\"https://api.example.com\",\n ... crew_bearer_token=\"your_token\",\n ... crew_name=\"My Crew\",\n ... crew_description=\"Description of what the crew does\",\n ... crew_inputs=custom_inputs,\n ... )\n\nExample:\n >>> tools = [\n ... InvokeCrewAIAutomationTool(\n ... crew_api_url=\"https://canary-crew-[...].crewai.com\",\n ... crew_bearer_token=\"[Your token: abcdef012345]\",\n ... crew_name=\"State of AI Report\",\n ... crew_description=\"Retrieves a report on state of AI for a given year.\",\n ... crew_inputs={\n ... \"year\": Field(\n ... ..., description=\"Year to retrieve the report for (integer)\"\n ... )\n ... },\n ... )\n ... ]", "properties": { "crew_api_url": { "title": "Crew Api Url", @@ -3628,10 +8442,1056 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, + "EnvVar": { + "properties": { + "default": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Default" + }, + "description": { + "title": "Description", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "required": { + "default": true, + "title": "Required", + "type": "boolean" + } + }, + "required": [ + "name", + "description" + ], + "title": "EnvVar", + "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" + } + }, + "properties": { + "adapter": { + "$ref": "#/$defs/Adapter" + }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, + "config": { + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" + }, + "summarize": { + "default": false, + "title": "Summarize", + "type": "boolean" + } + }, + "title": "JSONSearchTool", + "type": "object" + }, + "name": "JSONSearchTool", + "package_dependencies": [], + "run_params_schema": { + "description": "Input for JSONSearchTool.", + "properties": { + "json_path": { + "description": "File path or URL of a JSON file to be searched", + "title": "Json Path", + "type": "string" + }, + "search_query": { + "description": "Mandatory search query you want to use to search the JSON's content", + "title": "Search Query", + "type": "string" + } + }, + "required": [ + "search_query", + "json_path" + ], + "title": "JSONSearchToolSchema", + "type": "object" + } + }, + { + "description": "A tool that can be used to read a website content using Jina.ai reader and return markdown content.", + "env_vars": [], + "humanized_name": "JinaScrapeWebsiteTool", + "init_params_schema": { + "$defs": { "EnvVar": { "properties": { "default": { @@ -3669,52 +9529,54 @@ } }, "properties": { - "adapter": { - "$ref": "#/$defs/Adapter" - }, - "config": { + "api_key": { "anyOf": [ { - "additionalProperties": true, - "type": "object" + "type": "string" }, { "type": "null" } ], "default": null, - "title": "Config" + "title": "Api Key" }, - "summarize": { - "default": false, - "title": "Summarize", - "type": "boolean" + "headers": { + "additionalProperties": true, + "title": "Headers", + "type": "object" + }, + "website_url": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Website Url" } }, - "title": "JSONSearchTool", + "title": "JinaScrapeWebsiteTool", "type": "object" }, - "name": "JSONSearchTool", + "name": "JinaScrapeWebsiteTool", "package_dependencies": [], "run_params_schema": { - "description": "Input for JSONSearchTool.", + "description": "Input schema for JinaScrapeWebsiteTool.", "properties": { - "json_path": { - "description": "Mandatory json path you want to search", - "title": "Json Path", - "type": "string" - }, - "search_query": { - "description": "Mandatory search query you want to use to search the JSON's content", - "title": "Search Query", + "website_url": { + "description": "Mandatory website url to read the file", + "title": "Website Url", "type": "string" } }, "required": [ - "search_query", - "json_path" + "website_url" ], - "title": "JSONSearchToolSchema", + "title": "JinaScrapeWebsiteToolInput", "type": "object" } }, @@ -3775,7 +9637,11 @@ "package_dependencies": [ "linkup-sdk" ], - "run_params_schema": {} + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } }, { "description": "", @@ -3835,7 +9701,11 @@ }, "name": "LlamaIndexTool", "package_dependencies": [], - "run_params_schema": {} + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } }, { "description": "A tool that can be used to semantic search a query from a MDX's content.", @@ -3844,10 +9714,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -3882,24 +9911,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -3916,7 +10740,7 @@ "description": "Input for MDXSearchTool.", "properties": { "mdx": { - "description": "Mandatory mdx path you want to search", + "description": "File path or URL of a MDX file to be searched", "title": "Mdx", "type": "string" }, @@ -3934,6 +10758,110 @@ "type": "object" } }, + { + "description": "", + "env_vars": [ + { + "default": null, + "description": "Production API key for Agent Handler services", + "name": "AGENT_HANDLER_API_KEY", + "required": true + } + ], + "humanized_name": "MergeAgentHandlerTool", + "init_params_schema": { + "$defs": { + "EnvVar": { + "properties": { + "default": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Default" + }, + "description": { + "title": "Description", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "required": { + "default": true, + "title": "Required", + "type": "boolean" + } + }, + "required": [ + "name", + "description" + ], + "title": "EnvVar", + "type": "object" + } + }, + "description": "Wrapper for Merge Agent Handler tools.\n\nThis tool allows CrewAI agents to execute tools from Merge Agent Handler,\nwhich provides secure access to third-party integrations via the Model Context Protocol (MCP).\n\nAgent Handler manages authentication, permissions, and monitoring of all tool interactions.", + "properties": { + "base_url": { + "default": "https://ah-api.merge.dev", + "description": "Base URL for Agent Handler API", + "title": "Base Url", + "type": "string" + }, + "registered_user_id": { + "description": "UUID or origin_id of the registered user", + "title": "Registered User Id", + "type": "string" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "MCP session ID (generated if not provided)", + "title": "Session Id" + }, + "tool_name": { + "description": "Name of the specific tool to execute", + "title": "Tool Name", + "type": "string" + }, + "tool_pack_id": { + "description": "UUID of the Agent Handler Tool Pack to use", + "title": "Tool Pack Id", + "type": "string" + } + }, + "required": [ + "name", + "description", + "tool_pack_id", + "registered_user_id", + "tool_name" + ], + "title": "MergeAgentHandlerTool", + "type": "object" + }, + "name": "MergeAgentHandlerTool", + "package_dependencies": [], + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } + }, { "description": "A tool to perfrom a vector search on a MongoDB database for relevant information on internal documents.", "env_vars": [ @@ -4052,7 +10980,7 @@ "type": "object" } }, - "description": "Tool to perfrom a vector search the MongoDB database", + "description": "Tool to perfrom a vector search the MongoDB database.", "properties": { "collection_name": { "description": "The name of the MongoDB collection", @@ -4231,7 +11159,11 @@ "package_dependencies": [ "multion" ], - "run_params_schema": {} + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } }, { "description": "A tool that can be used to semantic search a query from a database table's content.", @@ -4240,10 +11172,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -4278,30 +11369,825 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." }, "db_uri": { "description": "Mandatory database URI", "title": "Db Uri", "type": "string" }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" + }, "summarize": { "default": false, "title": "Summarize", @@ -4377,7 +12263,6 @@ "properties": { "columns": { "additionalProperties": true, - "default": {}, "title": "Columns", "type": "object" }, @@ -4387,7 +12272,6 @@ "type": "string" }, "tables": { - "default": [], "items": {}, "title": "Tables", "type": "array" @@ -4469,11 +12353,14 @@ "description": "Input schema for Optical Character Recognition Tool.\n\nAttributes:\n image_path_url (str): Path to a local image file or URL of an image.\n For local files, provide the absolute or relative path.\n For remote images, provide the complete URL starting with 'http' or 'https'.", "properties": { "image_path_url": { - "default": "The image path or URL.", + "description": "The image path or URL.", "title": "Image Path Url", "type": "string" } }, + "required": [ + "image_path_url" + ], "title": "OCRToolSchema", "type": "object" } @@ -4533,7 +12420,7 @@ "type": "object" }, "OxylabsAmazonProductScraperConfig": { - "description": "Amazon Product Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/targets/amazon/product", + "description": "Amazon Product Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/targets/amazon/product.", "properties": { "callback_url": { "anyOf": [ @@ -4736,7 +12623,7 @@ "type": "object" }, "OxylabsAmazonSearchScraperConfig": { - "description": "Amazon Search Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/targets/amazon/search", + "description": "Amazon Search Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/targets/amazon/search.", "properties": { "callback_url": { "anyOf": [ @@ -4965,7 +12852,7 @@ "type": "object" }, "OxylabsGoogleSearchScraperConfig": { - "description": "Google Search Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/targets/google/search/search", + "description": "Google Search Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/targets/google/search/search.", "properties": { "callback_url": { "anyOf": [ @@ -5207,7 +13094,7 @@ "type": "object" }, "OxylabsUniversalScraperConfig": { - "description": "Universal Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/other-websites", + "description": "Universal Scraper configuration options:\nhttps://developers.oxylabs.io/scraper-apis/web-scraper-api/other-websites.", "properties": { "callback_url": { "anyOf": [ @@ -5349,10 +13236,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -5387,24 +13433,831 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "pdf": { "anyOf": [ { - "additionalProperties": true, - "type": "object" + "type": "string" }, { "type": "null" } ], "default": null, - "title": "Config" + "title": "Pdf" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -5421,7 +14274,7 @@ "description": "Input for PDFSearchTool.", "properties": { "pdf": { - "description": "Mandatory pdf path you want to search", + "description": "File path or URL of a PDF file to be searched", "title": "Pdf", "type": "string" }, @@ -5630,7 +14483,6 @@ }, "properties": { "criteria": { - "default": [], "items": { "additionalProperties": { "type": "string" @@ -5646,7 +14498,6 @@ "type": "string" }, "evaluators": { - "default": [], "items": { "additionalProperties": { "type": "string" @@ -5662,7 +14513,11 @@ }, "name": "PatronusEvalTool", "package_dependencies": [], - "run_params_schema": {} + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } }, { "description": "This tool calls the Patronus Evaluation API that takes the following arguments:", @@ -5714,7 +14569,6 @@ "type": "string" }, "evaluators": { - "default": [], "items": { "additionalProperties": { "type": "string" @@ -5780,8 +14634,15 @@ } }, { - "description": "A tool to search the Qdrant database for relevant information on internal documents.", - "env_vars": [], + "description": "Search Qdrant vector DB for relevant documents.", + "env_vars": [ + { + "default": null, + "description": "API key for OpenAI", + "name": "OPENAI_API_KEY", + "required": true + } + ], "humanized_name": "QdrantVectorSearchTool", "init_params_schema": { "$defs": { @@ -5819,59 +14680,73 @@ ], "title": "EnvVar", "type": "object" - } - }, - "description": "Tool to query and filter results from a Qdrant database.\n\nThis tool enables vector similarity search on internal documents stored in Qdrant,\nwith optional filtering capabilities.\n\nAttributes:\n client: Configured QdrantClient instance\n collection_name: Name of the Qdrant collection to search\n limit: Maximum number of results to return\n score_threshold: Minimum similarity score threshold\n qdrant_url: Qdrant server URL\n qdrant_api_key: Authentication key for Qdrant", - "properties": { - "collection_name": { - "anyOf": [ - { + }, + "QdrantConfig": { + "description": "All Qdrant connection and search settings.", + "properties": { + "collection_name": { + "title": "Collection Name", "type": "string" }, - { - "type": "null" - } - ], - "default": null, - "title": "Collection Name" - }, - "filter_by": { - "anyOf": [ - { - "type": "string" + "filter": { + "anyOf": [ + {}, + { + "type": "null" + } + ], + "default": null, + "description": "Qdrant Filter instance for advanced filtering.", + "title": "Filter" }, - { - "type": "null" - } - ], - "default": null, - "title": "Filter By" - }, - "filter_value": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Filter Value" - }, - "limit": { - "anyOf": [ - { + "limit": { + "default": 3, + "title": "Limit", "type": "integer" }, + "qdrant_api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Qdrant Api Key" + }, + "qdrant_url": { + "title": "Qdrant Url", + "type": "string" + }, + "score_threshold": { + "default": 0.35, + "title": "Score Threshold", + "type": "number" + } + }, + "required": [ + "qdrant_url", + "collection_name" + ], + "title": "QdrantConfig", + "type": "object" + } + }, + "description": "Vector search tool for Qdrant.", + "properties": { + "client": { + "anyOf": [ + {}, { "type": "null" } ], - "default": 3, - "title": "Limit" + "default": null, + "title": "Client" }, - "qdrant_api_key": { + "custom_embedding_fn": { "anyOf": [ { "type": "string" @@ -5881,34 +14756,21 @@ } ], "default": null, - "description": "The API key for the Qdrant server", - "title": "Qdrant Api Key" + "description": "Optional embedding function or import path.", + "title": "Custom Embedding Fn" }, - "qdrant_url": { - "description": "The URL of the Qdrant server", - "title": "Qdrant Url", + "qdrant_config": { + "$ref": "#/$defs/QdrantConfig" + }, + "qdrant_package": { + "default": "qdrant_client", + "description": "Base package path for Qdrant. Will dynamically import client and models.", + "title": "Qdrant Package", "type": "string" - }, - "query": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Query" - }, - "score_threshold": { - "default": 0.35, - "title": "Score Threshold", - "type": "number" } }, "required": [ - "qdrant_url" + "qdrant_config" ], "title": "QdrantVectorSearchTool", "type": "object" @@ -5918,7 +14780,6 @@ "qdrant-client" ], "run_params_schema": { - "description": "Input for QdrantTool.", "properties": { "filter_by": { "anyOf": [ @@ -5930,24 +14791,22 @@ } ], "default": null, - "description": "Filter by properties. Pass only the properties, not the question.", + "description": "Parameter to filter the search by. When filtering, needs to be used in conjunction with filter_value.", "title": "Filter By" }, "filter_value": { "anyOf": [ - { - "type": "string" - }, + {}, { "type": "null" } ], "default": null, - "description": "Filter by value. Pass only the value, not the question.", + "description": "Value to filter the search by. When filtering, needs to be used in conjunction with filter_by.", "title": "Filter Value" }, "query": { - "description": "The query to search retrieve relevant information from the Qdrant database. Pass only the query, not the question.", + "description": "Query to search in Qdrant DB - always required.", "title": "Query", "type": "string" } @@ -5966,10 +14825,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -6004,24 +15022,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -6034,7 +15847,11 @@ }, "name": "RagTool", "package_dependencies": [], - "run_params_schema": {} + "run_params_schema": { + "properties": {}, + "title": "_ArgsSchemaPlaceholder", + "type": "object" + } }, { "description": "A tool that can be used to read a website content.", @@ -6114,15 +15931,6 @@ "type": "null" } ], - "default": { - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US,en;q=0.9", - "Connection": "keep-alive", - "Referer": "https://www.google.com/", - "Upgrade-Insecure-Requests": "1", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" - }, "title": "Headers" }, "website_url": { @@ -6231,14 +16039,6 @@ "type": "null" } ], - "default": { - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", - "Accept-Language": "en-US,en;q=0.9", - "Connection": "keep-alive", - "Referer": "https://www.google.com/", - "Upgrade-Insecure-Requests": "1", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" - }, "title": "Headers" }, "website_url": { @@ -6448,9 +16248,16 @@ }, "properties": { "api_key": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "default": null, - "title": "Api Key", - "type": "string" + "title": "Api Key" }, "scrapfly": { "anyOf": [ @@ -7088,10 +16895,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -7126,24 +17092,809 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." }, "headers": { "anyOf": [ @@ -7155,9 +17906,13 @@ "type": "null" } ], - "default": {}, "title": "Headers" }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, "proxy_location": { "anyOf": [ { @@ -7175,6 +17930,11 @@ "title": "Request Url", "type": "string" }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" + }, "summarize": { "default": false, "title": "Summarize", @@ -7262,7 +18022,6 @@ "type": "null" } ], - "default": {}, "title": "Headers" }, "limit": { @@ -7376,7 +18135,6 @@ "type": "null" } ], - "default": {}, "title": "Headers" }, "hl": { @@ -7502,7 +18260,6 @@ "type": "null" } ], - "default": {}, "title": "Headers" }, "hl": { @@ -7551,7 +18308,6 @@ "type": "null" } ], - "default": {}, "title": "Query Payload" }, "search_url": { @@ -7595,10 +18351,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -7633,55 +18548,850 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." }, "headers": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": {}, - "title": "Headers" + "additionalProperties": true, + "title": "Headers", + "type": "object" + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" }, "proxy_location": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], "default": "US", - "title": "Proxy Location" + "enum": [ + "US", + "CA", + "IE", + "GB", + "FR", + "DE", + "SE", + "IN", + "JP", + "KR", + "SG", + "AU", + "BR" + ], + "title": "Proxy Location", + "type": "string" }, "request_url": { "default": "https://api.serply.io/v1/request", "title": "Request Url", "type": "string" }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" + }, "summarize": { "default": false, "title": "Summarize", @@ -7816,7 +19526,6 @@ "properties": { "connection_args": { "additionalProperties": true, - "default": {}, "title": "Connection Args", "type": "object" }, @@ -8279,22 +19988,23 @@ }, { "description": "Use this tool to control a web browser and interact with websites using natural language.\n\n Capabilities:\n - Navigate to websites and follow links\n - Click buttons, links, and other elements\n - Fill in forms and input fields\n - Search within websites\n - Extract information from web pages\n - Identify and analyze elements on a page\n\n To use this tool, provide a natural language instruction describing what you want to do.\n For reliability on complex pages, use specific, atomic instructions with location hints:\n - Good: \"Click the search box in the header\"\n - Good: \"Type 'Italy' in the focused field\"\n - Bad: \"Search for Italy and click the first result\"\n\n For different types of tasks, specify the command_type:\n - 'act': For performing one atomic action (default)\n - 'navigate': For navigating to a URL\n - 'extract': For getting data from a specific page section\n - 'observe': For finding elements in a specific area", - "env_vars": [], + "env_vars": [ + { + "default": null, + "description": "API key for Browserbase services", + "name": "BROWSERBASE_API_KEY", + "required": false + }, + { + "default": null, + "description": "Project ID for Browserbase services", + "name": "BROWSERBASE_PROJECT_ID", + "required": false + } + ], "humanized_name": "Web Automation Tool", "init_params_schema": { "$defs": { - "AvailableModel": { - "enum": [ - "gpt-4o", - "gpt-4o-mini", - "claude-3-5-sonnet-latest", - "claude-3-7-sonnet-latest", - "computer-use-preview", - "gemini-2.0-flash" - ], - "title": "AvailableModel", - "type": "string" - }, "EnvVar": { "properties": { "default": { @@ -8372,17 +20082,6 @@ "default": null, "title": "Model Api Key" }, - "model_name": { - "anyOf": [ - { - "$ref": "#/$defs/AvailableModel" - }, - { - "type": "null" - } - ], - "default": "claude-3-7-sonnet-latest" - }, "project_id": { "anyOf": [ { @@ -8432,7 +20131,9 @@ "type": "object" }, "name": "StagehandTool", - "package_dependencies": [], + "package_dependencies": [ + "stagehand<=0.5.9" + ], "run_params_schema": { "description": "Input for StagehandTool.", "properties": { @@ -8487,10 +20188,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -8525,29 +20385,836 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" + }, + "summarize": { + "default": false, + "title": "Summarize", + "type": "boolean" + }, + "txt": { "anyOf": [ { - "additionalProperties": true, - "type": "object" + "type": "string" }, { "type": "null" } ], "default": null, - "title": "Config" - }, - "summarize": { - "default": false, - "title": "Summarize", - "type": "boolean" + "title": "Txt" } }, "title": "TXTSearchTool", @@ -8564,7 +21231,7 @@ "type": "string" }, "txt": { - "description": "Mandatory txt path you want to search", + "description": "File path or URL of a TXT file to be searched", "title": "Txt", "type": "string" } @@ -9097,42 +21764,19 @@ "type": "object" } }, - "description": "Tool to search the Weaviate database", + "description": "Tool to search the Weaviate database.", "properties": { "alpha": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], "default": 0.75, - "title": "Alpha" + "title": "Alpha", + "type": "number" }, "collection_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Collection Name" + "description": "The name of the Weaviate collection to search", + "title": "Collection Name", + "type": "string" }, "generative_model": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, "title": "Generative Model" }, "headers": { @@ -9173,13 +21817,6 @@ "title": "Query" }, "vectorizer": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "default": null, "title": "Vectorizer" }, "weaviate_api_key": { @@ -9194,6 +21831,7 @@ } }, "required": [ + "collection_name", "weaviate_cluster_url", "weaviate_api_key" ], @@ -9227,10 +21865,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -9265,24 +22062,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -9324,10 +22916,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -9362,24 +23113,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -9401,7 +23947,7 @@ "type": "string" }, "xml": { - "description": "Mandatory xml path you want to search", + "description": "File path or URL of a XML file to be searched", "title": "Xml", "type": "string" } @@ -9421,10 +23967,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -9459,24 +24164,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -9518,10 +25018,169 @@ "init_params_schema": { "$defs": { "Adapter": { + "description": "Abstract base class for RAG adapters.", "properties": {}, "title": "Adapter", "type": "object" }, + "AzureProviderConfig": { + "description": "Configuration for Azure provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "required": [ + "deployment_id" + ], + "title": "AzureProviderConfig", + "type": "object" + }, + "AzureProviderSpec": { + "description": "Azure provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/AzureProviderConfig" + }, + "provider": { + "const": "azure", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "AzureProviderSpec", + "type": "object" + }, + "BedrockProviderConfig": { + "description": "Configuration for Bedrock provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "session": { + "title": "Session" + } + }, + "title": "BedrockProviderConfig", + "type": "object" + }, + "BedrockProviderSpec": { + "description": "Bedrock provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/BedrockProviderConfig" + }, + "provider": { + "const": "amazon-bedrock", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "BedrockProviderSpec", + "type": "object" + }, + "CohereProviderConfig": { + "description": "Configuration for Cohere provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "CohereProviderConfig", + "type": "object" + }, + "CohereProviderSpec": { + "description": "Cohere provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CohereProviderConfig" + }, + "provider": { + "const": "cohere", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CohereProviderSpec", + "type": "object" + }, + "CustomProviderConfig": { + "description": "Configuration for Custom provider.", + "properties": { + "embedding_callable": { + "title": "Embedding Callable" + } + }, + "title": "CustomProviderConfig", + "type": "object" + }, + "CustomProviderSpec": { + "description": "Custom provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/CustomProviderConfig" + }, + "provider": { + "const": "custom", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "CustomProviderSpec", + "type": "object" + }, "EnvVar": { "properties": { "default": { @@ -9556,24 +25215,819 @@ ], "title": "EnvVar", "type": "object" + }, + "GenerativeAiProviderConfig": { + "description": "Configuration for Google Generative AI provider.\n\nAttributes:\n api_key: Google API key for authentication.\n model_name: Embedding model name.\n task_type: Task type for embeddings. Default is \"RETRIEVAL_DOCUMENT\".", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "enum": [ + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "GenerativeAiProviderConfig", + "type": "object" + }, + "GenerativeAiProviderSpec": { + "description": "Google Generative AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/GenerativeAiProviderConfig" + }, + "provider": { + "const": "google-generativeai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "GenerativeAiProviderSpec", + "type": "object" + }, + "HuggingFaceProviderConfig": { + "description": "Configuration for HuggingFace provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model": { + "title": "Model", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "HuggingFaceProviderConfig", + "type": "object" + }, + "HuggingFaceProviderSpec": { + "description": "HuggingFace provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/HuggingFaceProviderConfig" + }, + "provider": { + "const": "huggingface", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "HuggingFaceProviderSpec", + "type": "object" + }, + "InstructorProviderConfig": { + "description": "Configuration for Instructor provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "instruction": { + "title": "Instruction", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "InstructorProviderConfig", + "type": "object" + }, + "InstructorProviderSpec": { + "description": "Instructor provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/InstructorProviderConfig" + }, + "provider": { + "const": "instructor", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "InstructorProviderSpec", + "type": "object" + }, + "JinaProviderConfig": { + "description": "Configuration for Jina provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "JinaProviderConfig", + "type": "object" + }, + "JinaProviderSpec": { + "description": "Jina provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/JinaProviderConfig" + }, + "provider": { + "const": "jina", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "JinaProviderSpec", + "type": "object" + }, + "ONNXProviderConfig": { + "description": "Configuration for ONNX provider.", + "properties": { + "preferred_providers": { + "items": { + "type": "string" + }, + "title": "Preferred Providers", + "type": "array" + } + }, + "title": "ONNXProviderConfig", + "type": "object" + }, + "ONNXProviderSpec": { + "description": "ONNX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/ONNXProviderConfig" + }, + "provider": { + "const": "onnx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "ONNXProviderSpec", + "type": "object" + }, + "OllamaProviderConfig": { + "description": "Configuration for Ollama provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + } + }, + "title": "OllamaProviderConfig", + "type": "object" + }, + "OllamaProviderSpec": { + "description": "Ollama provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OllamaProviderConfig" + }, + "provider": { + "const": "ollama", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OllamaProviderSpec", + "type": "object" + }, + "OpenAIProviderConfig": { + "description": "Configuration for OpenAI provider.", + "properties": { + "api_base": { + "title": "Api Base", + "type": "string" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_type": { + "title": "Api Type", + "type": "string" + }, + "api_version": { + "title": "Api Version", + "type": "string" + }, + "default_headers": { + "additionalProperties": true, + "title": "Default Headers", + "type": "object" + }, + "deployment_id": { + "title": "Deployment Id", + "type": "string" + }, + "dimensions": { + "title": "Dimensions", + "type": "integer" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "organization_id": { + "title": "Organization Id", + "type": "string" + } + }, + "title": "OpenAIProviderConfig", + "type": "object" + }, + "OpenAIProviderSpec": { + "description": "OpenAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenAIProviderConfig" + }, + "provider": { + "const": "openai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "OpenAIProviderSpec", + "type": "object" + }, + "OpenCLIPProviderConfig": { + "description": "Configuration for OpenCLIP provider.", + "properties": { + "checkpoint": { + "title": "Checkpoint", + "type": "string" + }, + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "OpenCLIPProviderConfig", + "type": "object" + }, + "OpenCLIPProviderSpec": { + "description": "OpenCLIP provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/OpenCLIPProviderConfig" + }, + "provider": { + "const": "openclip", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "OpenCLIPProviderSpec", + "type": "object" + }, + "RagToolConfig": { + "description": "Configuration accepted by RAG tools.\n\nSupports embedding model and vector database configuration.\n\nAttributes:\n embedding_model: Embedding model configuration accepted by RAG tools.\n vectordb: Vector database configuration accepted by RAG tools.", + "properties": { + "embedding_model": { + "anyOf": [ + { + "$ref": "#/$defs/AzureProviderSpec" + }, + { + "$ref": "#/$defs/BedrockProviderSpec" + }, + { + "$ref": "#/$defs/CohereProviderSpec" + }, + { + "$ref": "#/$defs/CustomProviderSpec" + }, + { + "$ref": "#/$defs/GenerativeAiProviderSpec" + }, + { + "$ref": "#/$defs/HuggingFaceProviderSpec" + }, + { + "$ref": "#/$defs/InstructorProviderSpec" + }, + { + "$ref": "#/$defs/JinaProviderSpec" + }, + { + "$ref": "#/$defs/OllamaProviderSpec" + }, + { + "$ref": "#/$defs/ONNXProviderSpec" + }, + { + "$ref": "#/$defs/OpenAIProviderSpec" + }, + { + "$ref": "#/$defs/OpenCLIPProviderSpec" + }, + { + "$ref": "#/$defs/RoboflowProviderSpec" + }, + { + "$ref": "#/$defs/SentenceTransformerProviderSpec" + }, + { + "$ref": "#/$defs/Text2VecProviderSpec" + }, + { + "$ref": "#/$defs/VertexAIProviderSpec" + }, + { + "$ref": "#/$defs/VoyageAIProviderSpec" + }, + { + "$ref": "#/$defs/WatsonXProviderSpec" + } + ], + "title": "Embedding Model" + }, + "vectordb": { + "$ref": "#/$defs/VectorDbConfig" + } + }, + "title": "RagToolConfig", + "type": "object" + }, + "RoboflowProviderConfig": { + "description": "Configuration for Roboflow provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "api_url": { + "title": "Api Url", + "type": "string" + } + }, + "title": "RoboflowProviderConfig", + "type": "object" + }, + "RoboflowProviderSpec": { + "description": "Roboflow provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/RoboflowProviderConfig" + }, + "provider": { + "const": "roboflow", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "RoboflowProviderSpec", + "type": "object" + }, + "SentenceTransformerProviderConfig": { + "description": "Configuration for SentenceTransformer provider.", + "properties": { + "device": { + "title": "Device", + "type": "string" + }, + "model_name": { + "title": "Model Name", + "type": "string" + }, + "normalize_embeddings": { + "title": "Normalize Embeddings", + "type": "boolean" + } + }, + "title": "SentenceTransformerProviderConfig", + "type": "object" + }, + "SentenceTransformerProviderSpec": { + "description": "SentenceTransformer provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/SentenceTransformerProviderConfig" + }, + "provider": { + "const": "sentence-transformer", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "SentenceTransformerProviderSpec", + "type": "object" + }, + "Text2VecProviderConfig": { + "description": "Configuration for Text2Vec provider.", + "properties": { + "model_name": { + "title": "Model Name", + "type": "string" + } + }, + "title": "Text2VecProviderConfig", + "type": "object" + }, + "Text2VecProviderSpec": { + "description": "Text2Vec provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/Text2VecProviderConfig" + }, + "provider": { + "const": "text2vec", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "Text2VecProviderSpec", + "type": "object" + }, + "VectorDbConfig": { + "description": "Configuration for vector database provider.\n\nAttributes:\n provider: RAG provider literal.\n config: RAG configuration options.", + "properties": { + "config": { + "additionalProperties": true, + "title": "Config", + "type": "object" + }, + "provider": { + "enum": [ + "chromadb", + "qdrant" + ], + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VectorDbConfig", + "type": "object" + }, + "VertexAIProviderConfig": { + "description": "Configuration for Vertex AI provider with dual SDK support.\n\nSupports both legacy models (textembedding-gecko*) using the deprecated\nvertexai.language_models SDK and new models using google-genai SDK.\n\nAttributes:\n api_key: Google API key (optional if using project_id with ADC). Only for new SDK models.\n model_name: Embedding model name (default: \"textembedding-gecko\").\n Legacy models: textembedding-gecko, textembedding-gecko@001, etc.\n New models: gemini-embedding-001, text-embedding-005, text-multilingual-embedding-002\n project_id: GCP project ID (required for Vertex AI backend and legacy models).\n location: GCP region/location (default: \"us-central1\").\n region: Deprecated alias for location (kept for backwards compatibility).\n task_type: Task type for embeddings (default: \"RETRIEVAL_DOCUMENT\"). Only for new SDK models.\n output_dimensionality: Output embedding dimension (optional). Only for new SDK models.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "location": { + "title": "Location", + "type": "string" + }, + "model_name": { + "enum": [ + "textembedding-gecko", + "textembedding-gecko@001", + "textembedding-gecko@002", + "textembedding-gecko@003", + "textembedding-gecko@latest", + "textembedding-gecko-multilingual", + "textembedding-gecko-multilingual@001", + "textembedding-gecko-multilingual@latest", + "gemini-embedding-001", + "text-embedding-005", + "text-multilingual-embedding-002" + ], + "title": "Model Name", + "type": "string" + }, + "output_dimensionality": { + "title": "Output Dimensionality", + "type": "integer" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "region": { + "title": "Region", + "type": "string" + }, + "task_type": { + "title": "Task Type", + "type": "string" + } + }, + "title": "VertexAIProviderConfig", + "type": "object" + }, + "VertexAIProviderSpec": { + "description": "Vertex AI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VertexAIProviderConfig" + }, + "provider": { + "const": "google-vertex", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "VertexAIProviderSpec", + "type": "object" + }, + "VoyageAIProviderConfig": { + "description": "Configuration for VoyageAI provider.", + "properties": { + "api_key": { + "title": "Api Key", + "type": "string" + }, + "input_type": { + "title": "Input Type", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model": { + "title": "Model", + "type": "string" + }, + "output_dimension": { + "title": "Output Dimension", + "type": "integer" + }, + "output_dtype": { + "title": "Output Dtype", + "type": "string" + }, + "timeout": { + "title": "Timeout", + "type": "number" + }, + "truncation": { + "title": "Truncation", + "type": "boolean" + } + }, + "title": "VoyageAIProviderConfig", + "type": "object" + }, + "VoyageAIProviderSpec": { + "description": "VoyageAI provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/VoyageAIProviderConfig" + }, + "provider": { + "const": "voyageai", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider", + "config" + ], + "title": "VoyageAIProviderSpec", + "type": "object" + }, + "WatsonXProviderConfig": { + "description": "Configuration for WatsonX provider.", + "properties": { + "api_client": { + "title": "Api Client" + }, + "api_key": { + "title": "Api Key", + "type": "string" + }, + "batch_size": { + "title": "Batch Size", + "type": "integer" + }, + "bedrock_url": { + "title": "Bedrock Url", + "type": "string" + }, + "concurrency_limit": { + "title": "Concurrency Limit", + "type": "integer" + }, + "credentials": { + "title": "Credentials" + }, + "delay_time": { + "title": "Delay Time", + "type": "number" + }, + "iam_serviceid_crn": { + "title": "Iam Serviceid Crn", + "type": "string" + }, + "instance_id": { + "title": "Instance Id", + "type": "string" + }, + "max_retries": { + "title": "Max Retries", + "type": "integer" + }, + "model_id": { + "title": "Model Id", + "type": "string" + }, + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "additionalProperties": { + "anyOf": [ + { + "type": "string" + }, + { + "additionalProperties": { + "type": "string" + }, + "type": "object" + } + ] + }, + "title": "Params", + "type": "object" + }, + "password": { + "title": "Password", + "type": "string" + }, + "persistent_connection": { + "title": "Persistent Connection", + "type": "boolean" + }, + "platform_url": { + "title": "Platform Url", + "type": "string" + }, + "project_id": { + "title": "Project Id", + "type": "string" + }, + "projects_token": { + "title": "Projects Token", + "type": "string" + }, + "proxies": { + "additionalProperties": true, + "title": "Proxies", + "type": "object" + }, + "retry_status_codes": { + "items": { + "type": "integer" + }, + "title": "Retry Status Codes", + "type": "array" + }, + "space_id": { + "title": "Space Id", + "type": "string" + }, + "token": { + "title": "Token", + "type": "string" + }, + "trusted_profile_id": { + "title": "Trusted Profile Id", + "type": "string" + }, + "url": { + "title": "Url", + "type": "string" + }, + "username": { + "title": "Username", + "type": "string" + }, + "verify": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "string" + } + ], + "title": "Verify" + }, + "version": { + "title": "Version", + "type": "string" + } + }, + "title": "WatsonXProviderConfig", + "type": "object" + }, + "WatsonXProviderSpec": { + "description": "WatsonX provider specification.", + "properties": { + "config": { + "$ref": "#/$defs/WatsonXProviderConfig" + }, + "provider": { + "const": "watsonx", + "title": "Provider", + "type": "string" + } + }, + "required": [ + "provider" + ], + "title": "WatsonXProviderSpec", + "type": "object" } }, "properties": { "adapter": { "$ref": "#/$defs/Adapter" }, + "collection_name": { + "default": "rag_tool_collection", + "title": "Collection Name", + "type": "string" + }, "config": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Config" + "$ref": "#/$defs/RagToolConfig", + "description": "Configuration format accepted by RagTool." + }, + "limit": { + "default": 5, + "title": "Limit", + "type": "integer" + }, + "similarity_threshold": { + "default": 0.6, + "title": "Similarity Threshold", + "type": "number" }, "summarize": { "default": false, @@ -9609,4 +26063,4 @@ } } ] -} +} \ No newline at end of file diff --git a/lib/crewai/pyproject.toml b/lib/crewai/pyproject.toml index ecf171d3f..5ecc0f0bb 100644 --- a/lib/crewai/pyproject.toml +++ b/lib/crewai/pyproject.toml @@ -10,7 +10,7 @@ requires-python = ">=3.10, <3.14" dependencies = [ # Core Dependencies "pydantic~=2.11.9", - "openai~=1.83.0", + "openai>=1.83.0,<3", "instructor>=1.3.3", # Text Processing "pdfplumber~=0.11.4", @@ -78,7 +78,7 @@ voyageai = [ "voyageai~=0.3.5", ] litellm = [ - "litellm~=1.74.9", + "litellm>=1.74.9,<3", ] bedrock = [ "boto3~=1.40.45", diff --git a/lib/crewai/src/crewai/agents/agent_adapters/openai_agents/openai_agent_tool_adapter.py b/lib/crewai/src/crewai/agents/agent_adapters/openai_agents/openai_agent_tool_adapter.py index 6096ee5d0..7543305f0 100644 --- a/lib/crewai/src/crewai/agents/agent_adapters/openai_agents/openai_agent_tool_adapter.py +++ b/lib/crewai/src/crewai/agents/agent_adapters/openai_agents/openai_agent_tool_adapter.py @@ -16,6 +16,7 @@ from crewai.agents.agent_adapters.openai_agents.protocols import ( ) from crewai.tools import BaseTool from crewai.utilities.import_utils import require +from crewai.utilities.pydantic_schema_utils import force_additional_properties_false from crewai.utilities.string_utils import sanitize_tool_name @@ -135,7 +136,9 @@ class OpenAIAgentToolAdapter(BaseToolAdapter): for tool in tools: schema: dict[str, Any] = tool.args_schema.model_json_schema() - schema.update({"additionalProperties": False, "type": "object"}) + schema = force_additional_properties_false(schema) + + schema.update({"type": "object"}) openai_tool: OpenAIFunctionTool = cast( OpenAIFunctionTool, diff --git a/lib/crewai/src/crewai/cli/constants.py b/lib/crewai/src/crewai/cli/constants.py index a3755b1a6..4de0d0082 100644 --- a/lib/crewai/src/crewai/cli/constants.py +++ b/lib/crewai/src/crewai/cli/constants.py @@ -1,10 +1,13 @@ +from typing import Any + + DEFAULT_CREWAI_ENTERPRISE_URL = "https://app.crewai.com" CREWAI_ENTERPRISE_DEFAULT_OAUTH2_PROVIDER = "workos" CREWAI_ENTERPRISE_DEFAULT_OAUTH2_AUDIENCE = "client_01JNJQWBJ4SPFN3SWJM5T7BDG8" CREWAI_ENTERPRISE_DEFAULT_OAUTH2_CLIENT_ID = "client_01JYT06R59SP0NXYGD994NFXXX" CREWAI_ENTERPRISE_DEFAULT_OAUTH2_DOMAIN = "login.crewai.com" -ENV_VARS = { +ENV_VARS: dict[str, list[dict[str, Any]]] = { "openai": [ { "prompt": "Enter your OPENAI API key (press Enter to skip)", @@ -112,7 +115,7 @@ ENV_VARS = { } -PROVIDERS = [ +PROVIDERS: list[str] = [ "openai", "anthropic", "gemini", @@ -127,7 +130,7 @@ PROVIDERS = [ "sambanova", ] -MODELS = { +MODELS: dict[str, list[str]] = { "openai": [ "gpt-4", "gpt-4.1", diff --git a/lib/crewai/src/crewai/cli/create_crew.py b/lib/crewai/src/crewai/cli/create_crew.py index e4d84e8bc..51e2f00ac 100644 --- a/lib/crewai/src/crewai/cli/create_crew.py +++ b/lib/crewai/src/crewai/cli/create_crew.py @@ -3,6 +3,7 @@ import shutil import sys import click +import tomli from crewai.cli.constants import ENV_VARS, MODELS from crewai.cli.provider import ( @@ -13,7 +14,31 @@ from crewai.cli.provider import ( from crewai.cli.utils import copy_template, load_env_vars, write_env_file -def create_folder_structure(name, parent_folder=None): +def get_reserved_script_names() -> set[str]: + """Get reserved script names from pyproject.toml template. + + Returns: + Set of reserved script names that would conflict with crew folder names. + """ + package_dir = Path(__file__).parent + template_path = package_dir / "templates" / "crew" / "pyproject.toml" + + with open(template_path, "r") as f: + template_content = f.read() + + template_content = template_content.replace("{{folder_name}}", "_placeholder_") + template_content = template_content.replace("{{name}}", "placeholder") + template_content = template_content.replace("{{crew_name}}", "Placeholder") + + template_data = tomli.loads(template_content) + script_names = set(template_data.get("project", {}).get("scripts", {}).keys()) + script_names.discard("_placeholder_") + return script_names + + +def create_folder_structure( + name: str, parent_folder: str | None = None +) -> tuple[Path, str, str]: import keyword import re @@ -51,6 +76,14 @@ def create_folder_structure(name, parent_folder=None): f"Project name '{name}' would generate invalid Python module name '{folder_name}'" ) + reserved_names = get_reserved_script_names() + if folder_name in reserved_names: + raise ValueError( + f"Project name '{name}' would generate folder name '{folder_name}' which is reserved. " + f"Reserved names are: {', '.join(sorted(reserved_names))}. " + "Please choose a different name." + ) + class_name = name.replace("_", " ").replace("-", " ").title().replace(" ", "") class_name = re.sub(r"[^a-zA-Z0-9_]", "", class_name) @@ -114,7 +147,9 @@ def create_folder_structure(name, parent_folder=None): return folder_path, folder_name, class_name -def copy_template_files(folder_path, name, class_name, parent_folder): +def copy_template_files( + folder_path: Path, name: str, class_name: str, parent_folder: str | None +) -> None: package_dir = Path(__file__).parent templates_dir = package_dir / "templates" / "crew" @@ -155,7 +190,12 @@ def copy_template_files(folder_path, name, class_name, parent_folder): copy_template(src_file, dst_file, name, class_name, folder_path.name) -def create_crew(name, provider=None, skip_provider=False, parent_folder=None): +def create_crew( + name: str, + provider: str | None = None, + skip_provider: bool = False, + parent_folder: str | None = None, +) -> None: folder_path, folder_name, class_name = create_folder_structure(name, parent_folder) env_vars = load_env_vars(folder_path) if not skip_provider: @@ -189,7 +229,9 @@ def create_crew(name, provider=None, skip_provider=False, parent_folder=None): if selected_provider is None: # User typed 'q' click.secho("Exiting...", fg="yellow") sys.exit(0) - if selected_provider: # Valid selection + if selected_provider and isinstance( + selected_provider, str + ): # Valid selection break click.secho( "No provider selected. Please try again or press 'q' to exit.", fg="red" diff --git a/lib/crewai/src/crewai/cli/provider.py b/lib/crewai/src/crewai/cli/provider.py index ec6edc0cb..6de337b85 100644 --- a/lib/crewai/src/crewai/cli/provider.py +++ b/lib/crewai/src/crewai/cli/provider.py @@ -1,8 +1,10 @@ from collections import defaultdict +from collections.abc import Sequence import json import os from pathlib import Path import time +from typing import Any import certifi import click @@ -11,16 +13,15 @@ import requests from crewai.cli.constants import JSON_URL, MODELS, PROVIDERS -def select_choice(prompt_message, choices): - """ - Presents a list of choices to the user and prompts them to select one. +def select_choice(prompt_message: str, choices: Sequence[str]) -> str | None: + """Presents a list of choices to the user and prompts them to select one. Args: - - prompt_message (str): The message to display to the user before presenting the choices. - - choices (list): A list of options to present to the user. + prompt_message: The message to display to the user before presenting the choices. + choices: A list of options to present to the user. Returns: - - str: The selected choice from the list, or None if the user chooses to quit. + The selected choice from the list, or None if the user chooses to quit. """ provider_models = get_provider_data() @@ -52,16 +53,14 @@ def select_choice(prompt_message, choices): ) -def select_provider(provider_models): - """ - Presents a list of providers to the user and prompts them to select one. +def select_provider(provider_models: dict[str, list[str]]) -> str | None | bool: + """Presents a list of providers to the user and prompts them to select one. Args: - - provider_models (dict): A dictionary of provider models. + provider_models: A dictionary of provider models. Returns: - - str: The selected provider - - None: If user explicitly quits + The selected provider, None if user explicitly quits, or False if no selection. """ predefined_providers = [p.lower() for p in PROVIDERS] all_providers = sorted(set(predefined_providers + list(provider_models.keys()))) @@ -80,16 +79,15 @@ def select_provider(provider_models): return provider.lower() if provider else False -def select_model(provider, provider_models): - """ - Presents a list of models for a given provider to the user and prompts them to select one. +def select_model(provider: str, provider_models: dict[str, list[str]]) -> str | None: + """Presents a list of models for a given provider to the user and prompts them to select one. Args: - - provider (str): The provider for which to select a model. - - provider_models (dict): A dictionary of provider models. + provider: The provider for which to select a model. + provider_models: A dictionary of provider models. Returns: - - str: The selected model, or None if the operation is aborted or an invalid selection is made. + The selected model, or None if the operation is aborted or an invalid selection is made. """ predefined_providers = [p.lower() for p in PROVIDERS] @@ -107,16 +105,17 @@ def select_model(provider, provider_models): ) -def load_provider_data(cache_file, cache_expiry): - """ - Loads provider data from a cache file if it exists and is not expired. If the cache is expired or corrupted, it fetches the data from the web. +def load_provider_data(cache_file: Path, cache_expiry: int) -> dict[str, Any] | None: + """Loads provider data from a cache file if it exists and is not expired. + + If the cache is expired or corrupted, it fetches the data from the web. Args: - - cache_file (Path): The path to the cache file. - - cache_expiry (int): The cache expiry time in seconds. + cache_file: The path to the cache file. + cache_expiry: The cache expiry time in seconds. Returns: - - dict or None: The loaded provider data or None if the operation fails. + The loaded provider data or None if the operation fails. """ current_time = time.time() if ( @@ -137,32 +136,31 @@ def load_provider_data(cache_file, cache_expiry): return fetch_provider_data(cache_file) -def read_cache_file(cache_file): - """ - Reads and returns the JSON content from a cache file. Returns None if the file contains invalid JSON. +def read_cache_file(cache_file: Path) -> dict[str, Any] | None: + """Reads and returns the JSON content from a cache file. Args: - - cache_file (Path): The path to the cache file. + cache_file: The path to the cache file. Returns: - - dict or None: The JSON content of the cache file or None if the JSON is invalid. + The JSON content of the cache file or None if the JSON is invalid. """ try: with open(cache_file, "r") as f: - return json.load(f) + data: dict[str, Any] = json.load(f) + return data except json.JSONDecodeError: return None -def fetch_provider_data(cache_file): - """ - Fetches provider data from a specified URL and caches it to a file. +def fetch_provider_data(cache_file: Path) -> dict[str, Any] | None: + """Fetches provider data from a specified URL and caches it to a file. Args: - - cache_file (Path): The path to the cache file. + cache_file: The path to the cache file. Returns: - - dict or None: The fetched provider data or None if the operation fails. + The fetched provider data or None if the operation fails. """ ssl_config = os.environ["SSL_CERT_FILE"] = certifi.where() @@ -180,36 +178,39 @@ def fetch_provider_data(cache_file): return None -def download_data(response): - """ - Downloads data from a given HTTP response and returns the JSON content. +def download_data(response: requests.Response) -> dict[str, Any]: + """Downloads data from a given HTTP response and returns the JSON content. Args: - - response (requests.Response): The HTTP response object. + response: The HTTP response object. Returns: - - dict: The JSON content of the response. + The JSON content of the response. """ total_size = int(response.headers.get("content-length", 0)) block_size = 8192 - data_chunks = [] + data_chunks: list[bytes] = [] + bar: Any with click.progressbar( length=total_size, label="Downloading", show_pos=True - ) as progress_bar: + ) as bar: for chunk in response.iter_content(block_size): if chunk: data_chunks.append(chunk) - progress_bar.update(len(chunk)) + bar.update(len(chunk)) data_content = b"".join(data_chunks) - return json.loads(data_content.decode("utf-8")) + result: dict[str, Any] = json.loads(data_content.decode("utf-8")) + return result -def get_provider_data(): - """ - Retrieves provider data from a cache file, filters out models based on provider criteria, and returns a dictionary of providers mapped to their models. +def get_provider_data() -> dict[str, list[str]] | None: + """Retrieves provider data from a cache file. + + Filters out models based on provider criteria, and returns a dictionary of providers + mapped to their models. Returns: - - dict or None: A dictionary of providers mapped to their models or None if the operation fails. + A dictionary of providers mapped to their models or None if the operation fails. """ cache_dir = Path.home() / ".crewai" cache_dir.mkdir(exist_ok=True) diff --git a/lib/crewai/src/crewai/cli/version.py b/lib/crewai/src/crewai/cli/version.py index a7c1087a7..69170e16c 100644 --- a/lib/crewai/src/crewai/cli/version.py +++ b/lib/crewai/src/crewai/cli/version.py @@ -1,6 +1,107 @@ +"""Version utilities for CrewAI CLI.""" + +from collections.abc import Mapping +from datetime import datetime, timedelta +from functools import lru_cache import importlib.metadata +import json +from pathlib import Path +from typing import Any, cast +from urllib import request +from urllib.error import URLError + +import appdirs +from packaging.version import InvalidVersion, parse + + +@lru_cache(maxsize=1) +def _get_cache_file() -> Path: + """Get the path to the version cache file. + + Cached to avoid repeated filesystem operations. + """ + cache_dir = Path(appdirs.user_cache_dir("crewai")) + cache_dir.mkdir(parents=True, exist_ok=True) + return cache_dir / "version_cache.json" def get_crewai_version() -> str: - """Get the version number of CrewAI running the CLI""" + """Get the version number of CrewAI running the CLI.""" return importlib.metadata.version("crewai") + + +def _is_cache_valid(cache_data: Mapping[str, Any]) -> bool: + """Check if the cache is still valid, less than 24 hours old.""" + if "timestamp" not in cache_data: + return False + + try: + cache_time = datetime.fromisoformat(str(cache_data["timestamp"])) + return datetime.now() - cache_time < timedelta(hours=24) + except (ValueError, TypeError): + return False + + +def get_latest_version_from_pypi(timeout: int = 2) -> str | None: + """Get the latest version of CrewAI from PyPI. + + Args: + timeout: Request timeout in seconds. + + Returns: + Latest version string or None if unable to fetch. + """ + cache_file = _get_cache_file() + if cache_file.exists(): + try: + cache_data = json.loads(cache_file.read_text()) + if _is_cache_valid(cache_data): + return cast(str | None, cache_data.get("version")) + except (json.JSONDecodeError, OSError): + pass + + try: + with request.urlopen( + "https://pypi.org/pypi/crewai/json", timeout=timeout + ) as response: + data = json.loads(response.read()) + latest_version = cast(str, data["info"]["version"]) + + cache_data = { + "version": latest_version, + "timestamp": datetime.now().isoformat(), + } + cache_file.write_text(json.dumps(cache_data)) + + return latest_version + except (URLError, json.JSONDecodeError, KeyError, OSError): + return None + + +def check_version() -> tuple[str, str | None]: + """Check current and latest versions. + + Returns: + Tuple of (current_version, latest_version). + latest_version is None if unable to fetch from PyPI. + """ + current = get_crewai_version() + latest = get_latest_version_from_pypi() + return current, latest + + +def is_newer_version_available() -> tuple[bool, str, str | None]: + """Check if a newer version is available. + + Returns: + Tuple of (is_newer, current_version, latest_version). + """ + current, latest = check_version() + + if latest is None: + return False, current, None + + try: + return parse(latest) > parse(current), current, latest + except (InvalidVersion, TypeError): + return False, current, latest diff --git a/lib/crewai/src/crewai/events/types/llm_events.py b/lib/crewai/src/crewai/events/types/llm_events.py index 161b8a2a0..87087f100 100644 --- a/lib/crewai/src/crewai/events/types/llm_events.py +++ b/lib/crewai/src/crewai/events/types/llm_events.py @@ -10,6 +10,7 @@ class LLMEventBase(BaseEvent): from_task: Any | None = None from_agent: Any | None = None model: str | None = None + call_id: str def __init__(self, **data: Any) -> None: if data.get("from_task"): diff --git a/lib/crewai/src/crewai/events/utils/console_formatter.py b/lib/crewai/src/crewai/events/utils/console_formatter.py index 4aaec2cca..ac6caabcf 100644 --- a/lib/crewai/src/crewai/events/utils/console_formatter.py +++ b/lib/crewai/src/crewai/events/utils/console_formatter.py @@ -1,11 +1,14 @@ +import os import threading -from typing import Any, ClassVar +from typing import Any, ClassVar, cast from rich.console import Console from rich.live import Live from rich.panel import Panel from rich.text import Text +from crewai.cli.version import is_newer_version_available + class ConsoleFormatter: tool_usage_counts: ClassVar[dict[str, int]] = {} @@ -35,6 +38,39 @@ class ConsoleFormatter: padding=(1, 2), ) + def _show_version_update_message_if_needed(self) -> None: + """Show version update message if a newer version is available. + + Only displays when verbose mode is enabled and not running in CI/CD. + """ + if not self.verbose: + return + + if os.getenv("CI", "").lower() in ("true", "1"): + return + + try: + is_newer, current, latest = is_newer_version_available() + if is_newer and latest: + message = f"""A new version of CrewAI is available! + +Current version: {current} +Latest version: {latest} + +To update, run: uv sync --upgrade-package crewai""" + + panel = Panel( + message, + title="✨ Update Available ✨", + border_style="yellow", + padding=(1, 2), + ) + self.console.print(panel) + self.console.print() + except Exception: # noqa: S110 + # Silently ignore errors in version check - it's non-critical + pass + def _show_tracing_disabled_message_if_needed(self) -> None: """Show tracing disabled message if tracing is not enabled.""" from crewai.events.listeners.tracing.utils import ( @@ -176,9 +212,10 @@ To enable tracing, do any one of these: if not self.verbose: return - # Reset the crew completion event for this new crew execution ConsoleFormatter.crew_completion_printed.clear() + self._show_version_update_message_if_needed() + content = self.create_status_content( "Crew Execution Started", crew_name, @@ -237,6 +274,8 @@ To enable tracing, do any one of these: def handle_flow_started(self, flow_name: str, flow_id: str) -> None: """Show flow started panel.""" + self._show_version_update_message_if_needed() + content = Text() content.append("Flow Started\n", style="blue bold") content.append("Name: ", style="white") @@ -885,7 +924,7 @@ To enable tracing, do any one of these: is_a2a_delegation = False try: - output_data = json.loads(formatted_answer.output) + output_data = json.loads(cast(str, formatted_answer.output)) if isinstance(output_data, dict): if output_data.get("is_a2a") is True: is_a2a_delegation = True diff --git a/lib/crewai/src/crewai/llm.py b/lib/crewai/src/crewai/llm.py index c607f1615..902a3d310 100644 --- a/lib/crewai/src/crewai/llm.py +++ b/lib/crewai/src/crewai/llm.py @@ -37,7 +37,7 @@ from crewai.events.types.tool_usage_events import ( ToolUsageFinishedEvent, ToolUsageStartedEvent, ) -from crewai.llms.base_llm import BaseLLM +from crewai.llms.base_llm import BaseLLM, get_current_call_id, llm_call_context from crewai.llms.constants import ( ANTHROPIC_MODELS, AZURE_MODELS, @@ -770,7 +770,7 @@ class LLM(BaseLLM): chunk_content = None response_id = None - if hasattr(chunk,'id'): + if hasattr(chunk, "id"): response_id = chunk.id # Safely extract content from various chunk formats @@ -827,7 +827,7 @@ class LLM(BaseLLM): available_functions=available_functions, from_task=from_task, from_agent=from_agent, - response_id=response_id + response_id=response_id, ) if result is not None: @@ -849,7 +849,8 @@ class LLM(BaseLLM): from_task=from_task, from_agent=from_agent, call_type=LLMCallType.LLM_CALL, - response_id=response_id + response_id=response_id, + call_id=get_current_call_id(), ), ) # --- 4) Fallback to non-streaming if no content received @@ -1015,7 +1016,10 @@ class LLM(BaseLLM): crewai_event_bus.emit( self, event=LLMCallFailedEvent( - error=str(e), from_task=from_task, from_agent=from_agent + error=str(e), + from_task=from_task, + from_agent=from_agent, + call_id=get_current_call_id(), ), ) raise Exception(f"Failed to get streaming response: {e!s}") from e @@ -1048,7 +1052,8 @@ class LLM(BaseLLM): from_task=from_task, from_agent=from_agent, call_type=LLMCallType.TOOL_CALL, - response_id=response_id + response_id=response_id, + call_id=get_current_call_id(), ), ) @@ -1476,7 +1481,8 @@ class LLM(BaseLLM): chunk=chunk_content, from_task=from_task, from_agent=from_agent, - response_id=response_id + response_id=response_id, + call_id=get_current_call_id(), ), ) @@ -1619,7 +1625,12 @@ class LLM(BaseLLM): logging.error(f"Error executing function '{function_name}': {e}") crewai_event_bus.emit( self, - event=LLMCallFailedEvent(error=f"Tool execution error: {e!s}"), + event=LLMCallFailedEvent( + error=f"Tool execution error: {e!s}", + from_task=from_task, + from_agent=from_agent, + call_id=get_current_call_id(), + ), ) crewai_event_bus.emit( self, @@ -1669,108 +1680,117 @@ class LLM(BaseLLM): ValueError: If response format is not supported LLMContextLengthExceededError: If input exceeds model's context limit """ - crewai_event_bus.emit( - self, - event=LLMCallStartedEvent( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - model=self.model, - ), - ) + with llm_call_context() as call_id: + crewai_event_bus.emit( + self, + event=LLMCallStartedEvent( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + model=self.model, + call_id=call_id, + ), + ) - # --- 2) Validate parameters before proceeding with the call - self._validate_call_params() + # --- 2) Validate parameters before proceeding with the call + self._validate_call_params() - # --- 3) Convert string messages to proper format if needed - if isinstance(messages, str): - messages = [{"role": "user", "content": messages}] - # --- 4) Handle O1 model special case (system messages not supported) - if "o1" in self.model.lower(): - for message in messages: - if message.get("role") == "system": - msg_role: Literal["assistant"] = "assistant" - message["role"] = msg_role + # --- 3) Convert string messages to proper format if needed + if isinstance(messages, str): + messages = [{"role": "user", "content": messages}] + # --- 4) Handle O1 model special case (system messages not supported) + if "o1" in self.model.lower(): + for message in messages: + if message.get("role") == "system": + msg_role: Literal["assistant"] = "assistant" + message["role"] = msg_role - if not self._invoke_before_llm_call_hooks(messages, from_agent): - raise ValueError("LLM call blocked by before_llm_call hook") + if not self._invoke_before_llm_call_hooks(messages, from_agent): + raise ValueError("LLM call blocked by before_llm_call hook") - # --- 5) Set up callbacks if provided - with suppress_warnings(): - if callbacks and len(callbacks) > 0: - self.set_callbacks(callbacks) - try: - # --- 6) Prepare parameters for the completion call - params = self._prepare_completion_params(messages, tools) - # --- 7) Make the completion call and handle response - if self.stream: - result = self._handle_streaming_response( - params=params, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, - ) - else: - result = self._handle_non_streaming_response( - params=params, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, - ) - - if isinstance(result, str): - result = self._invoke_after_llm_call_hooks( - messages, result, from_agent - ) - - return result - except LLMContextLengthExceededError: - # Re-raise LLMContextLengthExceededError as it should be handled - # by the CrewAgentExecutor._invoke_loop method, which can then decide - # whether to summarize the content or abort based on the respect_context_window flag - raise - except Exception as e: - unsupported_stop = "Unsupported parameter" in str( - e - ) and "'stop'" in str(e) - - if unsupported_stop: - if ( - "additional_drop_params" in self.additional_params - and isinstance( - self.additional_params["additional_drop_params"], list + # --- 5) Set up callbacks if provided + with suppress_warnings(): + if callbacks and len(callbacks) > 0: + self.set_callbacks(callbacks) + try: + # --- 6) Prepare parameters for the completion call + params = self._prepare_completion_params(messages, tools) + # --- 7) Make the completion call and handle response + if self.stream: + result = self._handle_streaming_response( + params=params, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, ) - ): - self.additional_params["additional_drop_params"].append("stop") else: - self.additional_params = {"additional_drop_params": ["stop"]} + result = self._handle_non_streaming_response( + params=params, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, + ) - logging.info("Retrying LLM call without the unsupported 'stop'") + if isinstance(result, str): + result = self._invoke_after_llm_call_hooks( + messages, result, from_agent + ) - return self.call( - messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, + return result + except LLMContextLengthExceededError: + # Re-raise LLMContextLengthExceededError as it should be handled + # by the CrewAgentExecutor._invoke_loop method, which can then decide + # whether to summarize the content or abort based on the respect_context_window flag + raise + except Exception as e: + unsupported_stop = "Unsupported parameter" in str( + e + ) and "'stop'" in str(e) + + if unsupported_stop: + if ( + "additional_drop_params" in self.additional_params + and isinstance( + self.additional_params["additional_drop_params"], list + ) + ): + self.additional_params["additional_drop_params"].append( + "stop" + ) + else: + self.additional_params = { + "additional_drop_params": ["stop"] + } + + logging.info("Retrying LLM call without the unsupported 'stop'") + + return self.call( + messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, + ) + + crewai_event_bus.emit( + self, + event=LLMCallFailedEvent( + error=str(e), + from_task=from_task, + from_agent=from_agent, + call_id=get_current_call_id(), + ), ) - - crewai_event_bus.emit( - self, - event=LLMCallFailedEvent( - error=str(e), from_task=from_task, from_agent=from_agent - ), - ) - raise + raise async def acall( self, @@ -1808,43 +1828,54 @@ class LLM(BaseLLM): ValueError: If response format is not supported LLMContextLengthExceededError: If input exceeds model's context limit """ - crewai_event_bus.emit( - self, - event=LLMCallStartedEvent( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - model=self.model, - ), - ) + with llm_call_context() as call_id: + crewai_event_bus.emit( + self, + event=LLMCallStartedEvent( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + model=self.model, + call_id=call_id, + ), + ) - self._validate_call_params() + self._validate_call_params() - if isinstance(messages, str): - messages = [{"role": "user", "content": messages}] + if isinstance(messages, str): + messages = [{"role": "user", "content": messages}] - # Process file attachments asynchronously before preparing params - messages = await self._aprocess_message_files(messages) + # Process file attachments asynchronously before preparing params + messages = await self._aprocess_message_files(messages) - if "o1" in self.model.lower(): - for message in messages: - if message.get("role") == "system": - msg_role: Literal["assistant"] = "assistant" - message["role"] = msg_role + if "o1" in self.model.lower(): + for message in messages: + if message.get("role") == "system": + msg_role: Literal["assistant"] = "assistant" + message["role"] = msg_role - with suppress_warnings(): - if callbacks and len(callbacks) > 0: - self.set_callbacks(callbacks) - try: - params = self._prepare_completion_params( - messages, tools, skip_file_processing=True - ) + with suppress_warnings(): + if callbacks and len(callbacks) > 0: + self.set_callbacks(callbacks) + try: + params = self._prepare_completion_params( + messages, tools, skip_file_processing=True + ) - if self.stream: - return await self._ahandle_streaming_response( + if self.stream: + return await self._ahandle_streaming_response( + params=params, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, + ) + + return await self._ahandle_non_streaming_response( params=params, callbacks=callbacks, available_functions=available_functions, @@ -1852,52 +1883,50 @@ class LLM(BaseLLM): from_agent=from_agent, response_model=response_model, ) + except LLMContextLengthExceededError: + raise + except Exception as e: + unsupported_stop = "Unsupported parameter" in str( + e + ) and "'stop'" in str(e) - return await self._ahandle_non_streaming_response( - params=params, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, - ) - except LLMContextLengthExceededError: - raise - except Exception as e: - unsupported_stop = "Unsupported parameter" in str( - e - ) and "'stop'" in str(e) + if unsupported_stop: + if ( + "additional_drop_params" in self.additional_params + and isinstance( + self.additional_params["additional_drop_params"], list + ) + ): + self.additional_params["additional_drop_params"].append( + "stop" + ) + else: + self.additional_params = { + "additional_drop_params": ["stop"] + } - if unsupported_stop: - if ( - "additional_drop_params" in self.additional_params - and isinstance( - self.additional_params["additional_drop_params"], list + logging.info("Retrying LLM call without the unsupported 'stop'") + + return await self.acall( + messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, ) - ): - self.additional_params["additional_drop_params"].append("stop") - else: - self.additional_params = {"additional_drop_params": ["stop"]} - logging.info("Retrying LLM call without the unsupported 'stop'") - - return await self.acall( - messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, + crewai_event_bus.emit( + self, + event=LLMCallFailedEvent( + error=str(e), + from_task=from_task, + from_agent=from_agent, + call_id=get_current_call_id(), + ), ) - - crewai_event_bus.emit( - self, - event=LLMCallFailedEvent( - error=str(e), from_task=from_task, from_agent=from_agent - ), - ) - raise + raise def _handle_emit_call_events( self, @@ -1925,6 +1954,7 @@ class LLM(BaseLLM): from_task=from_task, from_agent=from_agent, model=self.model, + call_id=get_current_call_id(), ), ) diff --git a/lib/crewai/src/crewai/llms/base_llm.py b/lib/crewai/src/crewai/llms/base_llm.py index 56e6dcb34..dcb261fd7 100644 --- a/lib/crewai/src/crewai/llms/base_llm.py +++ b/lib/crewai/src/crewai/llms/base_llm.py @@ -7,11 +7,15 @@ in CrewAI, including common functionality for native SDK implementations. from __future__ import annotations from abc import ABC, abstractmethod +from collections.abc import Generator +from contextlib import contextmanager +import contextvars from datetime import datetime import json import logging import re from typing import TYPE_CHECKING, Any, Final +import uuid from pydantic import BaseModel @@ -50,6 +54,32 @@ DEFAULT_CONTEXT_WINDOW_SIZE: Final[int] = 4096 DEFAULT_SUPPORTS_STOP_WORDS: Final[bool] = True _JSON_EXTRACTION_PATTERN: Final[re.Pattern[str]] = re.compile(r"\{.*}", re.DOTALL) +_current_call_id: contextvars.ContextVar[str | None] = contextvars.ContextVar( + "_current_call_id", default=None +) + + +@contextmanager +def llm_call_context() -> Generator[str, None, None]: + """Context manager that establishes an LLM call scope with a unique call_id.""" + call_id = str(uuid.uuid4()) + token = _current_call_id.set(call_id) + try: + yield call_id + finally: + _current_call_id.reset(token) + + +def get_current_call_id() -> str: + """Get current call_id from context""" + call_id = _current_call_id.get() + if call_id is None: + logging.warning( + "LLM event emitted outside call context - generating fallback call_id" + ) + return str(uuid.uuid4()) + return call_id + class BaseLLM(ABC): """Abstract base class for LLM implementations. @@ -351,6 +381,7 @@ class BaseLLM(ABC): from_task=from_task, from_agent=from_agent, model=self.model, + call_id=get_current_call_id(), ), ) @@ -374,6 +405,7 @@ class BaseLLM(ABC): from_task=from_task, from_agent=from_agent, model=self.model, + call_id=get_current_call_id(), ), ) @@ -394,6 +426,7 @@ class BaseLLM(ABC): from_task=from_task, from_agent=from_agent, model=self.model, + call_id=get_current_call_id(), ), ) @@ -428,6 +461,7 @@ class BaseLLM(ABC): from_agent=from_agent, call_type=call_type, response_id=response_id, + call_id=get_current_call_id(), ), ) diff --git a/lib/crewai/src/crewai/llms/providers/anthropic/completion.py b/lib/crewai/src/crewai/llms/providers/anthropic/completion.py index c2ea752c6..815dfe763 100644 --- a/lib/crewai/src/crewai/llms/providers/anthropic/completion.py +++ b/lib/crewai/src/crewai/llms/providers/anthropic/completion.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Any, Final, Literal, TypeGuard, cast from pydantic import BaseModel from crewai.events.types.llm_events import LLMCallType -from crewai.llms.base_llm import BaseLLM +from crewai.llms.base_llm import BaseLLM, llm_call_context from crewai.llms.hooks.transport import AsyncHTTPTransport, HTTPTransport from crewai.utilities.agent_utils import is_context_length_exceeded from crewai.utilities.exceptions.context_window_exceeding_exception import ( @@ -266,35 +266,46 @@ class AnthropicCompletion(BaseLLM): Returns: Chat completion response or tool call result """ - try: - # Emit call started event - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) + with llm_call_context(): + try: + # Emit call started event + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) - # Format messages for Anthropic - formatted_messages, system_message = self._format_messages_for_anthropic( - messages - ) + # Format messages for Anthropic + formatted_messages, system_message = ( + self._format_messages_for_anthropic(messages) + ) - if not self._invoke_before_llm_call_hooks(formatted_messages, from_agent): - raise ValueError("LLM call blocked by before_llm_call hook") + if not self._invoke_before_llm_call_hooks( + formatted_messages, from_agent + ): + raise ValueError("LLM call blocked by before_llm_call hook") - # Prepare completion parameters - completion_params = self._prepare_completion_params( - formatted_messages, system_message, tools - ) + # Prepare completion parameters + completion_params = self._prepare_completion_params( + formatted_messages, system_message, tools + ) - effective_response_model = response_model or self.response_format + effective_response_model = response_model or self.response_format - # Handle streaming vs non-streaming - if self.stream: - return self._handle_streaming_completion( + # Handle streaming vs non-streaming + if self.stream: + return self._handle_streaming_completion( + completion_params, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return self._handle_completion( completion_params, available_functions, from_task, @@ -302,21 +313,13 @@ class AnthropicCompletion(BaseLLM): effective_response_model, ) - return self._handle_completion( - completion_params, - available_functions, - from_task, - from_agent, - effective_response_model, - ) - - except Exception as e: - error_msg = f"Anthropic API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + except Exception as e: + error_msg = f"Anthropic API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise async def acall( self, @@ -342,28 +345,37 @@ class AnthropicCompletion(BaseLLM): Returns: Chat completion response or tool call result """ - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) - formatted_messages, system_message = self._format_messages_for_anthropic( - messages - ) + formatted_messages, system_message = ( + self._format_messages_for_anthropic(messages) + ) - completion_params = self._prepare_completion_params( - formatted_messages, system_message, tools - ) + completion_params = self._prepare_completion_params( + formatted_messages, system_message, tools + ) - effective_response_model = response_model or self.response_format + effective_response_model = response_model or self.response_format - if self.stream: - return await self._ahandle_streaming_completion( + if self.stream: + return await self._ahandle_streaming_completion( + completion_params, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return await self._ahandle_completion( completion_params, available_functions, from_task, @@ -371,21 +383,13 @@ class AnthropicCompletion(BaseLLM): effective_response_model, ) - return await self._ahandle_completion( - completion_params, - available_functions, - from_task, - from_agent, - effective_response_model, - ) - - except Exception as e: - error_msg = f"Anthropic API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + except Exception as e: + error_msg = f"Anthropic API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise def _prepare_completion_params( self, diff --git a/lib/crewai/src/crewai/llms/providers/azure/completion.py b/lib/crewai/src/crewai/llms/providers/azure/completion.py index 8f398a594..e7fd80844 100644 --- a/lib/crewai/src/crewai/llms/providers/azure/completion.py +++ b/lib/crewai/src/crewai/llms/providers/azure/completion.py @@ -43,7 +43,7 @@ try: ) from crewai.events.types.llm_events import LLMCallType - from crewai.llms.base_llm import BaseLLM + from crewai.llms.base_llm import BaseLLM, llm_call_context except ImportError: raise ImportError( @@ -293,32 +293,44 @@ class AzureCompletion(BaseLLM): Returns: Chat completion response or tool call result """ - try: - # Emit call started event - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) - effective_response_model = response_model or self.response_format + with llm_call_context(): + try: + # Emit call started event + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) - # Format messages for Azure - formatted_messages = self._format_messages_for_azure(messages) + effective_response_model = response_model or self.response_format - if not self._invoke_before_llm_call_hooks(formatted_messages, from_agent): - raise ValueError("LLM call blocked by before_llm_call hook") + # Format messages for Azure + formatted_messages = self._format_messages_for_azure(messages) - # Prepare completion parameters - completion_params = self._prepare_completion_params( - formatted_messages, tools, effective_response_model - ) + if not self._invoke_before_llm_call_hooks( + formatted_messages, from_agent + ): + raise ValueError("LLM call blocked by before_llm_call hook") - # Handle streaming vs non-streaming - if self.stream: - return self._handle_streaming_completion( + # Prepare completion parameters + completion_params = self._prepare_completion_params( + formatted_messages, tools, effective_response_model + ) + + # Handle streaming vs non-streaming + if self.stream: + return self._handle_streaming_completion( + completion_params, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return self._handle_completion( completion_params, available_functions, from_task, @@ -326,16 +338,8 @@ class AzureCompletion(BaseLLM): effective_response_model, ) - return self._handle_completion( - completion_params, - available_functions, - from_task, - from_agent, - effective_response_model, - ) - - except Exception as e: - return self._handle_api_error(e, from_task, from_agent) # type: ignore[func-returns-value] + except Exception as e: + return self._handle_api_error(e, from_task, from_agent) # type: ignore[func-returns-value] async def acall( # type: ignore[return] self, @@ -361,25 +365,35 @@ class AzureCompletion(BaseLLM): Returns: Chat completion response or tool call result """ - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) - effective_response_model = response_model or self.response_format + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) - formatted_messages = self._format_messages_for_azure(messages) + effective_response_model = response_model or self.response_format - completion_params = self._prepare_completion_params( - formatted_messages, tools, effective_response_model - ) + formatted_messages = self._format_messages_for_azure(messages) - if self.stream: - return await self._ahandle_streaming_completion( + completion_params = self._prepare_completion_params( + formatted_messages, tools, effective_response_model + ) + + if self.stream: + return await self._ahandle_streaming_completion( + completion_params, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return await self._ahandle_completion( completion_params, available_functions, from_task, @@ -387,16 +401,8 @@ class AzureCompletion(BaseLLM): effective_response_model, ) - return await self._ahandle_completion( - completion_params, - available_functions, - from_task, - from_agent, - effective_response_model, - ) - - except Exception as e: - self._handle_api_error(e, from_task, from_agent) + except Exception as e: + self._handle_api_error(e, from_task, from_agent) def _prepare_completion_params( self, diff --git a/lib/crewai/src/crewai/llms/providers/bedrock/completion.py b/lib/crewai/src/crewai/llms/providers/bedrock/completion.py index 004b076f8..47946d949 100644 --- a/lib/crewai/src/crewai/llms/providers/bedrock/completion.py +++ b/lib/crewai/src/crewai/llms/providers/bedrock/completion.py @@ -11,7 +11,7 @@ from pydantic import BaseModel from typing_extensions import Required from crewai.events.types.llm_events import LLMCallType -from crewai.llms.base_llm import BaseLLM +from crewai.llms.base_llm import BaseLLM, llm_call_context from crewai.utilities.agent_utils import is_context_length_exceeded from crewai.utilities.exceptions.context_window_exceeding_exception import ( LLMContextLengthExceededError, @@ -378,77 +378,90 @@ class BedrockCompletion(BaseLLM): """Call AWS Bedrock Converse API.""" effective_response_model = response_model or self.response_format - try: - # Emit call started event - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) - - # Format messages for Converse API - formatted_messages, system_message = self._format_messages_for_converse( - messages - ) - - if not self._invoke_before_llm_call_hooks(formatted_messages, from_agent): - raise ValueError("LLM call blocked by before_llm_call hook") - - # Prepare request body - body: BedrockConverseRequestBody = { - "inferenceConfig": self._get_inference_config(), - } - - # Add system message if present - if system_message: - body["system"] = cast( - "list[SystemContentBlockTypeDef]", - cast(object, [{"text": system_message}]), + with llm_call_context(): + try: + # Emit call started event + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, ) - # Add tool config if present or if messages contain tool content - # Bedrock requires toolConfig when messages have toolUse/toolResult - if tools: - tool_config: ToolConfigurationTypeDef = { - "tools": cast( - "Sequence[ToolTypeDef]", - cast(object, self._format_tools_for_converse(tools)), - ) + # Format messages for Converse API + formatted_messages, system_message = self._format_messages_for_converse( + messages + ) + + if not self._invoke_before_llm_call_hooks( + formatted_messages, from_agent + ): + raise ValueError("LLM call blocked by before_llm_call hook") + + # Prepare request body + body: BedrockConverseRequestBody = { + "inferenceConfig": self._get_inference_config(), } - body["toolConfig"] = tool_config - elif self._messages_contain_tool_content(formatted_messages): - # Create minimal toolConfig from tool history in messages - tools_from_history = self._extract_tools_from_message_history( - formatted_messages - ) - if tools_from_history: - body["toolConfig"] = cast( - "ToolConfigurationTypeDef", - cast(object, {"tools": tools_from_history}), + + # Add system message if present + if system_message: + body["system"] = cast( + "list[SystemContentBlockTypeDef]", + cast(object, [{"text": system_message}]), ) - # Add optional advanced features if configured - if self.guardrail_config: - guardrail_config: GuardrailConfigurationTypeDef = cast( - "GuardrailConfigurationTypeDef", cast(object, self.guardrail_config) - ) - body["guardrailConfig"] = guardrail_config + # Add tool config if present or if messages contain tool content + # Bedrock requires toolConfig when messages have toolUse/toolResult + if tools: + tool_config: ToolConfigurationTypeDef = { + "tools": cast( + "Sequence[ToolTypeDef]", + cast(object, self._format_tools_for_converse(tools)), + ) + } + body["toolConfig"] = tool_config + elif self._messages_contain_tool_content(formatted_messages): + # Create minimal toolConfig from tool history in messages + tools_from_history = self._extract_tools_from_message_history( + formatted_messages + ) + if tools_from_history: + body["toolConfig"] = cast( + "ToolConfigurationTypeDef", + cast(object, {"tools": tools_from_history}), + ) - if self.additional_model_request_fields: - body["additionalModelRequestFields"] = ( - self.additional_model_request_fields - ) + # Add optional advanced features if configured + if self.guardrail_config: + guardrail_config: GuardrailConfigurationTypeDef = cast( + "GuardrailConfigurationTypeDef", + cast(object, self.guardrail_config), + ) + body["guardrailConfig"] = guardrail_config - if self.additional_model_response_field_paths: - body["additionalModelResponseFieldPaths"] = ( - self.additional_model_response_field_paths - ) + if self.additional_model_request_fields: + body["additionalModelRequestFields"] = ( + self.additional_model_request_fields + ) - if self.stream: - return self._handle_streaming_converse( + if self.additional_model_response_field_paths: + body["additionalModelResponseFieldPaths"] = ( + self.additional_model_response_field_paths + ) + + if self.stream: + return self._handle_streaming_converse( + formatted_messages, + body, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return self._handle_converse( formatted_messages, body, available_functions, @@ -457,26 +470,17 @@ class BedrockCompletion(BaseLLM): effective_response_model, ) - return self._handle_converse( - formatted_messages, - body, - available_functions, - from_task, - from_agent, - effective_response_model, - ) + except Exception as e: + if is_context_length_exceeded(e): + logging.error(f"Context window exceeded: {e}") + raise LLMContextLengthExceededError(str(e)) from e - except Exception as e: - if is_context_length_exceeded(e): - logging.error(f"Context window exceeded: {e}") - raise LLMContextLengthExceededError(str(e)) from e - - error_msg = f"AWS Bedrock API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + error_msg = f"AWS Bedrock API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise async def acall( self, @@ -514,69 +518,80 @@ class BedrockCompletion(BaseLLM): 'Install with: uv add "crewai[bedrock-async]"' ) - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) - - formatted_messages, system_message = self._format_messages_for_converse( - messages - ) - - body: BedrockConverseRequestBody = { - "inferenceConfig": self._get_inference_config(), - } - - if system_message: - body["system"] = cast( - "list[SystemContentBlockTypeDef]", - cast(object, [{"text": system_message}]), + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, ) - # Add tool config if present or if messages contain tool content - # Bedrock requires toolConfig when messages have toolUse/toolResult - if tools: - tool_config: ToolConfigurationTypeDef = { - "tools": cast( - "Sequence[ToolTypeDef]", - cast(object, self._format_tools_for_converse(tools)), - ) + formatted_messages, system_message = self._format_messages_for_converse( + messages + ) + + body: BedrockConverseRequestBody = { + "inferenceConfig": self._get_inference_config(), } - body["toolConfig"] = tool_config - elif self._messages_contain_tool_content(formatted_messages): - # Create minimal toolConfig from tool history in messages - tools_from_history = self._extract_tools_from_message_history( - formatted_messages - ) - if tools_from_history: - body["toolConfig"] = cast( - "ToolConfigurationTypeDef", - cast(object, {"tools": tools_from_history}), + + if system_message: + body["system"] = cast( + "list[SystemContentBlockTypeDef]", + cast(object, [{"text": system_message}]), ) - if self.guardrail_config: - guardrail_config: GuardrailConfigurationTypeDef = cast( - "GuardrailConfigurationTypeDef", cast(object, self.guardrail_config) - ) - body["guardrailConfig"] = guardrail_config + # Add tool config if present or if messages contain tool content + # Bedrock requires toolConfig when messages have toolUse/toolResult + if tools: + tool_config: ToolConfigurationTypeDef = { + "tools": cast( + "Sequence[ToolTypeDef]", + cast(object, self._format_tools_for_converse(tools)), + ) + } + body["toolConfig"] = tool_config + elif self._messages_contain_tool_content(formatted_messages): + # Create minimal toolConfig from tool history in messages + tools_from_history = self._extract_tools_from_message_history( + formatted_messages + ) + if tools_from_history: + body["toolConfig"] = cast( + "ToolConfigurationTypeDef", + cast(object, {"tools": tools_from_history}), + ) - if self.additional_model_request_fields: - body["additionalModelRequestFields"] = ( - self.additional_model_request_fields - ) + if self.guardrail_config: + guardrail_config: GuardrailConfigurationTypeDef = cast( + "GuardrailConfigurationTypeDef", + cast(object, self.guardrail_config), + ) + body["guardrailConfig"] = guardrail_config - if self.additional_model_response_field_paths: - body["additionalModelResponseFieldPaths"] = ( - self.additional_model_response_field_paths - ) + if self.additional_model_request_fields: + body["additionalModelRequestFields"] = ( + self.additional_model_request_fields + ) - if self.stream: - return await self._ahandle_streaming_converse( + if self.additional_model_response_field_paths: + body["additionalModelResponseFieldPaths"] = ( + self.additional_model_response_field_paths + ) + + if self.stream: + return await self._ahandle_streaming_converse( + formatted_messages, + body, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return await self._ahandle_converse( formatted_messages, body, available_functions, @@ -585,26 +600,17 @@ class BedrockCompletion(BaseLLM): effective_response_model, ) - return await self._ahandle_converse( - formatted_messages, - body, - available_functions, - from_task, - from_agent, - effective_response_model, - ) + except Exception as e: + if is_context_length_exceeded(e): + logging.error(f"Context window exceeded: {e}") + raise LLMContextLengthExceededError(str(e)) from e - except Exception as e: - if is_context_length_exceeded(e): - logging.error(f"Context window exceeded: {e}") - raise LLMContextLengthExceededError(str(e)) from e - - error_msg = f"AWS Bedrock API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + error_msg = f"AWS Bedrock API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise def _handle_converse( self, diff --git a/lib/crewai/src/crewai/llms/providers/gemini/completion.py b/lib/crewai/src/crewai/llms/providers/gemini/completion.py index 4a28639f5..0c00de96d 100644 --- a/lib/crewai/src/crewai/llms/providers/gemini/completion.py +++ b/lib/crewai/src/crewai/llms/providers/gemini/completion.py @@ -10,7 +10,7 @@ from typing import TYPE_CHECKING, Any, Literal, cast from pydantic import BaseModel from crewai.events.types.llm_events import LLMCallType -from crewai.llms.base_llm import BaseLLM +from crewai.llms.base_llm import BaseLLM, llm_call_context from crewai.utilities.agent_utils import is_context_length_exceeded from crewai.utilities.exceptions.context_window_exceeding_exception import ( LLMContextLengthExceededError, @@ -293,33 +293,45 @@ class GeminiCompletion(BaseLLM): Returns: Chat completion response or tool call result """ - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) - self.tools = tools - effective_response_model = response_model or self.response_format + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) + self.tools = tools + effective_response_model = response_model or self.response_format - formatted_content, system_instruction = self._format_messages_for_gemini( - messages - ) + formatted_content, system_instruction = ( + self._format_messages_for_gemini(messages) + ) - messages_for_hooks = self._convert_contents_to_dict(formatted_content) + messages_for_hooks = self._convert_contents_to_dict(formatted_content) - if not self._invoke_before_llm_call_hooks(messages_for_hooks, from_agent): - raise ValueError("LLM call blocked by before_llm_call hook") + if not self._invoke_before_llm_call_hooks( + messages_for_hooks, from_agent + ): + raise ValueError("LLM call blocked by before_llm_call hook") - config = self._prepare_generation_config( - system_instruction, tools, effective_response_model - ) + config = self._prepare_generation_config( + system_instruction, tools, effective_response_model + ) - if self.stream: - return self._handle_streaming_completion( + if self.stream: + return self._handle_streaming_completion( + formatted_content, + config, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return self._handle_completion( formatted_content, config, available_functions, @@ -328,29 +340,20 @@ class GeminiCompletion(BaseLLM): effective_response_model, ) - return self._handle_completion( - formatted_content, - config, - available_functions, - from_task, - from_agent, - effective_response_model, - ) - - except APIError as e: - error_msg = f"Google Gemini API error: {e.code} - {e.message}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise - except Exception as e: - error_msg = f"Google Gemini API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + except APIError as e: + error_msg = f"Google Gemini API error: {e.code} - {e.message}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise + except Exception as e: + error_msg = f"Google Gemini API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise async def acall( self, @@ -376,28 +379,38 @@ class GeminiCompletion(BaseLLM): Returns: Chat completion response or tool call result """ - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) - self.tools = tools - effective_response_model = response_model or self.response_format + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) + self.tools = tools + effective_response_model = response_model or self.response_format - formatted_content, system_instruction = self._format_messages_for_gemini( - messages - ) + formatted_content, system_instruction = ( + self._format_messages_for_gemini(messages) + ) - config = self._prepare_generation_config( - system_instruction, tools, effective_response_model - ) + config = self._prepare_generation_config( + system_instruction, tools, effective_response_model + ) - if self.stream: - return await self._ahandle_streaming_completion( + if self.stream: + return await self._ahandle_streaming_completion( + formatted_content, + config, + available_functions, + from_task, + from_agent, + effective_response_model, + ) + + return await self._ahandle_completion( formatted_content, config, available_functions, @@ -406,29 +419,20 @@ class GeminiCompletion(BaseLLM): effective_response_model, ) - return await self._ahandle_completion( - formatted_content, - config, - available_functions, - from_task, - from_agent, - effective_response_model, - ) - - except APIError as e: - error_msg = f"Google Gemini API error: {e.code} - {e.message}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise - except Exception as e: - error_msg = f"Google Gemini API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + except APIError as e: + error_msg = f"Google Gemini API error: {e.code} - {e.message}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise + except Exception as e: + error_msg = f"Google Gemini API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise def _prepare_generation_config( self, diff --git a/lib/crewai/src/crewai/llms/providers/openai/completion.py b/lib/crewai/src/crewai/llms/providers/openai/completion.py index 78269f98a..37b686e3d 100644 --- a/lib/crewai/src/crewai/llms/providers/openai/completion.py +++ b/lib/crewai/src/crewai/llms/providers/openai/completion.py @@ -17,7 +17,7 @@ from openai.types.responses import Response from pydantic import BaseModel from crewai.events.types.llm_events import LLMCallType -from crewai.llms.base_llm import BaseLLM +from crewai.llms.base_llm import BaseLLM, llm_call_context from crewai.llms.hooks.transport import AsyncHTTPTransport, HTTPTransport from crewai.utilities.agent_utils import is_context_length_exceeded from crewai.utilities.exceptions.context_window_exceeding_exception import ( @@ -382,23 +382,35 @@ class OpenAICompletion(BaseLLM): Returns: Completion response or tool call result. """ - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) - formatted_messages = self._format_messages(messages) + formatted_messages = self._format_messages(messages) - if not self._invoke_before_llm_call_hooks(formatted_messages, from_agent): - raise ValueError("LLM call blocked by before_llm_call hook") + if not self._invoke_before_llm_call_hooks( + formatted_messages, from_agent + ): + raise ValueError("LLM call blocked by before_llm_call hook") - if self.api == "responses": - return self._call_responses( + if self.api == "responses": + return self._call_responses( + messages=formatted_messages, + tools=tools, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, + ) + + return self._call_completions( messages=formatted_messages, tools=tools, available_functions=available_functions, @@ -407,22 +419,13 @@ class OpenAICompletion(BaseLLM): response_model=response_model, ) - return self._call_completions( - messages=formatted_messages, - tools=tools, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, - ) - - except Exception as e: - error_msg = f"OpenAI API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + except Exception as e: + error_msg = f"OpenAI API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise def _call_completions( self, @@ -479,20 +482,30 @@ class OpenAICompletion(BaseLLM): Returns: Completion response or tool call result. """ - try: - self._emit_call_started_event( - messages=messages, - tools=tools, - callbacks=callbacks, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - ) + with llm_call_context(): + try: + self._emit_call_started_event( + messages=messages, + tools=tools, + callbacks=callbacks, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + ) - formatted_messages = self._format_messages(messages) + formatted_messages = self._format_messages(messages) - if self.api == "responses": - return await self._acall_responses( + if self.api == "responses": + return await self._acall_responses( + messages=formatted_messages, + tools=tools, + available_functions=available_functions, + from_task=from_task, + from_agent=from_agent, + response_model=response_model, + ) + + return await self._acall_completions( messages=formatted_messages, tools=tools, available_functions=available_functions, @@ -501,22 +514,13 @@ class OpenAICompletion(BaseLLM): response_model=response_model, ) - return await self._acall_completions( - messages=formatted_messages, - tools=tools, - available_functions=available_functions, - from_task=from_task, - from_agent=from_agent, - response_model=response_model, - ) - - except Exception as e: - error_msg = f"OpenAI API call failed: {e!s}" - logging.error(error_msg) - self._emit_call_failed_event( - error=error_msg, from_task=from_task, from_agent=from_agent - ) - raise + except Exception as e: + error_msg = f"OpenAI API call failed: {e!s}" + logging.error(error_msg) + self._emit_call_failed_event( + error=error_msg, from_task=from_task, from_agent=from_agent + ) + raise async def _acall_completions( self, @@ -1521,13 +1525,16 @@ class OpenAICompletion(BaseLLM): ) -> list[dict[str, Any]]: """Convert CrewAI tool format to OpenAI function calling format.""" from crewai.llms.providers.utils.common import safe_tool_conversion + from crewai.utilities.pydantic_schema_utils import ( + force_additional_properties_false, + ) openai_tools = [] for tool in tools: name, description, parameters = safe_tool_conversion(tool, "OpenAI") - openai_tool = { + openai_tool: dict[str, Any] = { "type": "function", "function": { "name": name, @@ -1537,10 +1544,11 @@ class OpenAICompletion(BaseLLM): } if parameters: - if isinstance(parameters, dict): - openai_tool["function"]["parameters"] = parameters # type: ignore - else: - openai_tool["function"]["parameters"] = dict(parameters) + params_dict = ( + parameters if isinstance(parameters, dict) else dict(parameters) + ) + params_dict = force_additional_properties_false(params_dict) + openai_tool["function"]["parameters"] = params_dict openai_tools.append(openai_tool) return openai_tools diff --git a/lib/crewai/src/crewai/utilities/pydantic_schema_utils.py b/lib/crewai/src/crewai/utilities/pydantic_schema_utils.py index 69354742b..2b50caea8 100644 --- a/lib/crewai/src/crewai/utilities/pydantic_schema_utils.py +++ b/lib/crewai/src/crewai/utilities/pydantic_schema_utils.py @@ -127,6 +127,36 @@ def add_key_in_dict_recursively( return d +def force_additional_properties_false(d: Any) -> Any: + """Force additionalProperties=false on all object-type dicts recursively. + + OpenAI strict mode requires all objects to have additionalProperties=false. + This function overwrites any existing value to ensure compliance. + + Also ensures objects have properties and required arrays, even if empty, + as OpenAI strict mode requires these for all object types. + + Args: + d: The dictionary/list to modify. + + Returns: + The modified dictionary/list. + """ + if isinstance(d, dict): + if d.get("type") == "object": + d["additionalProperties"] = False + if "properties" not in d: + d["properties"] = {} + if "required" not in d: + d["required"] = [] + for v in d.values(): + force_additional_properties_false(v) + elif isinstance(d, list): + for i in d: + force_additional_properties_false(i) + return d + + def fix_discriminator_mappings(schema: dict[str, Any]) -> dict[str, Any]: """Replace '#/$defs/...' references in discriminator.mapping with just the model name. @@ -278,13 +308,7 @@ def generate_model_description(model: type[BaseModel]) -> dict[str, Any]: """ json_schema = model.model_json_schema(ref_template="#/$defs/{model}") - json_schema = add_key_in_dict_recursively( - json_schema, - key="additionalProperties", - value=False, - criteria=lambda d: d.get("type") == "object" - and "additionalProperties" not in d, - ) + json_schema = force_additional_properties_false(json_schema) json_schema = resolve_refs(json_schema) @@ -378,6 +402,9 @@ def create_model_from_schema( # type: ignore[no-any-unimported] """ effective_root = root_schema or json_schema + json_schema = force_additional_properties_false(json_schema) + effective_root = force_additional_properties_false(effective_root) + if "allOf" in json_schema: json_schema = _merge_all_of_schemas(json_schema["allOf"], effective_root) if "title" not in json_schema and "title" in (root_schema or {}): diff --git a/lib/crewai/tests/agents/test_async_agent_executor.py b/lib/crewai/tests/agents/test_async_agent_executor.py index bfed955de..4dc72ab2a 100644 --- a/lib/crewai/tests/agents/test_async_agent_executor.py +++ b/lib/crewai/tests/agents/test_async_agent_executor.py @@ -235,8 +235,13 @@ class TestAsyncAgentExecutor: mock_crew: MagicMock, mock_tools_handler: MagicMock ) -> None: """Test that multiple ainvoke calls can run concurrently.""" + max_concurrent = 0 + current_concurrent = 0 + lock = asyncio.Lock() async def create_and_run_executor(executor_id: int) -> dict[str, Any]: + nonlocal max_concurrent, current_concurrent + executor = CrewAgentExecutor( llm=mock_llm, task=mock_task, @@ -252,7 +257,13 @@ class TestAsyncAgentExecutor: ) async def delayed_response(*args: Any, **kwargs: Any) -> str: - await asyncio.sleep(0.05) + nonlocal max_concurrent, current_concurrent + async with lock: + current_concurrent += 1 + max_concurrent = max(max_concurrent, current_concurrent) + await asyncio.sleep(0.01) + async with lock: + current_concurrent -= 1 return f"Thought: Done\nFinal Answer: Result from executor {executor_id}" with patch( @@ -273,19 +284,15 @@ class TestAsyncAgentExecutor: } ) - import time - - start = time.time() results = await asyncio.gather( create_and_run_executor(1), create_and_run_executor(2), create_and_run_executor(3), ) - elapsed = time.time() - start assert len(results) == 3 assert all("output" in r for r in results) - assert elapsed < 0.15, f"Expected concurrent execution, took {elapsed}s" + assert max_concurrent > 1, f"Expected concurrent execution, max concurrent was {max_concurrent}" class TestAsyncLLMResponseHelper: diff --git a/lib/crewai/tests/cassettes/utilities/test_llm_call_events_share_call_id.yaml b/lib/crewai/tests/cassettes/utilities/test_llm_call_events_share_call_id.yaml new file mode 100644 index 000000000..2370a9d04 --- /dev/null +++ b/lib/crewai/tests/cassettes/utilities/test_llm_call_events_share_call_id.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: '{"messages":[{"role":"user","content":"Say hi"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '71' + content-type: + - application/json + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.0 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D2HpUSxS5LeHwDTELElWlC5CDMzmr\",\n \"object\": + \"chat.completion\",\n \"created\": 1769437564,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Hi there! How can I assist you today?\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": + null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 9,\n \"completion_tokens\": 10,\n \"total_tokens\": 19,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_29330a9688\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 26 Jan 2026 14:26:05 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '460' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-envoy-upstream-service-time: + - '477' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +version: 1 diff --git a/lib/crewai/tests/cassettes/utilities/test_separate_llm_calls_have_different_call_ids.yaml b/lib/crewai/tests/cassettes/utilities/test_separate_llm_calls_have_different_call_ids.yaml new file mode 100644 index 000000000..419c5e006 --- /dev/null +++ b/lib/crewai/tests/cassettes/utilities/test_separate_llm_calls_have_different_call_ids.yaml @@ -0,0 +1,215 @@ +interactions: +- request: + body: '{"messages":[{"role":"user","content":"Say hi"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '71' + content-type: + - application/json + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.0 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D2HpStmyOpe9DrthWBlDdMZfVMJ1u\",\n \"object\": + \"chat.completion\",\n \"created\": 1769437562,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Hi! How can I assist you today?\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": + null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 9,\n \"completion_tokens\": 9,\n \"total_tokens\": 18,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_29330a9688\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 26 Jan 2026 14:26:02 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '415' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-envoy-upstream-service-time: + - '434' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +- request: + body: '{"messages":[{"role":"user","content":"Say bye"}],"model":"gpt-4o-mini"}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '72' + content-type: + - application/json + cookie: + - COOKIE-XXX + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.0 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: "{\n \"id\": \"chatcmpl-D2HpS1DP0Xd3tmWt5PBincVrdU7yw\",\n \"object\": + \"chat.completion\",\n \"created\": 1769437562,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": + \"assistant\",\n \"content\": \"Goodbye! If you have more questions + in the future, feel free to reach out. Have a great day!\",\n \"refusal\": + null,\n \"annotations\": []\n },\n \"logprobs\": null,\n + \ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": + 9,\n \"completion_tokens\": 23,\n \"total_tokens\": 32,\n \"prompt_tokens_details\": + {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": \"fp_29330a9688\"\n}\n" + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 26 Jan 2026 14:26:03 GMT + Server: + - cloudflare + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '964' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-envoy-upstream-service-time: + - '979' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +version: 1 diff --git a/lib/crewai/tests/cassettes/utilities/test_streaming_chunks_share_call_id_with_call.yaml b/lib/crewai/tests/cassettes/utilities/test_streaming_chunks_share_call_id_with_call.yaml new file mode 100644 index 000000000..7b04d21a3 --- /dev/null +++ b/lib/crewai/tests/cassettes/utilities/test_streaming_chunks_share_call_id_with_call.yaml @@ -0,0 +1,143 @@ +interactions: +- request: + body: '{"messages":[{"role":"user","content":"Say hi"}],"model":"gpt-4o-mini","stream":true,"stream_options":{"include_usage":true}}' + headers: + User-Agent: + - X-USER-AGENT-XXX + accept: + - application/json + accept-encoding: + - ACCEPT-ENCODING-XXX + authorization: + - AUTHORIZATION-XXX + connection: + - keep-alive + content-length: + - '125' + content-type: + - application/json + host: + - api.openai.com + x-stainless-arch: + - X-STAINLESS-ARCH-XXX + x-stainless-async: + - 'false' + x-stainless-lang: + - python + x-stainless-os: + - X-STAINLESS-OS-XXX + x-stainless-package-version: + - 1.83.0 + x-stainless-read-timeout: + - X-STAINLESS-READ-TIMEOUT-XXX + x-stainless-retry-count: + - '0' + x-stainless-runtime: + - CPython + x-stainless-runtime-version: + - 3.13.0 + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rVIyGQF2E"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":"Hi"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZGVqV7ZDm"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vnfm7IxlIB"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":" + How"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o8F35ZZ"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":" + can"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kiBzGe3"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":" + I"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cbGT2RWgx"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":" + assist"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DtxR"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":" + you"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6y6Co8J"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":" + today"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"SZOmm"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{"content":"?"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"s9Bc0HqlPg"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"u9aar"} + + + data: {"id":"chatcmpl-D2HpUGTvIFKBsR9Xd6XRT4AuFXzbz","object":"chat.completion.chunk","created":1769437564,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_29330a9688","choices":[],"usage":{"prompt_tokens":9,"completion_tokens":9,"total_tokens":18,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"5hudm8ySqh39"} + + + data: [DONE] + + + ' + headers: + CF-RAY: + - CF-RAY-XXX + Connection: + - keep-alive + Content-Type: + - text/event-stream; charset=utf-8 + Date: + - Mon, 26 Jan 2026 14:26:04 GMT + Server: + - cloudflare + Set-Cookie: + - SET-COOKIE-XXX + Strict-Transport-Security: + - STS-XXX + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - X-CONTENT-TYPE-XXX + access-control-expose-headers: + - ACCESS-CONTROL-XXX + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + openai-organization: + - OPENAI-ORG-XXX + openai-processing-ms: + - '260' + openai-project: + - OPENAI-PROJECT-XXX + openai-version: + - '2020-10-01' + x-envoy-upstream-service-time: + - '275' + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - X-RATELIMIT-LIMIT-REQUESTS-XXX + x-ratelimit-limit-tokens: + - X-RATELIMIT-LIMIT-TOKENS-XXX + x-ratelimit-remaining-requests: + - X-RATELIMIT-REMAINING-REQUESTS-XXX + x-ratelimit-remaining-tokens: + - X-RATELIMIT-REMAINING-TOKENS-XXX + x-ratelimit-reset-requests: + - X-RATELIMIT-RESET-REQUESTS-XXX + x-ratelimit-reset-tokens: + - X-RATELIMIT-RESET-TOKENS-XXX + x-request-id: + - X-REQUEST-ID-XXX + status: + code: 200 + message: OK +version: 1 diff --git a/lib/crewai/tests/cli/test_create_crew.py b/lib/crewai/tests/cli/test_create_crew.py index 638be9b5d..478372f7f 100644 --- a/lib/crewai/tests/cli/test_create_crew.py +++ b/lib/crewai/tests/cli/test_create_crew.py @@ -296,6 +296,23 @@ def test_create_folder_structure_folder_name_validation(): shutil.rmtree(folder_path) +def test_create_folder_structure_rejects_reserved_names(): + """Test that reserved script names are rejected to prevent pyproject.toml conflicts.""" + with tempfile.TemporaryDirectory() as temp_dir: + reserved_names = ["test", "train", "replay", "run_crew", "run_with_trigger"] + + for reserved_name in reserved_names: + with pytest.raises(ValueError, match="which is reserved"): + create_folder_structure(reserved_name, parent_folder=temp_dir) + + with pytest.raises(ValueError, match="which is reserved"): + create_folder_structure(f"{reserved_name}/", parent_folder=temp_dir) + + capitalized = reserved_name.capitalize() + with pytest.raises(ValueError, match="which is reserved"): + create_folder_structure(capitalized, parent_folder=temp_dir) + + @mock.patch("crewai.cli.create_crew.create_folder_structure") @mock.patch("crewai.cli.create_crew.copy_template") @mock.patch("crewai.cli.create_crew.load_env_vars") diff --git a/lib/crewai/tests/cli/test_version.py b/lib/crewai/tests/cli/test_version.py index 9706a282d..260064096 100644 --- a/lib/crewai/tests/cli/test_version.py +++ b/lib/crewai/tests/cli/test_version.py @@ -1,10 +1,20 @@ """Test for version management.""" +from datetime import datetime, timedelta +from pathlib import Path +from unittest.mock import MagicMock, patch + from crewai import __version__ -from crewai.cli.version import get_crewai_version +from crewai.cli.version import ( + _get_cache_file, + _is_cache_valid, + get_crewai_version, + get_latest_version_from_pypi, + is_newer_version_available, +) -def test_dynamic_versioning_consistency(): +def test_dynamic_versioning_consistency() -> None: """Test that dynamic versioning provides consistent version across all access methods.""" cli_version = get_crewai_version() package_version = __version__ @@ -15,3 +25,186 @@ def test_dynamic_versioning_consistency(): # Version should not be empty assert package_version is not None assert len(package_version.strip()) > 0 + + +class TestVersionChecking: + """Test version checking utilities.""" + + def test_get_crewai_version(self) -> None: + """Test getting current crewai version.""" + version = get_crewai_version() + assert isinstance(version, str) + assert len(version) > 0 + + def test_get_cache_file(self) -> None: + """Test cache file path generation.""" + cache_file = _get_cache_file() + assert isinstance(cache_file, Path) + assert cache_file.name == "version_cache.json" + + def test_is_cache_valid_with_fresh_cache(self) -> None: + """Test cache validation with fresh cache.""" + cache_data = {"timestamp": datetime.now().isoformat(), "version": "1.0.0"} + assert _is_cache_valid(cache_data) is True + + def test_is_cache_valid_with_stale_cache(self) -> None: + """Test cache validation with stale cache.""" + old_time = datetime.now() - timedelta(hours=25) + cache_data = {"timestamp": old_time.isoformat(), "version": "1.0.0"} + assert _is_cache_valid(cache_data) is False + + def test_is_cache_valid_with_missing_timestamp(self) -> None: + """Test cache validation with missing timestamp.""" + cache_data = {"version": "1.0.0"} + assert _is_cache_valid(cache_data) is False + + @patch("crewai.cli.version.Path.exists") + @patch("crewai.cli.version.request.urlopen") + def test_get_latest_version_from_pypi_success( + self, mock_urlopen: MagicMock, mock_exists: MagicMock + ) -> None: + """Test successful PyPI version fetch.""" + # Mock cache not existing to force fetch from PyPI + mock_exists.return_value = False + + mock_response = MagicMock() + mock_response.read.return_value = b'{"info": {"version": "2.0.0"}}' + mock_urlopen.return_value.__enter__.return_value = mock_response + + version = get_latest_version_from_pypi() + assert version == "2.0.0" + + @patch("crewai.cli.version.Path.exists") + @patch("crewai.cli.version.request.urlopen") + def test_get_latest_version_from_pypi_failure( + self, mock_urlopen: MagicMock, mock_exists: MagicMock + ) -> None: + """Test PyPI version fetch failure.""" + from urllib.error import URLError + + # Mock cache not existing to force fetch from PyPI + mock_exists.return_value = False + + mock_urlopen.side_effect = URLError("Network error") + + version = get_latest_version_from_pypi() + assert version is None + + @patch("crewai.cli.version.get_crewai_version") + @patch("crewai.cli.version.get_latest_version_from_pypi") + def test_is_newer_version_available_true( + self, mock_latest: MagicMock, mock_current: MagicMock + ) -> None: + """Test when newer version is available.""" + mock_current.return_value = "1.0.0" + mock_latest.return_value = "2.0.0" + + is_newer, current, latest = is_newer_version_available() + assert is_newer is True + assert current == "1.0.0" + assert latest == "2.0.0" + + @patch("crewai.cli.version.get_crewai_version") + @patch("crewai.cli.version.get_latest_version_from_pypi") + def test_is_newer_version_available_false( + self, mock_latest: MagicMock, mock_current: MagicMock + ) -> None: + """Test when no newer version is available.""" + mock_current.return_value = "2.0.0" + mock_latest.return_value = "2.0.0" + + is_newer, current, latest = is_newer_version_available() + assert is_newer is False + assert current == "2.0.0" + assert latest == "2.0.0" + + @patch("crewai.cli.version.get_crewai_version") + @patch("crewai.cli.version.get_latest_version_from_pypi") + def test_is_newer_version_available_with_none_latest( + self, mock_latest: MagicMock, mock_current: MagicMock + ) -> None: + """Test when PyPI fetch fails.""" + mock_current.return_value = "1.0.0" + mock_latest.return_value = None + + is_newer, current, latest = is_newer_version_available() + assert is_newer is False + assert current == "1.0.0" + assert latest is None + + +class TestConsoleFormatterVersionCheck: + """Test version check display in ConsoleFormatter.""" + + @patch("crewai.events.utils.console_formatter.is_newer_version_available") + @patch.dict("os.environ", {"CI": ""}) + def test_version_message_shows_when_update_available_and_verbose( + self, mock_check: MagicMock + ) -> None: + """Test version message shows when update available and verbose enabled.""" + from crewai.events.utils.console_formatter import ConsoleFormatter + + mock_check.return_value = (True, "1.0.0", "2.0.0") + + formatter = ConsoleFormatter(verbose=True) + with patch.object(formatter.console, "print") as mock_print: + formatter._show_version_update_message_if_needed() + assert mock_print.call_count == 2 + + @patch("crewai.events.utils.console_formatter.is_newer_version_available") + def test_version_message_hides_when_verbose_false( + self, mock_check: MagicMock + ) -> None: + """Test version message hidden when verbose disabled.""" + from crewai.events.utils.console_formatter import ConsoleFormatter + + mock_check.return_value = (True, "1.0.0", "2.0.0") + + formatter = ConsoleFormatter(verbose=False) + with patch.object(formatter.console, "print") as mock_print: + formatter._show_version_update_message_if_needed() + mock_print.assert_not_called() + + @patch("crewai.events.utils.console_formatter.is_newer_version_available") + def test_version_message_hides_when_no_update_available( + self, mock_check: MagicMock + ) -> None: + """Test version message hidden when no update available.""" + from crewai.events.utils.console_formatter import ConsoleFormatter + + mock_check.return_value = (False, "2.0.0", "2.0.0") + + formatter = ConsoleFormatter(verbose=True) + with patch.object(formatter.console, "print") as mock_print: + formatter._show_version_update_message_if_needed() + mock_print.assert_not_called() + + @patch("crewai.events.utils.console_formatter.is_newer_version_available") + @patch.dict("os.environ", {"CI": "true"}) + def test_version_message_hides_in_ci_environment( + self, mock_check: MagicMock + ) -> None: + """Test version message hidden when running in CI/CD.""" + from crewai.events.utils.console_formatter import ConsoleFormatter + + mock_check.return_value = (True, "1.0.0", "2.0.0") + + formatter = ConsoleFormatter(verbose=True) + with patch.object(formatter.console, "print") as mock_print: + formatter._show_version_update_message_if_needed() + mock_print.assert_not_called() + + @patch("crewai.events.utils.console_formatter.is_newer_version_available") + @patch.dict("os.environ", {"CI": "1"}) + def test_version_message_hides_in_ci_environment_with_numeric_value( + self, mock_check: MagicMock + ) -> None: + """Test version message hidden when CI=1.""" + from crewai.events.utils.console_formatter import ConsoleFormatter + + mock_check.return_value = (True, "1.0.0", "2.0.0") + + formatter = ConsoleFormatter(verbose=True) + with patch.object(formatter.console, "print") as mock_print: + formatter._show_version_update_message_if_needed() + mock_print.assert_not_called() diff --git a/lib/crewai/tests/test_streaming.py b/lib/crewai/tests/test_streaming.py index 5860755ff..8eb63694e 100644 --- a/lib/crewai/tests/test_streaming.py +++ b/lib/crewai/tests/test_streaming.py @@ -217,6 +217,7 @@ class TestCrewKickoffStreaming: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="Hello ", + call_id="test-call-id", ), ) crewai_event_bus.emit( @@ -224,6 +225,7 @@ class TestCrewKickoffStreaming: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="World!", + call_id="test-call-id", ), ) return mock_output @@ -284,6 +286,7 @@ class TestCrewKickoffStreaming: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="", + call_id="test-call-id", tool_call=ToolCall( id="call-123", function=FunctionCall( @@ -364,6 +367,7 @@ class TestCrewKickoffStreamingAsync: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="Async ", + call_id="test-call-id", ), ) crewai_event_bus.emit( @@ -371,6 +375,7 @@ class TestCrewKickoffStreamingAsync: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="Stream!", + call_id="test-call-id", ), ) return mock_output @@ -451,6 +456,7 @@ class TestFlowKickoffStreaming: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="Flow ", + call_id="test-call-id", ), ) crewai_event_bus.emit( @@ -458,6 +464,7 @@ class TestFlowKickoffStreaming: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="output!", + call_id="test-call-id", ), ) return "done" @@ -545,6 +552,7 @@ class TestFlowKickoffStreamingAsync: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="Async flow ", + call_id="test-call-id", ), ) await asyncio.sleep(0.01) @@ -553,6 +561,7 @@ class TestFlowKickoffStreamingAsync: LLMStreamChunkEvent( type="llm_stream_chunk", chunk="stream!", + call_id="test-call-id", ), ) await asyncio.sleep(0.01) @@ -686,6 +695,7 @@ class TestStreamingEdgeCases: type="llm_stream_chunk", chunk="Task 1", task_name="First task", + call_id="test-call-id", ), ) return mock_output diff --git a/lib/crewai/tests/test_task_guardrails.py b/lib/crewai/tests/test_task_guardrails.py index 986441343..814de2f8f 100644 --- a/lib/crewai/tests/test_task_guardrails.py +++ b/lib/crewai/tests/test_task_guardrails.py @@ -249,6 +249,8 @@ def test_guardrail_emits_events(sample_agent): result = task.execute_sync(agent=sample_agent) + crewai_event_bus.flush(timeout=10.0) + with condition: success = condition.wait_for( lambda: len(started_guardrail) >= 2 and len(completed_guardrail) >= 2, @@ -267,6 +269,8 @@ def test_guardrail_emits_events(sample_agent): task.execute_sync(agent=sample_agent) + crewai_event_bus.flush(timeout=10.0) + with condition: success = condition.wait_for( lambda: len(started_guardrail) >= 3 and len(completed_guardrail) >= 3, diff --git a/lib/crewai/tests/utilities/test_events.py b/lib/crewai/tests/utilities/test_events.py index 789f1f43e..81ef321d6 100644 --- a/lib/crewai/tests/utilities/test_events.py +++ b/lib/crewai/tests/utilities/test_events.py @@ -984,8 +984,8 @@ def test_streaming_fallback_to_non_streaming(): def mock_call(messages, tools=None, callbacks=None, available_functions=None): nonlocal fallback_called # Emit a couple of chunks to simulate partial streaming - crewai_event_bus.emit(llm, event=LLMStreamChunkEvent(chunk="Test chunk 1", response_id = "Id")) - crewai_event_bus.emit(llm, event=LLMStreamChunkEvent(chunk="Test chunk 2", response_id = "Id")) + crewai_event_bus.emit(llm, event=LLMStreamChunkEvent(chunk="Test chunk 1", response_id="Id", call_id="test-call-id")) + crewai_event_bus.emit(llm, event=LLMStreamChunkEvent(chunk="Test chunk 2", response_id="Id", call_id="test-call-id")) # Mark that fallback would be called fallback_called = True @@ -1041,7 +1041,7 @@ def test_streaming_empty_response_handling(): def mock_call(messages, tools=None, callbacks=None, available_functions=None): # Emit a few empty chunks for _ in range(3): - crewai_event_bus.emit(llm, event=LLMStreamChunkEvent(chunk="",response_id="id")) + crewai_event_bus.emit(llm, event=LLMStreamChunkEvent(chunk="", response_id="id", call_id="test-call-id")) # Return the default message for empty responses return "I apologize, but I couldn't generate a proper response. Please try again or rephrase your request." @@ -1280,6 +1280,105 @@ def test_llm_emits_event_with_lite_agent(): assert set(all_agent_id) == {str(agent.id)} +# ----------- CALL_ID CORRELATION TESTS ----------- + + +@pytest.mark.vcr() +def test_llm_call_events_share_call_id(): + """All events from a single LLM call should share the same call_id.""" + import uuid + + events = [] + condition = threading.Condition() + + @crewai_event_bus.on(LLMCallStartedEvent) + def on_start(source, event): + with condition: + events.append(event) + condition.notify() + + @crewai_event_bus.on(LLMCallCompletedEvent) + def on_complete(source, event): + with condition: + events.append(event) + condition.notify() + + llm = LLM(model="gpt-4o-mini") + llm.call("Say hi") + + with condition: + success = condition.wait_for(lambda: len(events) >= 2, timeout=10) + assert success, "Timeout waiting for LLM events" + + # Behavior: all events from the call share the same call_id + assert len(events) == 2 + assert events[0].call_id == events[1].call_id + # call_id should be a valid UUID + uuid.UUID(events[0].call_id) + + +@pytest.mark.vcr() +def test_streaming_chunks_share_call_id_with_call(): + """Streaming chunks should share call_id with started/completed events.""" + events = [] + condition = threading.Condition() + + @crewai_event_bus.on(LLMCallStartedEvent) + def on_start(source, event): + with condition: + events.append(event) + condition.notify() + + @crewai_event_bus.on(LLMStreamChunkEvent) + def on_chunk(source, event): + with condition: + events.append(event) + condition.notify() + + @crewai_event_bus.on(LLMCallCompletedEvent) + def on_complete(source, event): + with condition: + events.append(event) + condition.notify() + + llm = LLM(model="gpt-4o-mini", stream=True) + llm.call("Say hi") + + with condition: + # Wait for at least started, some chunks, and completed + success = condition.wait_for(lambda: len(events) >= 3, timeout=10) + assert success, "Timeout waiting for streaming events" + + # Behavior: all events (started, chunks, completed) share the same call_id + call_ids = {e.call_id for e in events} + assert len(call_ids) == 1 + + +@pytest.mark.vcr() +def test_separate_llm_calls_have_different_call_ids(): + """Different LLM calls should have different call_ids.""" + call_ids = [] + condition = threading.Condition() + + @crewai_event_bus.on(LLMCallStartedEvent) + def on_start(source, event): + with condition: + call_ids.append(event.call_id) + condition.notify() + + llm = LLM(model="gpt-4o-mini") + llm.call("Say hi") + llm.call("Say bye") + + with condition: + success = condition.wait_for(lambda: len(call_ids) >= 2, timeout=10) + assert success, "Timeout waiting for LLM call events" + + # Behavior: each call has its own call_id + assert len(call_ids) == 2 + assert call_ids[0] != call_ids[1] + + # ----------- HUMAN FEEDBACK EVENTS ----------- diff --git a/pyproject.toml b/pyproject.toml index df0a62288..35ec3096b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dev = [ "boto3-stubs[bedrock-runtime]==1.40.54", "types-psycopg2==2.9.21.20251012", "types-pymysql==1.1.0.20250916", - "types-aiofiles~=24.1.0", + "types-aiofiles~=25.1.0", ] diff --git a/uv.lock b/uv.lock index 499d4bd2d..db5618250 100644 --- a/uv.lock +++ b/uv.lock @@ -51,7 +51,7 @@ dev = [ { name = "pytest-timeout", specifier = "==2.4.0" }, { name = "pytest-xdist", specifier = "==3.8.0" }, { name = "ruff", specifier = "==0.14.7" }, - { name = "types-aiofiles", specifier = "~=24.1.0" }, + { name = "types-aiofiles", specifier = "~=25.1.0" }, { name = "types-appdirs", specifier = "==1.4.*" }, { name = "types-psycopg2", specifier = "==2.9.21.20251012" }, { name = "types-pymysql", specifier = "==1.1.0.20250916" }, @@ -1294,10 +1294,10 @@ requires-dist = [ { name = "json-repair", specifier = "~=0.25.2" }, { name = "json5", specifier = "~=0.10.0" }, { name = "jsonref", specifier = "~=1.1.0" }, - { name = "litellm", marker = "extra == 'litellm'", specifier = "~=1.74.9" }, + { name = "litellm", marker = "extra == 'litellm'", specifier = ">=1.74.9,<3" }, { name = "mcp", specifier = "~=1.23.1" }, { name = "mem0ai", marker = "extra == 'mem0'", specifier = "~=0.1.94" }, - { name = "openai", specifier = "~=1.83.0" }, + { name = "openai", specifier = ">=1.83.0,<3" }, { name = "openpyxl", specifier = "~=3.1.5" }, { name = "openpyxl", marker = "extra == 'openpyxl'", specifier = "~=3.1.5" }, { name = "opentelemetry-api", specifier = "~=1.34.0" }, @@ -8282,11 +8282,11 @@ wheels = [ [[package]] name = "types-aiofiles" -version = "24.1.0.20250822" +version = "25.1.0.20251011" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/19/48/c64471adac9206cc844afb33ed311ac5a65d2f59df3d861e0f2d0cad7414/types_aiofiles-24.1.0.20250822.tar.gz", hash = "sha256:9ab90d8e0c307fe97a7cf09338301e3f01a163e39f3b529ace82466355c84a7b", size = 14484, upload-time = "2025-08-22T03:02:23.039Z" } +sdist = { url = "https://files.pythonhosted.org/packages/84/6c/6d23908a8217e36704aa9c79d99a620f2fdd388b66a4b7f72fbc6b6ff6c6/types_aiofiles-25.1.0.20251011.tar.gz", hash = "sha256:1c2b8ab260cb3cd40c15f9d10efdc05a6e1e6b02899304d80dfa0410e028d3ff", size = 14535, upload-time = "2025-10-11T02:44:51.237Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bc/8e/5e6d2215e1d8f7c2a94c6e9d0059ae8109ce0f5681956d11bb0a228cef04/types_aiofiles-24.1.0.20250822-py3-none-any.whl", hash = "sha256:0ec8f8909e1a85a5a79aed0573af7901f53120dd2a29771dd0b3ef48e12328b0", size = 14322, upload-time = "2025-08-22T03:02:21.918Z" }, + { url = "https://files.pythonhosted.org/packages/71/0f/76917bab27e270bb6c32addd5968d69e558e5b6f7fb4ac4cbfa282996a96/types_aiofiles-25.1.0.20251011-py3-none-any.whl", hash = "sha256:8ff8de7f9d42739d8f0dadcceeb781ce27cd8d8c4152d4a7c52f6b20edb8149c", size = 14338, upload-time = "2025-10-11T02:44:50.054Z" }, ] [[package]]