mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-21 06:12:21 +02:00
preserve artifact request contract in native traces
This commit is contained in:
@@ -4438,7 +4438,10 @@ async def stream_preview(*, endpoint_url, model, messages, headers, turn_contrac
|
|||||||
request = provider_compatible_tool_choice_request(request, model)
|
request = provider_compatible_tool_choice_request(request, model)
|
||||||
if artifact_write_phase and not successful_artifact_write:
|
if artifact_write_phase and not successful_artifact_write:
|
||||||
yield event({
|
yield event({
|
||||||
'type': 'provider_request_contract',
|
# Reuse the native runner's preserved step event family
|
||||||
|
# so request-boundary diagnostics survive normalization.
|
||||||
|
'type': 'agent_step',
|
||||||
|
'stage': 'provider_request',
|
||||||
'round': round_number,
|
'round': round_number,
|
||||||
'artifact_write_phase': True,
|
'artifact_write_phase': True,
|
||||||
'offered_tools': [
|
'offered_tools': [
|
||||||
|
|||||||
@@ -4705,7 +4705,8 @@ async def test_native_stream_reserves_remaining_budget_for_required_artifact(mon
|
|||||||
assert recovery["calls_used"] == module.NATIVE_ARTIFACT_RESEARCH_LIMIT
|
assert recovery["calls_used"] == module.NATIVE_ARTIFACT_RESEARCH_LIMIT
|
||||||
request_contract = next(
|
request_contract = next(
|
||||||
event for event in events
|
event for event in events
|
||||||
if event.get("type") == "provider_request_contract"
|
if event.get("type") == "agent_step"
|
||||||
|
and event.get("stage") == "provider_request"
|
||||||
and event.get("artifact_write_phase") is True
|
and event.get("artifact_write_phase") is True
|
||||||
)
|
)
|
||||||
assert "write_file" in request_contract["offered_tools"]
|
assert "write_file" in request_contract["offered_tools"]
|
||||||
|
|||||||
Reference in New Issue
Block a user