18 lines
526 B
JavaScript
18 lines
526 B
JavaScript
import { describe, it, expect } from "vitest";
|
|
import { normalizeThinkingConfig } from "../../open-sse/services/provider.js";
|
|
|
|
describe("normalizeThinkingConfig", () => {
|
|
it("keeps openai reasoning_effort on non-user turns", () => {
|
|
const body = {
|
|
messages: [{ role: "assistant", content: "ok" }],
|
|
reasoning_effort: "xhigh",
|
|
thinking: { type: "enabled" },
|
|
};
|
|
|
|
normalizeThinkingConfig(body);
|
|
|
|
expect(body.reasoning_effort).toBe("xhigh");
|
|
expect(body.thinking).toBeUndefined();
|
|
});
|
|
});
|