mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-02 03:55:15 +08:00
* fix(nvidia): load featured model catalog Co-authored-by: CaptainTimon <CaptainTimon@users.noreply.github.com> * fix(nvidia): widen catalog fetch timeout * fix(nvidia): cover catalog registration * fix(picker): include provider catalog loader * fix(nvidia): guard featured catalog fetch * fix(nvidia): sync bundled catalog with live API Replace minimaxai/minimax-m2.5 (MiniMax M2.5) with minimaxai/minimax-m2.7 (Minimax M2.7) and z-ai/glm5 (GLM-5) with z-ai/glm-5.1 (GLM 5.1) in the bundled fallback catalog to match NVIDIA's public featured-models endpoint. Update docs table and all extension test expectations. * fix(nvidia): retain shipped catalog refs * fix(picker): keep alias catalog rows * fix(nvidia): restore live catalog priority --------- Co-authored-by: CaptainTimon <CaptainTimon@users.noreply.github.com>
54 lines
1.9 KiB
TypeScript
54 lines
1.9 KiB
TypeScript
import {
|
|
expectProviderOnboardMergedLegacyConfig,
|
|
expectProviderOnboardPrimaryModel,
|
|
} from "openclaw/plugin-sdk/provider-test-contracts";
|
|
import { describe, expect, it } from "vitest";
|
|
import { applyNvidiaConfig, applyNvidiaProviderConfig } from "./onboard.js";
|
|
|
|
describe("nvidia onboard", () => {
|
|
it("adds NVIDIA provider with correct settings", () => {
|
|
const cfg = applyNvidiaConfig({});
|
|
const provider = cfg.models?.providers?.nvidia;
|
|
if (!provider) {
|
|
throw new Error("expected NVIDIA provider config");
|
|
}
|
|
expect(provider.baseUrl).toBe("https://integrate.api.nvidia.com/v1");
|
|
expect(provider.api).toBe("openai-completions");
|
|
expect(provider.models.map((model) => model.id)).toEqual([
|
|
"nvidia/nemotron-3-super-120b-a12b",
|
|
"moonshotai/kimi-k2.5",
|
|
"minimaxai/minimax-m2.7",
|
|
"z-ai/glm-5.1",
|
|
"minimaxai/minimax-m2.5",
|
|
"z-ai/glm5",
|
|
]);
|
|
// Config stores the canonical form; the picker label shows the literal
|
|
// form via preserveLiteralProviderPrefix.
|
|
expectProviderOnboardPrimaryModel({
|
|
applyConfig: applyNvidiaConfig,
|
|
modelRef: "nvidia/nemotron-3-super-120b-a12b",
|
|
});
|
|
});
|
|
|
|
it("merges NVIDIA models and keeps existing provider overrides", () => {
|
|
const provider = expectProviderOnboardMergedLegacyConfig({
|
|
applyProviderConfig: applyNvidiaProviderConfig,
|
|
providerId: "nvidia",
|
|
providerApi: "openai-completions",
|
|
baseUrl: "https://integrate.api.nvidia.com/v1",
|
|
legacyApi: "openai-completions",
|
|
legacyModelId: "custom-model",
|
|
legacyModelName: "Custom",
|
|
});
|
|
expect(provider?.models.map((model) => model.id)).toEqual([
|
|
"nvidia/custom-model",
|
|
"nvidia/nemotron-3-super-120b-a12b",
|
|
"moonshotai/kimi-k2.5",
|
|
"minimaxai/minimax-m2.7",
|
|
"z-ai/glm-5.1",
|
|
"minimaxai/minimax-m2.5",
|
|
"z-ai/glm5",
|
|
]);
|
|
});
|
|
});
|