refactor(core): remove redundant runtime scaffolding (#5127)
This commit is contained in:
1 parent
4c77126b3d
commit
ef9e687f19
19 files changed
+89
-312
No files matched your search
@@ -132,12 +132,11 @@ class TestEnforceRoleAlternation:
|
||||
assert len(msgs) == 2
|
||||
|
||||
def test_trailing_assistant_recovered_as_user_when_only_system_remains(self):
|
||||
"""Subagent result injected as assistant message must not be silently dropped.
|
||||
"""A trailing assistant message must not be silently dropped.
|
||||
|
||||
When build_messages(current_role="assistant") produces [system, assistant],
|
||||
_enforce_role_alternation would drop the assistant, leaving only [system].
|
||||
Most providers (e.g. Zhipu/GLM error 1214) reject such requests.
|
||||
The trailing assistant should be recovered as a user message instead.
|
||||
An externally supplied [system, assistant] sequence would otherwise leave
|
||||
only [system]. Most providers reject such requests, so the trailing
|
||||
assistant should be recovered as a user message instead.
|
||||
"""
|
||||
msgs = [
|
||||
{"role": "system", "content": "You are helpful."},
|
||||
|
||||
Reference in new issue
Block a user