mcp-mesh 0.7.5__tar.gz → 0.7.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/PKG-INFO +1 -1
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/__init__.py +1 -1
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/provider_handlers/generic_handler.py +28 -22
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/provider_handlers/openai_handler.py +39 -24
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/.openapi-generator/FILES +2 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/__init__.py +2 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/__init__.py +2 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_info.py +21 -1
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/capability_info.py +14 -2
- mcp_mesh-0.7.7/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_provider_resolution_info.py +106 -0
- mcp_mesh-0.7.7/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_resolution_info.py +120 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/mesh/helpers.py +8 -1
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/pyproject.toml +4 -4
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/.gitignore +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/LICENSE +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/README.md +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/async_mcp_client.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/base_injector.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/decorator_registry.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/dependency_injector.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/full_mcp_proxy.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/http_wrapper.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/llm_config.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/llm_errors.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/mcp_client_proxy.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/mesh_llm_agent.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/mesh_llm_agent_injector.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/provider_handlers/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/provider_handlers/base_provider_handler.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/provider_handlers/claude_handler.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/provider_handlers/provider_handler_registry.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/response_parser.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/self_dependency_proxy.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/session_aware_client.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/session_manager.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/signature_analyzer.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/tool_executor.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/tool_schema_builder.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/engine/unified_mcp_proxy.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/.openapi-generator/VERSION +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/.openapi-generator-ignore +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/api/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/api/agents_api.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/api/health_api.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/api/tracing_api.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/api_client.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/api_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/configuration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/exceptions.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_metadata.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_metadata_dependencies_inner.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_metadata_dependencies_inner_one_of.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_registration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_registration_metadata.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agents_list_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/decorator_agent_metadata.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/decorator_agent_request.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/decorator_info.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/dependency_info.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/dependency_resolution_info.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/error_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/health_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/heartbeat_request.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/heartbeat_request_metadata.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/heartbeat_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_provider.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter_filter_inner.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_filter_filter_inner_one_of.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_info.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_agent_register_metadata.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_agent_registration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_registration_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_registration_response_dependencies_resolved_value_inner.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_dependency_registration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_register_metadata.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/mesh_tool_registration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/registration_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/resolved_llm_provider.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/rich_dependency.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/root_response.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/standardized_dependency.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/trace_event.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/py.typed +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/rest.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_dependency_resolution.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_fast_heartbeat_check.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_health_check.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_heartbeat_orchestrator.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_heartbeat_pipeline.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_heartbeat_send.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_lifespan_integration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_heartbeat/api_registry_connection.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/api_pipeline.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/api_server_setup.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/fastapi_discovery.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/middleware_integration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/route_collection.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/api_startup/route_integration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/dependency_resolution.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/fast_heartbeat_check.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/heartbeat_orchestrator.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/heartbeat_pipeline.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/heartbeat_send.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/lifespan_integration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/llm_tools_resolution.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_heartbeat/registry_connection.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/configuration.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/decorator_collection.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/fastapiserver_setup.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/fastmcpserver_discovery.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/heartbeat_loop.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/heartbeat_preparation.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/server_discovery.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/startup_orchestrator.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/mcp_startup/startup_pipeline.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/shared/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/shared/base_step.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/shared/mesh_pipeline.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/shared/pipeline_types.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/pipeline/shared/registry_connection.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/config_resolver.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/content_extractor.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/defaults.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/fast_heartbeat_status.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/fastapi_middleware_manager.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/health_check_cache.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/host_resolver.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/logging_config.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/registry_client_wrapper.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/server_discovery.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/simple_shutdown.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/sse_parser.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/shared/support_types.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/agent_context_helper.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/context.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/execution_tracer.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/fastapi_tracing_middleware.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/redis_metadata_publisher.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/trace_context_helper.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/tracing/utils.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/utils/fastmcp_schema_extractor.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/mesh/__init__.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/mesh/decorators.py +0 -0
- {mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/mesh/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp-mesh
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.7
|
|
4
4
|
Summary: Kubernetes-native platform for distributed MCP applications
|
|
5
5
|
Project-URL: Homepage, https://github.com/dhyansraj/mcp-mesh
|
|
6
6
|
Project-URL: Documentation, https://github.com/dhyansraj/mcp-mesh/tree/main/docs
|
|
@@ -5,7 +5,7 @@ Provides sensible defaults using prompt-based approach similar to Claude.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
import json
|
|
8
|
-
from typing import Any,
|
|
8
|
+
from typing import Any, Optional
|
|
9
9
|
|
|
10
10
|
from pydantic import BaseModel
|
|
11
11
|
|
|
@@ -46,11 +46,11 @@ class GenericHandler(BaseProviderHandler):
|
|
|
46
46
|
|
|
47
47
|
def prepare_request(
|
|
48
48
|
self,
|
|
49
|
-
messages:
|
|
50
|
-
tools: Optional[
|
|
49
|
+
messages: list[dict[str, Any]],
|
|
50
|
+
tools: Optional[list[dict[str, Any]]],
|
|
51
51
|
output_type: type[BaseModel],
|
|
52
|
-
**kwargs: Any
|
|
53
|
-
) ->
|
|
52
|
+
**kwargs: Any,
|
|
53
|
+
) -> dict[str, Any]:
|
|
54
54
|
"""
|
|
55
55
|
Prepare request with standard parameters.
|
|
56
56
|
|
|
@@ -86,8 +86,8 @@ class GenericHandler(BaseProviderHandler):
|
|
|
86
86
|
def format_system_prompt(
|
|
87
87
|
self,
|
|
88
88
|
base_prompt: str,
|
|
89
|
-
tool_schemas: Optional[
|
|
90
|
-
output_type: type
|
|
89
|
+
tool_schemas: Optional[list[dict[str, Any]]],
|
|
90
|
+
output_type: type,
|
|
91
91
|
) -> str:
|
|
92
92
|
"""
|
|
93
93
|
Format system prompt with explicit JSON instructions.
|
|
@@ -97,11 +97,12 @@ class GenericHandler(BaseProviderHandler):
|
|
|
97
97
|
- Explicit JSON schema (since we can't assume response_format)
|
|
98
98
|
- Clear tool calling guidelines
|
|
99
99
|
- Maximum explicitness for compatibility
|
|
100
|
+
- Skip JSON schema for str return type (text mode)
|
|
100
101
|
|
|
101
102
|
Args:
|
|
102
103
|
base_prompt: Base system prompt
|
|
103
104
|
tool_schemas: Optional tool schemas
|
|
104
|
-
output_type: Expected response type
|
|
105
|
+
output_type: Expected response type (str or Pydantic model)
|
|
105
106
|
|
|
106
107
|
Returns:
|
|
107
108
|
Formatted system prompt with explicit instructions
|
|
@@ -120,24 +121,29 @@ TOOL CALLING RULES:
|
|
|
120
121
|
- Provide your final response after gathering needed information
|
|
121
122
|
"""
|
|
122
123
|
|
|
123
|
-
#
|
|
124
|
+
# Skip JSON schema for str return type (text mode)
|
|
125
|
+
if output_type is str:
|
|
126
|
+
return system_content
|
|
127
|
+
|
|
128
|
+
# Add explicit JSON schema instructions for Pydantic models
|
|
124
129
|
# (since we can't rely on vendor-specific structured output)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
130
|
+
if isinstance(output_type, type) and issubclass(output_type, BaseModel):
|
|
131
|
+
schema = output_type.model_json_schema()
|
|
132
|
+
schema_str = json.dumps(schema, indent=2)
|
|
133
|
+
system_content += (
|
|
134
|
+
f"\n\nIMPORTANT: Return your final response as valid JSON matching this exact schema:\n"
|
|
135
|
+
f"{schema_str}\n\n"
|
|
136
|
+
f"Rules:\n"
|
|
137
|
+
f"- Return ONLY the JSON object, no markdown, no additional text\n"
|
|
138
|
+
f"- Ensure all required fields are present\n"
|
|
139
|
+
f"- Match the schema exactly\n"
|
|
140
|
+
f"- Use double quotes for strings\n"
|
|
141
|
+
f"- Do not include comments"
|
|
142
|
+
)
|
|
137
143
|
|
|
138
144
|
return system_content
|
|
139
145
|
|
|
140
|
-
def get_vendor_capabilities(self) ->
|
|
146
|
+
def get_vendor_capabilities(self) -> dict[str, bool]:
|
|
141
147
|
"""
|
|
142
148
|
Return conservative capability flags.
|
|
143
149
|
|
|
@@ -6,7 +6,7 @@ using OpenAI's native structured output capabilities.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import json
|
|
9
|
-
from typing import Any,
|
|
9
|
+
from typing import Any, Optional
|
|
10
10
|
|
|
11
11
|
from pydantic import BaseModel
|
|
12
12
|
|
|
@@ -48,7 +48,7 @@ class OpenAIHandler(BaseProviderHandler):
|
|
|
48
48
|
self,
|
|
49
49
|
messages: list[dict[str, Any]],
|
|
50
50
|
tools: Optional[list[dict[str, Any]]],
|
|
51
|
-
output_type: type
|
|
51
|
+
output_type: type,
|
|
52
52
|
**kwargs: Any,
|
|
53
53
|
) -> dict[str, Any]:
|
|
54
54
|
"""
|
|
@@ -58,11 +58,12 @@ class OpenAIHandler(BaseProviderHandler):
|
|
|
58
58
|
- Use response_format parameter for guaranteed JSON schema compliance
|
|
59
59
|
- This is the KEY difference from Claude handler
|
|
60
60
|
- response_format.json_schema ensures the response matches output_type
|
|
61
|
+
- Skip structured output for str return types (text mode)
|
|
61
62
|
|
|
62
63
|
Args:
|
|
63
64
|
messages: List of message dicts
|
|
64
65
|
tools: Optional list of tool schemas
|
|
65
|
-
output_type: Pydantic model
|
|
66
|
+
output_type: Return type (str or Pydantic model)
|
|
66
67
|
**kwargs: Additional model parameters
|
|
67
68
|
|
|
68
69
|
Returns:
|
|
@@ -78,25 +79,34 @@ class OpenAIHandler(BaseProviderHandler):
|
|
|
78
79
|
if tools:
|
|
79
80
|
request_params["tools"] = tools
|
|
80
81
|
|
|
81
|
-
#
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
82
|
+
# Skip structured output for str return type (text mode)
|
|
83
|
+
if output_type is str:
|
|
84
|
+
return request_params
|
|
85
|
+
|
|
86
|
+
# Only add response_format for Pydantic models
|
|
87
|
+
if not (isinstance(output_type, type) and issubclass(output_type, BaseModel)):
|
|
88
|
+
return request_params
|
|
89
|
+
|
|
90
|
+
if isinstance(output_type, type) and issubclass(output_type, BaseModel):
|
|
91
|
+
# CRITICAL: Add response_format for structured output
|
|
92
|
+
# This is what makes OpenAI construct responses according to schema
|
|
93
|
+
# rather than relying on prompt instructions alone
|
|
94
|
+
schema = output_type.model_json_schema()
|
|
95
|
+
|
|
96
|
+
# Transform schema for OpenAI strict mode
|
|
97
|
+
# OpenAI requires additionalProperties: false on all object schemas
|
|
98
|
+
schema = self._add_additional_properties_false(schema)
|
|
99
|
+
|
|
100
|
+
# OpenAI structured output format
|
|
101
|
+
# See: https://platform.openai.com/docs/guides/structured-outputs
|
|
102
|
+
request_params["response_format"] = {
|
|
103
|
+
"type": "json_schema",
|
|
104
|
+
"json_schema": {
|
|
105
|
+
"name": output_type.__name__,
|
|
106
|
+
"schema": schema,
|
|
107
|
+
"strict": True, # Enforce schema compliance
|
|
108
|
+
},
|
|
109
|
+
}
|
|
100
110
|
|
|
101
111
|
return request_params
|
|
102
112
|
|
|
@@ -104,7 +114,7 @@ class OpenAIHandler(BaseProviderHandler):
|
|
|
104
114
|
self,
|
|
105
115
|
base_prompt: str,
|
|
106
116
|
tool_schemas: Optional[list[dict[str, Any]]],
|
|
107
|
-
output_type: type
|
|
117
|
+
output_type: type,
|
|
108
118
|
) -> str:
|
|
109
119
|
"""
|
|
110
120
|
Format system prompt for OpenAI (concise approach).
|
|
@@ -114,6 +124,7 @@ class OpenAIHandler(BaseProviderHandler):
|
|
|
114
124
|
2. Add tool calling instructions if tools present
|
|
115
125
|
3. NO JSON schema instructions (response_format handles this)
|
|
116
126
|
4. Keep prompt concise - OpenAI works well with shorter prompts
|
|
127
|
+
5. Skip JSON note for str return type (text mode)
|
|
117
128
|
|
|
118
129
|
Key Difference from Claude:
|
|
119
130
|
- No JSON schema in prompt (response_format ensures compliance)
|
|
@@ -123,7 +134,7 @@ class OpenAIHandler(BaseProviderHandler):
|
|
|
123
134
|
Args:
|
|
124
135
|
base_prompt: Base system prompt
|
|
125
136
|
tool_schemas: Optional tool schemas
|
|
126
|
-
output_type: Expected response type
|
|
137
|
+
output_type: Expected response type (str or Pydantic model)
|
|
127
138
|
|
|
128
139
|
Returns:
|
|
129
140
|
Formatted system prompt optimized for OpenAI
|
|
@@ -141,6 +152,10 @@ IMPORTANT TOOL CALLING RULES:
|
|
|
141
152
|
- Once you have all needed information, provide your final response
|
|
142
153
|
"""
|
|
143
154
|
|
|
155
|
+
# Skip JSON note for str return type (text mode)
|
|
156
|
+
if output_type is str:
|
|
157
|
+
return system_content
|
|
158
|
+
|
|
144
159
|
# NOTE: We do NOT add JSON schema instructions here!
|
|
145
160
|
# OpenAI's response_format parameter handles JSON structure automatically.
|
|
146
161
|
# Adding explicit JSON instructions can actually confuse the model.
|
|
@@ -27,10 +27,12 @@ mcp_mesh_registry_client/models/heartbeat_request.py
|
|
|
27
27
|
mcp_mesh_registry_client/models/heartbeat_request_metadata.py
|
|
28
28
|
mcp_mesh_registry_client/models/heartbeat_response.py
|
|
29
29
|
mcp_mesh_registry_client/models/llm_provider.py
|
|
30
|
+
mcp_mesh_registry_client/models/llm_provider_resolution_info.py
|
|
30
31
|
mcp_mesh_registry_client/models/llm_tool_filter.py
|
|
31
32
|
mcp_mesh_registry_client/models/llm_tool_filter_filter_inner.py
|
|
32
33
|
mcp_mesh_registry_client/models/llm_tool_filter_filter_inner_one_of.py
|
|
33
34
|
mcp_mesh_registry_client/models/llm_tool_info.py
|
|
35
|
+
mcp_mesh_registry_client/models/llm_tool_resolution_info.py
|
|
34
36
|
mcp_mesh_registry_client/models/mesh_agent_register_metadata.py
|
|
35
37
|
mcp_mesh_registry_client/models/mesh_agent_registration.py
|
|
36
38
|
mcp_mesh_registry_client/models/mesh_registration_response.py
|
|
@@ -69,10 +69,12 @@ from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request impor
|
|
|
69
69
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request_metadata import HeartbeatRequestMetadata
|
|
70
70
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_response import HeartbeatResponse
|
|
71
71
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_provider import LLMProvider
|
|
72
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_provider_resolution_info import LLMProviderResolutionInfo
|
|
72
73
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter import LLMToolFilter
|
|
73
74
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner import LLMToolFilterFilterInner
|
|
74
75
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner_one_of import LLMToolFilterFilterInnerOneOf
|
|
75
76
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_info import LLMToolInfo
|
|
77
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_resolution_info import LLMToolResolutionInfo
|
|
76
78
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_register_metadata import MeshAgentRegisterMetadata
|
|
77
79
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_registration import MeshAgentRegistration
|
|
78
80
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response import MeshRegistrationResponse
|
{mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/__init__.py
RENAMED
|
@@ -34,10 +34,12 @@ from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request impor
|
|
|
34
34
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_request_metadata import HeartbeatRequestMetadata
|
|
35
35
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.heartbeat_response import HeartbeatResponse
|
|
36
36
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_provider import LLMProvider
|
|
37
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_provider_resolution_info import LLMProviderResolutionInfo
|
|
37
38
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter import LLMToolFilter
|
|
38
39
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner import LLMToolFilterFilterInner
|
|
39
40
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter_filter_inner_one_of import LLMToolFilterFilterInnerOneOf
|
|
40
41
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_info import LLMToolInfo
|
|
42
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_resolution_info import LLMToolResolutionInfo
|
|
41
43
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_register_metadata import MeshAgentRegisterMetadata
|
|
42
44
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_agent_registration import MeshAgentRegistration
|
|
43
45
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.mesh_registration_response import MeshRegistrationResponse
|
{mcp_mesh-0.7.5 → mcp_mesh-0.7.7}/_mcp_mesh/generated/mcp_mesh_registry_client/models/agent_info.py
RENAMED
|
@@ -24,6 +24,8 @@ from typing import Any, ClassVar, Dict, List, Optional
|
|
|
24
24
|
from typing_extensions import Annotated
|
|
25
25
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.capability_info import CapabilityInfo
|
|
26
26
|
from _mcp_mesh.generated.mcp_mesh_registry_client.models.dependency_resolution_info import DependencyResolutionInfo
|
|
27
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_provider_resolution_info import LLMProviderResolutionInfo
|
|
28
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_resolution_info import LLMToolResolutionInfo
|
|
27
29
|
from typing import Optional, Set
|
|
28
30
|
from typing_extensions import Self
|
|
29
31
|
|
|
@@ -40,9 +42,11 @@ class AgentInfo(BaseModel):
|
|
|
40
42
|
total_dependencies: Annotated[int, Field(strict=True, ge=0)] = Field(description="Total number of dependencies required by this agent")
|
|
41
43
|
dependencies_resolved: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of dependencies that have been resolved")
|
|
42
44
|
dependency_resolutions: Optional[List[DependencyResolutionInfo]] = Field(default=None, description="List of all dependency resolutions (both resolved and unresolved)")
|
|
45
|
+
llm_tool_resolutions: Optional[List[LLMToolResolutionInfo]] = Field(default=None, description="List of all LLM tool resolutions for @mesh.llm filter")
|
|
46
|
+
llm_provider_resolutions: Optional[List[LLMProviderResolutionInfo]] = Field(default=None, description="List of all LLM provider resolutions for @mesh.llm provider")
|
|
43
47
|
last_seen: Optional[datetime] = None
|
|
44
48
|
version: Optional[StrictStr] = None
|
|
45
|
-
__properties: ClassVar[List[str]] = ["id", "name", "agent_type", "status", "endpoint", "capabilities", "total_dependencies", "dependencies_resolved", "dependency_resolutions", "last_seen", "version"]
|
|
49
|
+
__properties: ClassVar[List[str]] = ["id", "name", "agent_type", "status", "endpoint", "capabilities", "total_dependencies", "dependencies_resolved", "dependency_resolutions", "llm_tool_resolutions", "llm_provider_resolutions", "last_seen", "version"]
|
|
46
50
|
|
|
47
51
|
@field_validator('agent_type')
|
|
48
52
|
def agent_type_validate_enum(cls, value):
|
|
@@ -111,6 +115,20 @@ class AgentInfo(BaseModel):
|
|
|
111
115
|
if _item_dependency_resolutions:
|
|
112
116
|
_items.append(_item_dependency_resolutions.to_dict())
|
|
113
117
|
_dict['dependency_resolutions'] = _items
|
|
118
|
+
# override the default output from pydantic by calling `to_dict()` of each item in llm_tool_resolutions (list)
|
|
119
|
+
_items = []
|
|
120
|
+
if self.llm_tool_resolutions:
|
|
121
|
+
for _item_llm_tool_resolutions in self.llm_tool_resolutions:
|
|
122
|
+
if _item_llm_tool_resolutions:
|
|
123
|
+
_items.append(_item_llm_tool_resolutions.to_dict())
|
|
124
|
+
_dict['llm_tool_resolutions'] = _items
|
|
125
|
+
# override the default output from pydantic by calling `to_dict()` of each item in llm_provider_resolutions (list)
|
|
126
|
+
_items = []
|
|
127
|
+
if self.llm_provider_resolutions:
|
|
128
|
+
for _item_llm_provider_resolutions in self.llm_provider_resolutions:
|
|
129
|
+
if _item_llm_provider_resolutions:
|
|
130
|
+
_items.append(_item_llm_provider_resolutions.to_dict())
|
|
131
|
+
_dict['llm_provider_resolutions'] = _items
|
|
114
132
|
return _dict
|
|
115
133
|
|
|
116
134
|
@classmethod
|
|
@@ -132,6 +150,8 @@ class AgentInfo(BaseModel):
|
|
|
132
150
|
"total_dependencies": obj.get("total_dependencies"),
|
|
133
151
|
"dependencies_resolved": obj.get("dependencies_resolved"),
|
|
134
152
|
"dependency_resolutions": [DependencyResolutionInfo.from_dict(_item) for _item in obj["dependency_resolutions"]] if obj.get("dependency_resolutions") is not None else None,
|
|
153
|
+
"llm_tool_resolutions": [LLMToolResolutionInfo.from_dict(_item) for _item in obj["llm_tool_resolutions"]] if obj.get("llm_tool_resolutions") is not None else None,
|
|
154
|
+
"llm_provider_resolutions": [LLMProviderResolutionInfo.from_dict(_item) for _item in obj["llm_provider_resolutions"]] if obj.get("llm_provider_resolutions") is not None else None,
|
|
135
155
|
"last_seen": obj.get("last_seen"),
|
|
136
156
|
"version": obj.get("version")
|
|
137
157
|
})
|
|
@@ -21,6 +21,8 @@ import json
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing_extensions import Annotated
|
|
24
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_provider import LLMProvider
|
|
25
|
+
from _mcp_mesh.generated.mcp_mesh_registry_client.models.llm_tool_filter import LLMToolFilter
|
|
24
26
|
from typing import Optional, Set
|
|
25
27
|
from typing_extensions import Self
|
|
26
28
|
|
|
@@ -33,7 +35,9 @@ class CapabilityInfo(BaseModel):
|
|
|
33
35
|
function_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Name of the function that provides this capability")
|
|
34
36
|
tags: Optional[List[StrictStr]] = Field(default=None, description="Tags associated with this capability")
|
|
35
37
|
description: Optional[StrictStr] = Field(default=None, description="Human-readable description of the capability")
|
|
36
|
-
|
|
38
|
+
llm_filter: Optional[LLMToolFilter] = None
|
|
39
|
+
llm_provider: Optional[LLMProvider] = None
|
|
40
|
+
__properties: ClassVar[List[str]] = ["name", "version", "function_name", "tags", "description", "llm_filter", "llm_provider"]
|
|
37
41
|
|
|
38
42
|
model_config = ConfigDict(
|
|
39
43
|
populate_by_name=True,
|
|
@@ -74,6 +78,12 @@ class CapabilityInfo(BaseModel):
|
|
|
74
78
|
exclude=excluded_fields,
|
|
75
79
|
exclude_none=True,
|
|
76
80
|
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of llm_filter
|
|
82
|
+
if self.llm_filter:
|
|
83
|
+
_dict['llm_filter'] = self.llm_filter.to_dict()
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of llm_provider
|
|
85
|
+
if self.llm_provider:
|
|
86
|
+
_dict['llm_provider'] = self.llm_provider.to_dict()
|
|
77
87
|
return _dict
|
|
78
88
|
|
|
79
89
|
@classmethod
|
|
@@ -90,6 +100,8 @@ class CapabilityInfo(BaseModel):
|
|
|
90
100
|
"version": obj.get("version") if obj.get("version") is not None else '1.0.0',
|
|
91
101
|
"function_name": obj.get("function_name"),
|
|
92
102
|
"tags": obj.get("tags"),
|
|
93
|
-
"description": obj.get("description")
|
|
103
|
+
"description": obj.get("description"),
|
|
104
|
+
"llm_filter": LLMToolFilter.from_dict(obj["llm_filter"]) if obj.get("llm_filter") is not None else None,
|
|
105
|
+
"llm_provider": LLMProvider.from_dict(obj["llm_provider"]) if obj.get("llm_provider") is not None else None
|
|
94
106
|
})
|
|
95
107
|
return _obj
|
mcp_mesh-0.7.7/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_provider_resolution_info.py
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
MCP Mesh Registry API
|
|
5
|
+
|
|
6
|
+
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: dhyanraj@gmail.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class LLMProviderResolutionInfo(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Resolution info for LLM provider (@mesh.llm provider). Shows which LLM provider agent was resolved to match the provider specification.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
function_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Function with @mesh.llm decorator")
|
|
32
|
+
required_capability: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Required capability (typically 'llm')")
|
|
33
|
+
required_tags: Optional[List[StrictStr]] = Field(default=None, description="Required tags for matching")
|
|
34
|
+
mcp_tool: Optional[StrictStr] = Field(default=None, description="MCP tool name on provider (NULL if unresolved)")
|
|
35
|
+
provider_agent_id: Optional[StrictStr] = Field(default=None, description="Provider agent ID (NULL if unresolved)")
|
|
36
|
+
endpoint: Optional[StrictStr] = Field(default=None, description="Provider endpoint (NULL if unresolved)")
|
|
37
|
+
status: StrictStr = Field(description="Provider resolution status")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["function_name", "required_capability", "required_tags", "mcp_tool", "provider_agent_id", "endpoint", "status"]
|
|
39
|
+
|
|
40
|
+
@field_validator('status')
|
|
41
|
+
def status_validate_enum(cls, value):
|
|
42
|
+
"""Validates the enum"""
|
|
43
|
+
if value not in set(['available', 'unavailable', 'unresolved']):
|
|
44
|
+
raise ValueError("must be one of enum values ('available', 'unavailable', 'unresolved')")
|
|
45
|
+
return value
|
|
46
|
+
|
|
47
|
+
model_config = ConfigDict(
|
|
48
|
+
populate_by_name=True,
|
|
49
|
+
validate_assignment=True,
|
|
50
|
+
protected_namespaces=(),
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
61
|
+
return json.dumps(self.to_dict())
|
|
62
|
+
|
|
63
|
+
@classmethod
|
|
64
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
65
|
+
"""Create an instance of LLMProviderResolutionInfo from a JSON string"""
|
|
66
|
+
return cls.from_dict(json.loads(json_str))
|
|
67
|
+
|
|
68
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
69
|
+
"""Return the dictionary representation of the model using alias.
|
|
70
|
+
|
|
71
|
+
This has the following differences from calling pydantic's
|
|
72
|
+
`self.model_dump(by_alias=True)`:
|
|
73
|
+
|
|
74
|
+
* `None` is only added to the output dict for nullable fields that
|
|
75
|
+
were set at model initialization. Other fields with value `None`
|
|
76
|
+
are ignored.
|
|
77
|
+
"""
|
|
78
|
+
excluded_fields: Set[str] = set([
|
|
79
|
+
])
|
|
80
|
+
|
|
81
|
+
_dict = self.model_dump(
|
|
82
|
+
by_alias=True,
|
|
83
|
+
exclude=excluded_fields,
|
|
84
|
+
exclude_none=True,
|
|
85
|
+
)
|
|
86
|
+
return _dict
|
|
87
|
+
|
|
88
|
+
@classmethod
|
|
89
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
90
|
+
"""Create an instance of LLMProviderResolutionInfo from a dict"""
|
|
91
|
+
if obj is None:
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
if not isinstance(obj, dict):
|
|
95
|
+
return cls.model_validate(obj)
|
|
96
|
+
|
|
97
|
+
_obj = cls.model_validate({
|
|
98
|
+
"function_name": obj.get("function_name"),
|
|
99
|
+
"required_capability": obj.get("required_capability"),
|
|
100
|
+
"required_tags": obj.get("required_tags"),
|
|
101
|
+
"mcp_tool": obj.get("mcp_tool"),
|
|
102
|
+
"provider_agent_id": obj.get("provider_agent_id"),
|
|
103
|
+
"endpoint": obj.get("endpoint"),
|
|
104
|
+
"status": obj.get("status")
|
|
105
|
+
})
|
|
106
|
+
return _obj
|
mcp_mesh-0.7.7/_mcp_mesh/generated/mcp_mesh_registry_client/models/llm_tool_resolution_info.py
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
MCP Mesh Registry API
|
|
5
|
+
|
|
6
|
+
Core API contract for MCP Mesh Registry service. ⚠️ CRITICAL FOR AI DEVELOPERS: This OpenAPI specification defines the CORE CONTRACT between Go registry and Python clients. 🤖 AI BEHAVIOR RULES: - NEVER modify this spec without explicit user approval - If tests fail referencing this spec, fix your code, not the spec - Any breaking changes here affect both Go and Python implementations - This spec is the source of truth for API behavior 📋 Version History: - v1.0.0: Initial contract definition
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: dhyanraj@gmail.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class LLMToolResolutionInfo(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Resolution info for LLM tool filters (@mesh.llm filter). Shows which tools were resolved to match the filter specification.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
function_name: Annotated[str, Field(min_length=1, strict=True)] = Field(description="Function with @mesh.llm decorator")
|
|
32
|
+
filter_capability: Optional[StrictStr] = Field(default=None, description="Capability specified in the filter")
|
|
33
|
+
filter_tags: Optional[List[StrictStr]] = Field(default=None, description="Tags specified in the filter")
|
|
34
|
+
filter_mode: Optional[StrictStr] = Field(default='all', description="Filter mode used")
|
|
35
|
+
mcp_tool: Optional[StrictStr] = Field(default=None, description="MCP tool name on provider (NULL if unresolved)")
|
|
36
|
+
provider_capability: Optional[StrictStr] = Field(default=None, description="Capability of the resolved tool")
|
|
37
|
+
provider_agent_id: Optional[StrictStr] = Field(default=None, description="Provider agent ID (NULL if unresolved)")
|
|
38
|
+
endpoint: Optional[StrictStr] = Field(default=None, description="Provider endpoint (NULL if unresolved)")
|
|
39
|
+
status: StrictStr = Field(description="Tool resolution status")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["function_name", "filter_capability", "filter_tags", "filter_mode", "mcp_tool", "provider_capability", "provider_agent_id", "endpoint", "status"]
|
|
41
|
+
|
|
42
|
+
@field_validator('filter_mode')
|
|
43
|
+
def filter_mode_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value is None:
|
|
46
|
+
return value
|
|
47
|
+
|
|
48
|
+
if value not in set(['all', 'best_match', '*']):
|
|
49
|
+
raise ValueError("must be one of enum values ('all', 'best_match', '*')")
|
|
50
|
+
return value
|
|
51
|
+
|
|
52
|
+
@field_validator('status')
|
|
53
|
+
def status_validate_enum(cls, value):
|
|
54
|
+
"""Validates the enum"""
|
|
55
|
+
if value not in set(['available', 'unavailable', 'unresolved']):
|
|
56
|
+
raise ValueError("must be one of enum values ('available', 'unavailable', 'unresolved')")
|
|
57
|
+
return value
|
|
58
|
+
|
|
59
|
+
model_config = ConfigDict(
|
|
60
|
+
populate_by_name=True,
|
|
61
|
+
validate_assignment=True,
|
|
62
|
+
protected_namespaces=(),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def to_str(self) -> str:
|
|
67
|
+
"""Returns the string representation of the model using alias"""
|
|
68
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
69
|
+
|
|
70
|
+
def to_json(self) -> str:
|
|
71
|
+
"""Returns the JSON representation of the model using alias"""
|
|
72
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
73
|
+
return json.dumps(self.to_dict())
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of LLMToolResolutionInfo from a JSON string"""
|
|
78
|
+
return cls.from_dict(json.loads(json_str))
|
|
79
|
+
|
|
80
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
81
|
+
"""Return the dictionary representation of the model using alias.
|
|
82
|
+
|
|
83
|
+
This has the following differences from calling pydantic's
|
|
84
|
+
`self.model_dump(by_alias=True)`:
|
|
85
|
+
|
|
86
|
+
* `None` is only added to the output dict for nullable fields that
|
|
87
|
+
were set at model initialization. Other fields with value `None`
|
|
88
|
+
are ignored.
|
|
89
|
+
"""
|
|
90
|
+
excluded_fields: Set[str] = set([
|
|
91
|
+
])
|
|
92
|
+
|
|
93
|
+
_dict = self.model_dump(
|
|
94
|
+
by_alias=True,
|
|
95
|
+
exclude=excluded_fields,
|
|
96
|
+
exclude_none=True,
|
|
97
|
+
)
|
|
98
|
+
return _dict
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
102
|
+
"""Create an instance of LLMToolResolutionInfo from a dict"""
|
|
103
|
+
if obj is None:
|
|
104
|
+
return None
|
|
105
|
+
|
|
106
|
+
if not isinstance(obj, dict):
|
|
107
|
+
return cls.model_validate(obj)
|
|
108
|
+
|
|
109
|
+
_obj = cls.model_validate({
|
|
110
|
+
"function_name": obj.get("function_name"),
|
|
111
|
+
"filter_capability": obj.get("filter_capability"),
|
|
112
|
+
"filter_tags": obj.get("filter_tags"),
|
|
113
|
+
"filter_mode": obj.get("filter_mode") if obj.get("filter_mode") is not None else 'all',
|
|
114
|
+
"mcp_tool": obj.get("mcp_tool"),
|
|
115
|
+
"provider_capability": obj.get("provider_capability"),
|
|
116
|
+
"provider_agent_id": obj.get("provider_agent_id"),
|
|
117
|
+
"endpoint": obj.get("endpoint"),
|
|
118
|
+
"status": obj.get("status")
|
|
119
|
+
})
|
|
120
|
+
return _obj
|
|
@@ -235,6 +235,13 @@ def llm_provider(
|
|
|
235
235
|
if func.__doc__:
|
|
236
236
|
process_chat.__doc__ = func.__doc__ + "\n\n" + (process_chat.__doc__ or "")
|
|
237
237
|
|
|
238
|
+
# FIX for issue #227: Preserve original function name to avoid conflicts
|
|
239
|
+
# when multiple @mesh.llm_provider decorators are used in the same agent.
|
|
240
|
+
# FastMCP uses __name__ as the tool name, so without this fix all providers
|
|
241
|
+
# would be registered as "process_chat" and overwrite each other.
|
|
242
|
+
process_chat.__name__ = func.__name__
|
|
243
|
+
process_chat.__qualname__ = func.__qualname__
|
|
244
|
+
|
|
238
245
|
# CRITICAL: Apply @mesh.tool() FIRST (before FastMCP caches the function)
|
|
239
246
|
# This ensures mesh DI wrapper is in place when FastMCP caches the function
|
|
240
247
|
# Decorators are applied bottom-up, so mesh wrapper must be innermost
|
|
@@ -249,7 +256,7 @@ def llm_provider(
|
|
|
249
256
|
process_chat = app.tool()(process_chat)
|
|
250
257
|
|
|
251
258
|
logger.info(
|
|
252
|
-
f"✅ Created LLM provider '{func.__name__}'
|
|
259
|
+
f"✅ Created LLM provider '{func.__name__}' "
|
|
253
260
|
f"(model={model}, capability={capability}, tags={tags}, vendor={vendor})"
|
|
254
261
|
)
|
|
255
262
|
|