Skip to content

Commit 45c7764

Browse files
committed
test(inference): cover null-only message fields
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
1 parent 0f22862 commit 45c7764

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/lib/inference/health.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ describe("inference health", () => {
295295
],
296296
["numeric streaming delta", 'data: {"choices":[{"delta":{"content":123}}]}\n'],
297297
["a null content field and no tool call", '{"choices":[{"message":{"content":null}}]}'],
298+
[
299+
"a null reasoning field and no tool call",
300+
'{"choices":[{"message":{"reasoning_content":null}}]}',
301+
],
302+
["a null refusal field and no tool call", '{"choices":[{"message":{"refusal":null}}]}'],
298303
])("rejects a Chat Completions response with %s", (_description, body) => {
299304
const result = probeRemoteProviderHealth("openai-api", {
300305
model: "gpt-4o-mini",

0 commit comments

Comments
 (0)