mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
fix: stabilize docker live model and doctor-switch tests
This commit is contained in:
@@ -8,7 +8,7 @@ echo "Building Docker image..."
|
||||
docker build -t "$IMAGE_NAME" -f "$ROOT_DIR/scripts/e2e/Dockerfile" "$ROOT_DIR"
|
||||
|
||||
echo "Running doctor install switch E2E..."
|
||||
docker run --rm -t "$IMAGE_NAME" bash -lc '
|
||||
docker run --rm -e COREPACK_ENABLE_DOWNLOAD_PROMPT=0 "$IMAGE_NAME" bash -lc '
|
||||
set -euo pipefail
|
||||
|
||||
# Keep logs focused; the npm global install step can emit noisy deprecation warnings.
|
||||
@@ -146,13 +146,13 @@ LOGINCTL
|
||||
"npm-to-git" \
|
||||
"$npm_bin daemon install --force" \
|
||||
"$npm_entry" \
|
||||
"node $git_cli doctor --repair --force" \
|
||||
"node $git_cli doctor --repair --force --yes" \
|
||||
"$git_entry"
|
||||
|
||||
run_flow \
|
||||
"git-to-npm" \
|
||||
"node $git_cli daemon install --force" \
|
||||
"$git_entry" \
|
||||
"$npm_bin doctor --repair --force" \
|
||||
"$npm_bin doctor --repair --force --yes" \
|
||||
"$npm_entry"
|
||||
'
|
||||
|
||||
14
src/agents/live-model-filter.test.ts
Normal file
14
src/agents/live-model-filter.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { isModernModelRef } from "./live-model-filter.js";
|
||||
|
||||
describe("isModernModelRef", () => {
|
||||
it("excludes opencode minimax variants from modern selection", () => {
|
||||
expect(isModernModelRef({ provider: "opencode", id: "minimax-m2.1" })).toBe(false);
|
||||
expect(isModernModelRef({ provider: "opencode", id: "minimax-m2.5" })).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps non-minimax opencode modern models", () => {
|
||||
expect(isModernModelRef({ provider: "opencode", id: "claude-opus-4-6" })).toBe(true);
|
||||
expect(isModernModelRef({ provider: "opencode", id: "gemini-3-pro" })).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -82,6 +82,11 @@ export function isModernModelRef(ref: ModelRef): boolean {
|
||||
if (provider === "opencode" && id === "alpha-glm-4.7") {
|
||||
return false;
|
||||
}
|
||||
// Opencode MiniMax variants have been intermittently unstable in live runs;
|
||||
// prefer the rest of the modern catalog for deterministic smoke coverage.
|
||||
if (provider === "opencode" && matchesPrefix(id, MINIMAX_PREFIXES)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (provider === "openrouter" || provider === "opencode") {
|
||||
return matchesAny(id, [
|
||||
|
||||
Reference in New Issue
Block a user