mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-06 06:52:20 +02:00
drop provider-invalid reasoning-only history turns
This commit is contained in:
@@ -3899,7 +3899,6 @@ def provider_wire_messages(messages):
|
|||||||
item.get('role') == 'assistant'
|
item.get('role') == 'assistant'
|
||||||
and not item.get('content')
|
and not item.get('content')
|
||||||
and not item.get('tool_calls')
|
and not item.get('tool_calls')
|
||||||
and not item.get('reasoning_content')
|
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
cleaned.append(item)
|
cleaned.append(item)
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ def test_repeated_off_contract_artifact_calls_trigger_single_file_body_handoff()
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def test_provider_wire_keeps_deepseek_reasoning_only_turn_for_continuity():
|
def test_provider_wire_drops_deepseek_reasoning_only_turn_rejected_by_provider():
|
||||||
import src.clean_agent_preview as module
|
import src.clean_agent_preview as module
|
||||||
|
|
||||||
messages = [{
|
messages = [{
|
||||||
@@ -540,7 +540,7 @@ def test_provider_wire_keeps_deepseek_reasoning_only_turn_for_continuity():
|
|||||||
'reasoning_content': 'private provider reasoning token stream',
|
'reasoning_content': 'private provider reasoning token stream',
|
||||||
}]
|
}]
|
||||||
|
|
||||||
assert module.provider_wire_messages(messages) == messages
|
assert module.provider_wire_messages(messages) == []
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
|
|||||||
Reference in New Issue
Block a user