diff --git a/CHANGELOG.md b/CHANGELOG.md index b62bbe9e7..1f727d1cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### New Features and Changes - CLI Backends: add Codex CLI fallback with resume support (text output) and JSONL parsing for new runs, plus a live CLI resume probe. +- CLI/Onboarding: add OpenRouter API key auth option in configure/onboard. (#703) — thanks @mteam88. ### Fixes - CLI/Status: surface gateway provider runtime errors (Signal/iMessage/Slack) in the Providers table. diff --git a/src/agents/openai-responses.reasoning-replay.test.ts b/src/agents/openai-responses.reasoning-replay.test.ts index 3ec326211..9cca7551a 100644 --- a/src/agents/openai-responses.reasoning-replay.test.ts +++ b/src/agents/openai-responses.reasoning-replay.test.ts @@ -52,7 +52,7 @@ function installFailingFetchCapture() { } describe("openai-responses reasoning replay", () => { - it("replays reasoning for tool-call-only turns (required by OpenAI)", async () => { + it("skips reasoning for tool-call-only turns (OpenAI rejects standalone reasoning)", async () => { const cap = installFailingFetchCapture(); try { const model = buildModel(); @@ -141,11 +141,8 @@ describe("openai-responses reasoning replay", () => { ) .filter((t): t is string => typeof t === "string"); - expect(types).toContain("reasoning"); expect(types).toContain("function_call"); - expect(types.indexOf("reasoning")).toBeLessThan( - types.indexOf("function_call"), - ); + expect(types).not.toContain("reasoning"); } finally { cap.restore(); } diff --git a/src/commands/auth-choice.test.ts b/src/commands/auth-choice.test.ts index c22868ea7..c1ba77fb5 100644 --- a/src/commands/auth-choice.test.ts +++ b/src/commands/auth-choice.test.ts @@ -15,6 +15,7 @@ describe("applyAuthChoice", () => { const previousStateDir = process.env.CLAWDBOT_STATE_DIR; const previousAgentDir = process.env.CLAWDBOT_AGENT_DIR; const previousPiAgentDir = process.env.PI_CODING_AGENT_DIR; + const previousOpenrouterKey = process.env.OPENROUTER_API_KEY; let tempStateDir: string | null = null; afterEach(async () => { @@ -37,6 +38,11 @@ describe("applyAuthChoice", () => { } else { process.env.PI_CODING_AGENT_DIR = previousPiAgentDir; } + if (previousOpenrouterKey === undefined) { + delete process.env.OPENROUTER_API_KEY; + } else { + process.env.OPENROUTER_API_KEY = previousOpenrouterKey; + } }); it("prompts and writes MiniMax API key when selecting minimax-api", async () => {