mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:10:43 +00:00
test: accept codex active-model fallback
This commit is contained in:
@@ -75,6 +75,19 @@ describe("gateway codex harness live helpers", () => {
|
||||
expect(isExpectedCodexModelsCommandText(text)).toBe(false);
|
||||
});
|
||||
|
||||
it("accepts the sandboxed CLI failure active-model summary", () => {
|
||||
const text = [
|
||||
"I couldn’t inspect the CLI model list because sandboxed `codex --help` failed on a namespace restriction, and the escalated retry was rejected.",
|
||||
"",
|
||||
"What I can confirm from the current session is:",
|
||||
"- Active model: `codex/gpt-5.4`",
|
||||
].join("\n");
|
||||
|
||||
expect(
|
||||
EXPECTED_CODEX_MODELS_COMMAND_TEXT.some((expectedText) => text.includes(expectedText)),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("rejects unrelated codex command output", () => {
|
||||
expect(isExpectedCodexModelsCommandText("Codex is healthy.")).toBe(false);
|
||||
});
|
||||
|
||||
@@ -38,6 +38,7 @@ export const EXPECTED_CODEX_MODELS_COMMAND_TEXT = [
|
||||
"This harness is configured with a single Codex model: `codex/",
|
||||
"Primary model: `codex/",
|
||||
"Registered models: `codex/",
|
||||
"Active model: `codex/",
|
||||
"Current active model is `codex/",
|
||||
"Current OpenClaw session status reports the active model as:",
|
||||
] as const;
|
||||
|
||||
Reference in New Issue
Block a user