fix: enable tool forwarding by default and add config regression tests
Switch TOOL_FORWARD_ENABLED default to true in runtime config and .env.example, and add regression tests covering default-on and explicit false behavior. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -193,6 +193,18 @@ class ConfigParsingTests(unittest.TestCase):
|
||||
|
||||
self.assertEqual(settings.tool_allowlist, ["lookup", "write_file", "search_docs"])
|
||||
|
||||
def test_load_settings_defaults_tool_forward_enabled_true(self) -> None:
|
||||
with patch.dict(os.environ, {}, clear=True):
|
||||
settings = load_settings()
|
||||
|
||||
self.assertTrue(settings.tool_forward_enabled)
|
||||
|
||||
def test_load_settings_respects_tool_forward_enabled_false(self) -> None:
|
||||
with patch.dict(os.environ, {"TOOL_FORWARD_ENABLED": "false"}, clear=True):
|
||||
settings = load_settings()
|
||||
|
||||
self.assertFalse(settings.tool_forward_enabled)
|
||||
|
||||
def test_load_settings_empty_tool_allowlist(self) -> None:
|
||||
with patch.dict(os.environ, {"TOOL_ALLOWLIST": " , , "}, clear=True):
|
||||
settings = load_settings()
|
||||
|
||||
Reference in New Issue
Block a user