


























@@ -1321,6 +1321,52 @@ describe("resolvePluginProviders", () => {
13211321expectModelOwningPluginIds("gpt-5.4", ["workspace-openai"]);
13221322});
132313231324+it("preserves LM Studio @iq* quant suffixes when resolving model-owned provider plugins", () => {
1325+setManifestPlugins([
1326+createManifestProviderPlugin({
1327+id: "lmstudio",
1328+providerIds: ["lmstudio"],
1329+modelSupport: {
1330+modelPatterns: ["^qwen3\\.6-27b@iq3_xxs$"],
1331+},
1332+}),
1333+]);
1334+const provider: ProviderPlugin = {
1335+id: "lmstudio",
1336+label: "LM Studio",
1337+auth: [],
1338+};
1339+const registry = createEmptyPluginRegistry();
1340+registry.providers.push({ pluginId: "lmstudio", provider, source: "bundled" });
1341+resolveRuntimePluginRegistryMock.mockReturnValue(registry);
1342+1343+expectModelOwningPluginIds("qwen3.6-27b@iq3_xxs", ["lmstudio"]);
1344+expectModelOwningPluginIds("qwen3.6-27b", undefined);
1345+1346+const providers = resolvePluginProviders({
1347+config: {},
1348+modelRefs: ["qwen3.6-27b@iq3_xxs"],
1349+bundledProviderAllowlistCompat: true,
1350+});
1351+1352+expectResolvedProviders(providers, [
1353+{ id: "lmstudio", label: "LM Studio", auth: [], pluginId: "lmstudio" },
1354+]);
1355+expect(resolveRuntimePluginRegistryMock).toHaveBeenCalledWith(
1356+expect.objectContaining({
1357+onlyPluginIds: ["lmstudio"],
1358+config: expect.objectContaining({
1359+plugins: expect.objectContaining({
1360+allow: ["lmstudio"],
1361+entries: {
1362+lmstudio: { enabled: true },
1363+},
1364+}),
1365+}),
1366+}),
1367+);
1368+});
1369+13241370it("auto-loads a model-owned provider plugin from shorthand model refs", () => {
13251371setManifestPlugins([
13261372createManifestProviderPlugin({
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。