CLI: add OpenRouter auth choice

This commit is contained in:
Matthew
2026-01-10 20:21:15 -05:00
committed by Peter Steinberger
parent cffec07329
commit b6982236a6
7 changed files with 136 additions and 1 deletions

View File

@@ -156,6 +156,29 @@ describe("cli program", () => {
);
});
it("passes openrouter api key to onboard", async () => {
const program = buildProgram();
await program.parseAsync(
[
"onboard",
"--non-interactive",
"--auth-choice",
"openrouter-api-key",
"--openrouter-api-key",
"sk-openrouter-test",
],
{ from: "user" },
);
expect(onboardCommand).toHaveBeenCalledWith(
expect.objectContaining({
nonInteractive: true,
authChoice: "openrouter-api-key",
openrouterApiKey: "sk-openrouter-test",
}),
runtime,
);
});
it("passes zai api key to onboard", async () => {
const program = buildProgram();
await program.parseAsync(