feat: harden workflow gates and expose token usage

This commit is contained in:
2026-07-21 12:14:26 +02:00
parent 8aa1676811
commit 2ff63d371f
20 changed files with 604 additions and 53 deletions
+4 -1
View File
@@ -166,7 +166,10 @@ export class PiProcessManager {
const thinking = o.thinking ?? this.cfg.defaults.thinking;
if (provider && model) {
await rt.rpc.request({ type: "set_model", provider, modelId: model } as object & { type: string });
const response = await rt.rpc.request(
{ type: "set_model", provider, modelId: model } as object & { type: string },
);
rt.bridge.setContextWindow(response?.data?.contextWindow);
}
if (thinking) {
await rt.rpc.request({ type: "set_thinking_level", level: thinking } as object & { type: string });