fix: stabilize onboarding auth tests (#703) (thanks @mteam88)
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
### New Features and Changes
|
### 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 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
|
### Fixes
|
||||||
- CLI/Status: surface gateway provider runtime errors (Signal/iMessage/Slack) in the Providers table.
|
- CLI/Status: surface gateway provider runtime errors (Signal/iMessage/Slack) in the Providers table.
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ function installFailingFetchCapture() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe("openai-responses reasoning replay", () => {
|
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();
|
const cap = installFailingFetchCapture();
|
||||||
try {
|
try {
|
||||||
const model = buildModel();
|
const model = buildModel();
|
||||||
@@ -141,11 +141,8 @@ describe("openai-responses reasoning replay", () => {
|
|||||||
)
|
)
|
||||||
.filter((t): t is string => typeof t === "string");
|
.filter((t): t is string => typeof t === "string");
|
||||||
|
|
||||||
expect(types).toContain("reasoning");
|
|
||||||
expect(types).toContain("function_call");
|
expect(types).toContain("function_call");
|
||||||
expect(types.indexOf("reasoning")).toBeLessThan(
|
expect(types).not.toContain("reasoning");
|
||||||
types.indexOf("function_call"),
|
|
||||||
);
|
|
||||||
} finally {
|
} finally {
|
||||||
cap.restore();
|
cap.restore();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe("applyAuthChoice", () => {
|
|||||||
const previousStateDir = process.env.CLAWDBOT_STATE_DIR;
|
const previousStateDir = process.env.CLAWDBOT_STATE_DIR;
|
||||||
const previousAgentDir = process.env.CLAWDBOT_AGENT_DIR;
|
const previousAgentDir = process.env.CLAWDBOT_AGENT_DIR;
|
||||||
const previousPiAgentDir = process.env.PI_CODING_AGENT_DIR;
|
const previousPiAgentDir = process.env.PI_CODING_AGENT_DIR;
|
||||||
|
const previousOpenrouterKey = process.env.OPENROUTER_API_KEY;
|
||||||
let tempStateDir: string | null = null;
|
let tempStateDir: string | null = null;
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
@@ -37,6 +38,11 @@ describe("applyAuthChoice", () => {
|
|||||||
} else {
|
} else {
|
||||||
process.env.PI_CODING_AGENT_DIR = previousPiAgentDir;
|
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 () => {
|
it("prompts and writes MiniMax API key when selecting minimax-api", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user