feat(config): load one validated secret bundle

This commit is contained in:
2026-07-12 11:06:19 +02:00
parent b539303002
commit 5fe74612fb
9 changed files with 255 additions and 2 deletions
+2
View File
@@ -2,6 +2,7 @@ import { spawn as nodeSpawn, type ChildProcessWithoutNullStreams } from "node:ch
import type { AppConfig } from "../config.js";
import { RpcClient } from "../rpc/rpc-client.js";
import { buildPiChildEnv } from "./provider-credentials.js";
import { secretValue } from "../config/secret-bundle.js";
export interface PiModel {
provider: string;
@@ -37,6 +38,7 @@ export function createPiModelLister(cfg: AppConfig, opts: Opts = {}): () => Prom
const env = buildPiChildEnv({
provider: cfg.defaults.provider,
credentialValue: secretValue(cfg, "THT_MODEL_API_KEY"),
credentialFile: cfg.modelApiKeyFile,
});
delete env.THT_DATA_ROOT;