mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-06 21:22:23 +01:00
expose required artifacts in turn audit
This commit is contained in:
@@ -4212,6 +4212,7 @@ async def stream_preview(*, endpoint_url, model, messages, headers, turn_contrac
|
|||||||
) if native_workspace_enabled else tuple()
|
) if native_workspace_enabled else tuple()
|
||||||
yield event({'type': 'turn_contract', **turn_contract.audit(), 'schema_mode': 'compact_contract_v5',
|
yield event({'type': 'turn_contract', **turn_contract.audit(), 'schema_mode': 'compact_contract_v5',
|
||||||
'native_workspace': native_workspace_enabled,
|
'native_workspace': native_workspace_enabled,
|
||||||
|
'required_artifacts': list(required_artifacts),
|
||||||
'multimodal_image_count': image_context_count,
|
'multimodal_image_count': image_context_count,
|
||||||
'attachment_reference_count': attachment_refs,
|
'attachment_reference_count': attachment_refs,
|
||||||
'image_rehydration': conversation_diagnostics.get('image_rehydration')})
|
'image_rehydration': conversation_diagnostics.get('image_rehydration')})
|
||||||
|
|||||||
@@ -4688,6 +4688,8 @@ async def test_native_stream_reserves_remaining_budget_for_required_artifact(mon
|
|||||||
)]
|
)]
|
||||||
|
|
||||||
events = [json.loads(chunk[6:]) for chunk in raw if "[DONE]" not in chunk]
|
events = [json.loads(chunk[6:]) for chunk in raw if "[DONE]" not in chunk]
|
||||||
|
turn_contract = next(event for event in events if event.get("type") == "turn_contract")
|
||||||
|
assert turn_contract["required_artifacts"] == ["/tmp_workspace/results"]
|
||||||
recovery = next(
|
recovery = next(
|
||||||
event for event in events
|
event for event in events
|
||||||
if event.get("type") == "completion_recovery"
|
if event.get("type") == "completion_recovery"
|
||||||
|
|||||||
Reference in New Issue
Block a user