mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:40:43 +00:00
fix: preserve legacy runtime model allowlists
This commit is contained in:
@@ -23,6 +23,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- Agents/models: keep legacy CLI runtime model refs such as `claude-cli/*` in the configured allowlist after canonical runtime migration, so cron `payload.model` overrides keep working. Fixes #75753. Thanks @RyanSandoval.
|
||||
- CLI/directory: report unsupported directory operations for installed channel plugins instead of prompting to reinstall the plugin when it lacks a directory adapter. Fixes #75770. Thanks @lawong888.
|
||||
- Web search: keep public provider requests on the strict SSRF guard and reserve private-network access for explicit self-hosted SearXNG/Firecrawl endpoints. Fixes #74357 and supersedes #74360. Thanks @fede-kamel.
|
||||
- Web search/Firecrawl: allow self-hosted private/internal Firecrawl `baseUrl` endpoints, including HTTP for private targets, while keeping hosted Firecrawl on the strict official endpoint. Fixes #63877 and supersedes #59666, #63941, and #74013. Thanks @jhthompson12, @jzakirov, @Mlightsnow, and @shad0wca7.
|
||||
|
||||
@@ -858,6 +858,34 @@ describe("model-selection", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps legacy CLI runtime refs accepted when canonical runtime refs are also configured", () => {
|
||||
const cfg = {
|
||||
agents: {
|
||||
defaults: {
|
||||
agentRuntime: { id: "claude-cli" },
|
||||
model: { primary: "anthropic/claude-sonnet-4-6" },
|
||||
models: {
|
||||
"anthropic/claude-sonnet-4-6": {},
|
||||
"claude-cli/claude-sonnet-4-6": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as OpenClawConfig;
|
||||
|
||||
const result = resolveAllowedModelRef({
|
||||
cfg,
|
||||
catalog: BUNDLED_ALLOWLIST_CATALOG,
|
||||
raw: "claude-cli/claude-sonnet-4-6",
|
||||
defaultProvider: "anthropic",
|
||||
defaultModel: "claude-sonnet-4-6",
|
||||
});
|
||||
|
||||
expect(result).toEqual({
|
||||
key: "claude-cli/claude-sonnet-4-6",
|
||||
ref: { provider: "claude-cli", model: "claude-sonnet-4-6" },
|
||||
});
|
||||
});
|
||||
|
||||
it("strips trailing auth profile suffix before allowlist matching", () => {
|
||||
const cfg: OpenClawConfig = {
|
||||
agents: {
|
||||
|
||||
@@ -497,7 +497,9 @@ describe("normalizeCompatibilityConfigValues", () => {
|
||||
fallback: "pi",
|
||||
});
|
||||
expect(res.config.agents?.defaults?.models).toEqual({
|
||||
"codex/gpt-5.5": { alias: "legacy-codex" },
|
||||
"openai/gpt-5.5": { alias: "gpt", params: { temperature: 0.2 } },
|
||||
"codex/gpt-5.4-mini": {},
|
||||
"openai/gpt-5.4-mini": {},
|
||||
});
|
||||
expect(res.config.agents?.list?.[0]).toMatchObject({
|
||||
@@ -557,6 +559,7 @@ describe("normalizeCompatibilityConfigValues", () => {
|
||||
});
|
||||
expect(res.config.agents?.defaults?.agentRuntime).toEqual({ id: "claude-cli" });
|
||||
expect(res.config.agents?.defaults?.models).toEqual({
|
||||
"claude-cli/claude-opus-4-7": { alias: "Opus" },
|
||||
"anthropic/claude-opus-4-7": { alias: "Anthropic Opus" },
|
||||
});
|
||||
});
|
||||
@@ -583,6 +586,7 @@ describe("normalizeCompatibilityConfigValues", () => {
|
||||
});
|
||||
expect(res.config.agents?.defaults?.agentRuntime).toEqual({ id: "codex-cli" });
|
||||
expect(res.config.agents?.defaults?.models).toEqual({
|
||||
"codex-cli/gpt-5.5": { alias: "Codex CLI" },
|
||||
"openai/gpt-5.5": { alias: "OpenAI GPT" },
|
||||
});
|
||||
});
|
||||
@@ -611,6 +615,7 @@ describe("normalizeCompatibilityConfigValues", () => {
|
||||
id: "google-gemini-cli",
|
||||
});
|
||||
expect(res.config.agents?.defaults?.models).toEqual({
|
||||
"google-gemini-cli/gemini-3.1-pro-preview": { alias: "Gemini CLI" },
|
||||
"google/gemini-3.1-pro-preview": { alias: "Gemini API" },
|
||||
});
|
||||
});
|
||||
|
||||
@@ -262,6 +262,7 @@ function normalizeLegacyRuntimeAllowlistModels(
|
||||
const migrated = migrateLegacyRuntimeModelRef(rawKey);
|
||||
if (migrated?.runtime === selectedRuntime) {
|
||||
changed = true;
|
||||
next[rawKey] = mergeModelEntry(entry, next[rawKey]);
|
||||
legacyEntries.push([migrated.ref, entry]);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user