



















@@ -854,6 +854,47 @@ describe("runSetupWizard", () => {
854854);
855855});
856856857+it("forwards provider-specific auth flags to applyAuthChoice opts", async () => {
858+applyAuthChoice.mockReset();
859+applyAuthChoice.mockResolvedValueOnce({
860+config: {
861+agents: {
862+defaults: {
863+model: {
864+primary: "openai-codex/gpt-5.5",
865+},
866+},
867+},
868+},
869+});
870+871+const prompter = buildWizardPrompter({});
872+const runtime = createRuntime();
873+874+await runSetupWizard(
875+{
876+acceptRisk: true,
877+flow: "quickstart",
878+authChoice: "openai-codex-api-key",
879+openaiApiKey: "sk-flag-value",
880+installDaemon: false,
881+skipChannels: true,
882+skipSkills: true,
883+skipSearch: true,
884+skipHealth: true,
885+skipUi: true,
886+skipHooks: true,
887+},
888+runtime,
889+prompter,
890+);
891+892+expect(applyAuthChoice).toHaveBeenCalledTimes(1);
893+const call = getMockCallArg(applyAuthChoice, 0, 0, "openai-codex auth choice");
894+const opts = (call as { opts?: Record<string, unknown> }).opts ?? {};
895+expect(opts.openaiApiKey).toBe("sk-flag-value");
896+});
897+857898it("shows plugin compatibility notices for an existing valid config", async () => {
858899buildPluginCompatibilitySnapshotNotices.mockReturnValue([
859900{
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。