Append one JSON record to the model's transcript file (thread-safe).
(model_name: str, record: dict)
| 68 | |
| 69 | |
| 70 | def _write_transcript(model_name: str, record: dict): |
| 71 | """Append one JSON record to the model's transcript file (thread-safe).""" |
| 72 | with _transcript_lock: |
| 73 | f = _get_transcript_writer(model_name) |
| 74 | f.write(json.dumps(record, ensure_ascii=False) + "\n") |
| 75 | f.flush() |
| 76 | |
| 77 | |
| 78 | # ── Thinking-mode helpers ────────────────────────────────────── |
no test coverage detected