feat(config): load one validated secret bundle
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user