Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(realtime): seed assistant history with the GA output_text literal

rubenluetke10-beepceac9e6a4b2d
diff --git a/jarvis/plugins/realtime/openai_realtime.py b/jarvis/plugins/realtime/openai_realtime.py
index 5471df6073..053e6f483d 100644
--- a/jarvis/plugins/realtime/openai_realtime.py
+++ b/jarvis/plugins/realtime/openai_realtime.py
@@ -604,7 +604,12 @@ class _OpenAIRealtimeSession:
"""
for message in self._history_seed:
role = message["role"]
- content_type = "input_text" if role == "user" else "text"
+ # GA literals: user content is "input_text", assistant content is
+ # "output_text". The hosted endpoint tolerates the legacy "text",
+ # but a strictly-validating self-hosted server rejects the whole
+ # item with it — every rebuild seed died as "Unknown or invalid
+ # event" on the local stack (live 2026-08-06 20:29).
+ content_type = "input_text" if role == "user" else "output_text"
try:
await connection.conversation.item.create(
item={
diff --git a/tests/unit/realtime/test_openai_realtime.py b/tests/unit/realtime/test_openai_realtime.py
index 2d9c20d70a..de527d2200 100644
--- a/tests/unit/realtime/test_openai_realtime.py
+++ b/tests/unit/realtime/test_openai_realtime.py
@@ -236,7 +236,7 @@ async def test_open_session_seeds_prior_call_history(
{
"type": "message",
"role": "assistant",
- "content": [{"type": "text", "text": "Sure — which one?"}],
+ "content": [{"type": "output_text", "text": "Sure — which one?"}],
},
]
await session.close()
@@ -296,7 +296,7 @@ async def test_transport_rebuild_replays_the_current_history_snapshot(
{
"type": "message",
"role": "assistant",
- "content": [{"type": "text", "text": "Sure — which one?"}],
+ "content": [{"type": "output_text", "text": "Sure — which one?"}],
},
]
await session.close()