mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:10:43 +00:00
fix: preserve LM Studio quant model refs (#71486)
This commit is contained in:
@@ -1321,6 +1321,52 @@ describe("resolvePluginProviders", () => {
|
||||
expectModelOwningPluginIds("gpt-5.4", ["workspace-openai"]);
|
||||
});
|
||||
|
||||
it("preserves LM Studio @iq* quant suffixes when resolving model-owned provider plugins", () => {
|
||||
setManifestPlugins([
|
||||
createManifestProviderPlugin({
|
||||
id: "lmstudio",
|
||||
providerIds: ["lmstudio"],
|
||||
modelSupport: {
|
||||
modelPatterns: ["^qwen3\\.6-27b@iq3_xxs$"],
|
||||
},
|
||||
}),
|
||||
]);
|
||||
const provider: ProviderPlugin = {
|
||||
id: "lmstudio",
|
||||
label: "LM Studio",
|
||||
auth: [],
|
||||
};
|
||||
const registry = createEmptyPluginRegistry();
|
||||
registry.providers.push({ pluginId: "lmstudio", provider, source: "bundled" });
|
||||
resolveRuntimePluginRegistryMock.mockReturnValue(registry);
|
||||
|
||||
expectModelOwningPluginIds("qwen3.6-27b@iq3_xxs", ["lmstudio"]);
|
||||
expectModelOwningPluginIds("qwen3.6-27b", undefined);
|
||||
|
||||
const providers = resolvePluginProviders({
|
||||
config: {},
|
||||
modelRefs: ["qwen3.6-27b@iq3_xxs"],
|
||||
bundledProviderAllowlistCompat: true,
|
||||
});
|
||||
|
||||
expectResolvedProviders(providers, [
|
||||
{ id: "lmstudio", label: "LM Studio", auth: [], pluginId: "lmstudio" },
|
||||
]);
|
||||
expect(resolveRuntimePluginRegistryMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
onlyPluginIds: ["lmstudio"],
|
||||
config: expect.objectContaining({
|
||||
plugins: expect.objectContaining({
|
||||
allow: ["lmstudio"],
|
||||
entries: {
|
||||
lmstudio: { enabled: true },
|
||||
},
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("auto-loads a model-owned provider plugin from shorthand model refs", () => {
|
||||
setManifestPlugins([
|
||||
createManifestProviderPlugin({
|
||||
|
||||
Reference in New Issue
Block a user