fix: improve bool param validation and preserve None tools

- Fix bool type checking in CommandFilter.validate_and_convert_params
  (was using isinstance(bool_instance, bool) instead of 'bool is bool')
- Preserve tools=None when persona explicitly has no tools
- Add missing provider_wake_prefix in test setup
This commit is contained in:
LIghtJUNction
2026-03-23 01:07:21 +08:00
parent 03c0b4c73e
commit 2e3a20fcdf
3 changed files with 13 additions and 4 deletions

View File

@@ -28,6 +28,8 @@ async def test_internal_stage_uses_effective_runner_streaming_flag():
stage = InternalAgentSubStage()
stage.ctx = MagicMock()
stage.ctx.plugin_manager.context = MagicMock()
stage.ctx.astrbot_config = {"provider_settings": {"wake_prefix": "!"}}
stage.provider_wake_prefix = "!"
stage.streaming_response = True
stage.unsupported_streaming_strategy = "realtime_segmenting"
stage.max_step = 5