test(v1): align tests with valid-chunk envelope and leak-strip signature

- test_standard_clients_can_ignore_docsgpt: docsgpt-only events now ride
  on a valid empty chat.completion.chunk (choices[0].delta == {}) so
  strict OpenAI clients accept the frame; assert the envelope plus the
  docsgpt extension instead of the absence of choices.
- split continuation persistence into stateful (conversation_id present
  -> save) and stateless (no conversation_id -> no save) cases.
- _fake_translate_stream_event mock accepts strip_reasoning_leak kwarg.
This commit is contained in:
Alex committed 2026-06-04 13:03:04 +01:00
1 parent 37417f99c8
commit b212c5cedd
2 files changed
+37 -8

No files matched your search

+3 -1
View File
@@ -541,7 +541,9 @@ class TestChatCompletionsHappyPath:
translated_chunks: list = []
def _fake_translate_stream_event(event_data, completion_id, model_name):
def _fake_translate_stream_event(
event_data, completion_id, model_name, strip_reasoning_leak=False
):
translated_chunks.append(event_data)
return ['data: x\n\n']