|
switch_profile: run the switch alone, then the batch on the new tools
A tool called in the same batch as switch_profile was still dispatched against the old tool_map and died with "tool 'X' not found" — reload_tools did, twice in one session. The batch is now split: the switch runs first, its ProfileSwitched event is watched for the target profile, the tools are re-resolved from it, and the remaining calls run against the new set. The turn's own profile binding is deliberately left alone — the end-of-iteration reload in run_stream() is what rebinds profile/llm/schemas, and pre-setting session.profile_id here would make it skip that step. |
|---|
|
|
| navi/core/agent.py |
|---|
| tests/unit/core/test_parallel_tools.py |
|---|