From 2295a1aad577344f7a0b5302736b13f1c93a623c Mon Sep 17 00:00:00 2001 From: Omar Abdelwahab Date: Fri, 7 Nov 2025 14:01:54 -0800 Subject: [PATCH] formatting changes --- src/llama_stack/apis/agents/openai_responses.py | 7 +------ .../remote/tool_runtime/model_context_protocol/config.py | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/llama_stack/apis/agents/openai_responses.py b/src/llama_stack/apis/agents/openai_responses.py index e273621d5..53aa25785 100644 --- a/src/llama_stack/apis/agents/openai_responses.py +++ b/src/llama_stack/apis/agents/openai_responses.py @@ -403,11 +403,7 @@ class OpenAIResponseText(BaseModel): # Must match type Literals of OpenAIResponseInputToolWebSearch below -WebSearchToolTypes = [ - "web_search", - "web_search_preview", - "web_search_preview_2025_03_11", -] +WebSearchToolTypes = ["web_search", "web_search_preview", "web_search_preview_2025_03_11"] @json_schema_type @@ -500,7 +496,6 @@ class OpenAIResponseInputToolMCP(BaseModel): server_label: str server_url: str headers: dict[str, Any] | None = None - # Authorization is excluded from serialization for security (never returned in responses) authorization: str | None = Field(default=None, exclude=True) require_approval: Literal["always"] | Literal["never"] | ApprovalFilter = "never" diff --git a/src/llama_stack/providers/remote/tool_runtime/model_context_protocol/config.py b/src/llama_stack/providers/remote/tool_runtime/model_context_protocol/config.py index c78a043a1..57b3f781f 100644 --- a/src/llama_stack/providers/remote/tool_runtime/model_context_protocol/config.py +++ b/src/llama_stack/providers/remote/tool_runtime/model_context_protocol/config.py @@ -12,10 +12,6 @@ from pydantic import BaseModel class MCPProviderDataValidator(BaseModel): """ Validator for MCP provider-specific data passed via request headers. - - This data structure is passed in the X-LlamaStack-Provider-Data header - to provide MCP endpoint-specific configuration. - Example usage: HTTP Request Headers: X-LlamaStack-Provider-Data: { @@ -29,18 +25,16 @@ class MCPProviderDataValidator(BaseModel): "http://weather-mcp.com": "weather_api_token_xyz" } } - Security Note: - Authorization header MUST NOT be placed in mcp_headers - Use the dedicated mcp_authorization field instead - Each MCP endpoint can have its own separate token - - Tokens are provided WITHOUT the "Bearer " prefix (added automatically) """ # mcp_endpoint => dict of headers to send (excluding Authorization) mcp_headers: dict[str, dict[str, str]] | None = None - # mcp_endpoint => authorization token (without "Bearer " prefix) + # mcp_endpoint => authorization token # Example: {"http://server.com": "token123"} mcp_authorization: dict[str, str] | None = None