fix(backend): allow configured local Qwen provider

This commit is contained in:
User
2026-07-14 18:44:12 +02:00
parent 3d23d0543c
commit 0cf86e3540
3 changed files with 40 additions and 21 deletions
+14
View File
@@ -116,6 +116,20 @@ test("single-key providers scrub ambient compound companions before injecting th
expect(env).not.toHaveProperty("CLOUDFLARE_GATEWAY_ID");
});
test("local-qwen is an explicit local provider and needs no generic key", () => {
const env = buildPiChildEnv({
ambient: {
PI_PROVIDER_API_KEY: "must-not-leak",
OPENAI_API_KEY: "must-not-leak",
THT_MODEL_API_KEY_FILE: "/must/not/leak",
},
provider: "local-qwen",
});
expect(env).not.toHaveProperty("PI_PROVIDER_API_KEY");
expect(env).not.toHaveProperty("OPENAI_API_KEY");
expect(env).not.toHaveProperty("THT_MODEL_API_KEY_FILE");
});
test("bundle value is injected without exposing bundle metadata to Pi", () => {
const env = buildPiChildEnv({
ambient: {