diff --git a/packages/toolbox-core/src/toolbox_core/client.py b/packages/toolbox-core/src/toolbox_core/client.py index 85e8e358..5e6fc042 100644 --- a/packages/toolbox-core/src/toolbox_core/client.py +++ b/packages/toolbox-core/src/toolbox_core/client.py @@ -49,7 +49,7 @@ def __init__( client_headers: Optional[ Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]], str]] ] = None, - protocol: Protocol = Protocol.TOOLBOX, + protocol: Protocol = Protocol.MCP, ): """ Initializes the ToolboxClient. diff --git a/packages/toolbox-core/tests/test_e2e.py b/packages/toolbox-core/tests/test_e2e.py index b1275486..3379d7e8 100644 --- a/packages/toolbox-core/tests/test_e2e.py +++ b/packages/toolbox-core/tests/test_e2e.py @@ -20,6 +20,7 @@ from pydantic import ValidationError from toolbox_core.client import ToolboxClient +from toolbox_core.protocol import Protocol from toolbox_core.tool import ToolboxTool @@ -27,7 +28,7 @@ @pytest_asyncio.fixture(scope="function") async def toolbox(): """Creates a ToolboxClient instance shared by all tests in this module.""" - toolbox = ToolboxClient("http://localhost:5000") + toolbox = ToolboxClient("http://localhost:5000", protocol=Protocol.TOOLBOX) try: yield toolbox finally: diff --git a/packages/toolbox-core/tests/test_e2e_mcp.py b/packages/toolbox-core/tests/test_e2e_mcp.py index 9680aa87..996ed407 100644 --- a/packages/toolbox-core/tests/test_e2e_mcp.py +++ b/packages/toolbox-core/tests/test_e2e_mcp.py @@ -20,7 +20,6 @@ from pydantic import ValidationError from toolbox_core.client import ToolboxClient -from toolbox_core.protocol import Protocol from toolbox_core.tool import ToolboxTool @@ -28,7 +27,7 @@ @pytest_asyncio.fixture(scope="function") async def toolbox(): """Creates a ToolboxClient instance shared by all tests in this module.""" - toolbox = ToolboxClient("http://localhost:5000", protocol=Protocol.MCP) + toolbox = ToolboxClient("http://localhost:5000") try: yield toolbox finally: diff --git a/packages/toolbox-core/tests/test_sync_e2e.py b/packages/toolbox-core/tests/test_sync_e2e.py index f2730e47..64da3e5d 100644 --- a/packages/toolbox-core/tests/test_sync_e2e.py +++ b/packages/toolbox-core/tests/test_sync_e2e.py @@ -141,7 +141,7 @@ def test_run_tool_wrong_auth(self, toolbox: ToolboxSyncClient, auth_token2: str) auth_tool = tool.add_auth_token_getters({"my-test-auth": lambda: auth_token2}) with pytest.raises( Exception, - match="tool invocation not authorized", + match="Unauthorized", ): auth_tool(id="2") diff --git a/packages/toolbox-langchain/integration.cloudbuild.yaml b/packages/toolbox-langchain/integration.cloudbuild.yaml index 0334f9d4..bee3dcb5 100644 --- a/packages/toolbox-langchain/integration.cloudbuild.yaml +++ b/packages/toolbox-langchain/integration.cloudbuild.yaml @@ -47,5 +47,5 @@ options: logging: CLOUD_LOGGING_ONLY substitutions: _VERSION: '3.13' - _TOOLBOX_VERSION: '0.16.0' + _TOOLBOX_VERSION: '0.17.0' _TOOLBOX_MANIFEST_VERSION: '34' diff --git a/packages/toolbox-langchain/tests/test_e2e.py b/packages/toolbox-langchain/tests/test_e2e.py index ea750c5b..1dbdb3f9 100644 --- a/packages/toolbox-langchain/tests/test_e2e.py +++ b/packages/toolbox-langchain/tests/test_e2e.py @@ -143,7 +143,7 @@ async def test_run_tool_wrong_auth(self, toolbox, auth_token2): auth_tool = tool.add_auth_token_getter("my-test-auth", lambda: auth_token2) with pytest.raises( Exception, - match="tool invocation not authorized. Please make sure your specify correct auth headers", + match="Unauthorized", ): await auth_tool.ainvoke({"id": "2"}) @@ -290,7 +290,7 @@ def test_run_tool_wrong_auth(self, toolbox, auth_token2): auth_tool = tool.add_auth_token_getter("my-test-auth", lambda: auth_token2) with pytest.raises( Exception, - match="tool invocation not authorized. Please make sure your specify correct auth headers", + match="Unauthorized", ): auth_tool.invoke({"id": "2"}) diff --git a/packages/toolbox-llamaindex/integration.cloudbuild.yaml b/packages/toolbox-llamaindex/integration.cloudbuild.yaml index 488052f0..836cb7fe 100644 --- a/packages/toolbox-llamaindex/integration.cloudbuild.yaml +++ b/packages/toolbox-llamaindex/integration.cloudbuild.yaml @@ -47,5 +47,5 @@ options: logging: CLOUD_LOGGING_ONLY substitutions: _VERSION: '3.13' - _TOOLBOX_VERSION: '0.16.0' + _TOOLBOX_VERSION: '0.17.0' _TOOLBOX_MANIFEST_VERSION: '34' diff --git a/packages/toolbox-llamaindex/tests/test_e2e.py b/packages/toolbox-llamaindex/tests/test_e2e.py index 15973fb3..9dbaed6b 100644 --- a/packages/toolbox-llamaindex/tests/test_e2e.py +++ b/packages/toolbox-llamaindex/tests/test_e2e.py @@ -143,7 +143,7 @@ async def test_run_tool_wrong_auth(self, toolbox, auth_token2): auth_tool = tool.add_auth_token_getter("my-test-auth", lambda: auth_token2) with pytest.raises( Exception, - match="tool invocation not authorized. Please make sure your specify correct auth headers", + match="Unauthorized", ): await auth_tool.acall(id="2") @@ -290,7 +290,7 @@ def test_run_tool_wrong_auth(self, toolbox, auth_token2): auth_tool = tool.add_auth_token_getter("my-test-auth", lambda: auth_token2) with pytest.raises( Exception, - match="tool invocation not authorized. Please make sure your specify correct auth headers", + match="Unauthorized", ): auth_tool.call(id="2")