Files
ThothII/harness/.pi/evidence-extensions/tht-evidence-json-mode.ts
T
Codex 84084bba37
Publish documentation / publish (push) Successful in 30s
Fix Qwen session tool calls and expose thinking compatibility
2026-09-21 16:23:51 +02:00

18 lines
525 B
TypeScript

import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
// Loaded explicitly by PiEvidenceRestructurer. Keep outside .pi/extensions:
// JSON-only output prevents interactive sessions from emitting native tool calls.
export default function (pi: ExtensionAPI) {
pi.on("before_provider_request", (event) => {
if (typeof event.payload !== "object" || event.payload === null) {
return undefined;
}
return {
...event.payload,
temperature: 0,
response_format: { type: "json_object" },
};
});
}