test: verify sampling parameters through the full governance stack

This commit is contained in:
2026-07-31 21:46:05 -04:00
parent 2958dc8231
commit cce7562d07
5 changed files with 78 additions and 16 deletions
+1 -3
View File
@@ -381,9 +381,7 @@ class TestExtraBodyStripped:
会显示这次调用带了 temperature=0——那是数据造假,比参数失效更坏。
"""
rec = _MemoryRecorder()
client, _ = _embed_client(
[_src(extra_body={"temperature": 0})], ["ok"], telemetry=rec
)
client, _ = _embed_client([_src(extra_body={"temperature": 0})], ["ok"], telemetry=rec)
await client.embed(["hi"])
assert rec.rows[0]["sampling"] is None
+1 -3
View File
@@ -394,9 +394,7 @@ class TestExtraBodyStripped:
async def test_telemetry_never_records_a_parameter_that_was_not_sent(self):
"""不剥离则审计表会显示这次 OCR 带了 temperature=0——数据造假。"""
recorder = _MemoryRecorder()
client, _, _ = _client(
[_src(extra_body={"temperature": 0})], ["text"], telemetry=recorder
)
client, _, _ = _client([_src(extra_body={"temperature": 0})], ["text"], telemetry=recorder)
await client.recognize_text(b"IMG")
assert recorder.rows[0]["sampling"] is None