diff --git a/client-sdks/stainless/openapi.yml b/client-sdks/stainless/openapi.yml index acd8b2aff..8af71cae8 100644 --- a/client-sdks/stainless/openapi.yml +++ b/client-sdks/stainless/openapi.yml @@ -7133,13 +7133,11 @@ components: - type: array - type: object description: >- - (Optional) HTTP headers to include when connecting to the server (cannot - contain Authorization) + (Optional) HTTP headers to include when connecting to the server authorization: type: string description: >- - (Optional) OAuth access token for authenticating with the MCP server (excluded - from responses) + (Optional) OAuth access token for authenticating with the MCP server require_approval: oneOf: - type: string diff --git a/docs/static/llama-stack-spec.yaml b/docs/static/llama-stack-spec.yaml index 63bd0db26..e1db390e0 100644 --- a/docs/static/llama-stack-spec.yaml +++ b/docs/static/llama-stack-spec.yaml @@ -6417,13 +6417,11 @@ components: - type: array - type: object description: >- - (Optional) HTTP headers to include when connecting to the server (cannot - contain Authorization) + (Optional) HTTP headers to include when connecting to the server authorization: type: string description: >- - (Optional) OAuth access token for authenticating with the MCP server (excluded - from responses) + (Optional) OAuth access token for authenticating with the MCP server require_approval: oneOf: - type: string diff --git a/docs/static/stainless-llama-stack-spec.yaml b/docs/static/stainless-llama-stack-spec.yaml index acd8b2aff..8af71cae8 100644 --- a/docs/static/stainless-llama-stack-spec.yaml +++ b/docs/static/stainless-llama-stack-spec.yaml @@ -7133,13 +7133,11 @@ components: - type: array - type: object description: >- - (Optional) HTTP headers to include when connecting to the server (cannot - contain Authorization) + (Optional) HTTP headers to include when connecting to the server authorization: type: string description: >- - (Optional) OAuth access token for authenticating with the MCP server (excluded - from responses) + (Optional) OAuth access token for authenticating with the MCP server require_approval: oneOf: - type: string diff --git a/tests/integration/responses/test_mcp_authentication.py b/tests/integration/responses/test_mcp_authentication.py index 61e7abe6f..e61c7983f 100644 --- a/tests/integration/responses/test_mcp_authentication.py +++ b/tests/integration/responses/test_mcp_authentication.py @@ -104,18 +104,14 @@ def test_mcp_authorization_error_when_header_provided(compat_client, text_model_ "type": "mcp", "server_label": "header-auth-mcp", "server_url": "", - "headers": { - "Authorization": f"Bearer {test_token}" - }, # Security risk - should be rejected + "headers": {"Authorization": f"Bearer {test_token}"}, # Security risk - should be rejected } ], mcp_server_info, ) # Create response - should raise ValueError for security reasons - with pytest.raises( - ValueError, match="Authorization header cannot be passed via 'headers'" - ): + with pytest.raises(ValueError, match="Authorization header cannot be passed via 'headers'"): compat_client.responses.create( model=text_model_id, input="What is the boiling point of myawesomeliquid?",