惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
The Cloudflare Blog
爱范儿
爱范儿
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
Jina AI
Jina AI
V
V2EX
罗磊的独立博客
V
Visual Studio Blog
A
About on SuperTechFans
IT之家
IT之家
P
Proofpoint News Feed
B
Blog
博客园 - Franky
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(nvidia): add NVIDIA provider with onboarding flow (#...
eleqtrizit · 2026-04-30 · via Recent Commits to openclaw:main

@@ -16,12 +16,23 @@ function readManifest(): NvidiaManifest {

1616

) as NvidiaManifest;

1717

}

181819-

describe("nvidia provider plugin", () => {

20-

it("registers API-key auth metadata", async () => {

21-

const provider = await registerSingleProviderPlugin(plugin);

19+

async function registerNvidiaProvider() {

20+

return registerSingleProviderPlugin(plugin);

21+

}

22+23+

describe("nvidia provider hooks", () => {

24+

it("registers the nvidia provider with correct metadata", async () => {

25+

const provider = await registerNvidiaProvider();

22262327

expect(provider.id).toBe("nvidia");

28+

expect(provider.label).toBe("NVIDIA");

29+

expect(provider.docsPath).toBe("/providers/nvidia");

2430

expect(provider.envVars).toEqual(["NVIDIA_API_KEY"]);

31+

});

32+33+

it("registers API-key auth choice metadata", async () => {

34+

const provider = await registerNvidiaProvider();

35+2536

expect(provider.auth?.map((method) => method.id)).toEqual(["api-key"]);

26372738

const choice = resolveProviderPluginChoice({

@@ -40,4 +51,107 @@ describe("nvidia provider plugin", () => {

4051

]),

4152

);

4253

});

54+55+

it("keeps nvidia auth setup metadata aligned", async () => {

56+

const provider = await registerNvidiaProvider();

57+58+

expect(

59+

provider.auth.map((method) => ({

60+

id: method.id,

61+

label: method.label,

62+

hint: method.hint,

63+

choiceId: method.wizard?.choiceId,

64+

groupId: method.wizard?.groupId,

65+

groupLabel: method.wizard?.groupLabel,

66+

groupHint: method.wizard?.groupHint,

67+

})),

68+

).toEqual([

69+

{

70+

id: "api-key",

71+

label: "NVIDIA API key",

72+

hint: "Direct API key",

73+

choiceId: "nvidia-api-key",

74+

groupId: "nvidia",

75+

groupLabel: "NVIDIA",

76+

groupHint: "Direct API key",

77+

},

78+

]);

79+

});

80+81+

it("keeps nvidia wizard setup metadata aligned", async () => {

82+

const provider = await registerNvidiaProvider();

83+84+

expect(provider.wizard?.setup).toMatchObject({

85+

choiceId: "nvidia-api-key",

86+

choiceLabel: "NVIDIA API key",

87+

groupId: "nvidia",

88+

groupLabel: "NVIDIA",

89+

groupHint: "Direct API key",

90+

methodId: "api-key",

91+

});

92+

});

93+94+

it("keeps nvidia model picker metadata aligned", async () => {

95+

const provider = await registerNvidiaProvider();

96+97+

expect(provider.wizard?.modelPicker).toMatchObject({

98+

label: "NVIDIA (custom)",

99+

hint: "Use NVIDIA-hosted open models",

100+

methodId: "api-key",

101+

});

102+

});

103+104+

it("does not override replay policy for standard openai-compatible transport", async () => {

105+

const provider = await registerNvidiaProvider();

106+107+

// NVIDIA uses standard OpenAI-compatible API without custom replay logic

108+

expect(provider.buildReplayPolicy).toBeUndefined();

109+

});

110+111+

it("does not override stream wrapper for standard models", async () => {

112+

const provider = await registerNvidiaProvider();

113+114+

// NVIDIA uses standard streaming without custom wrappers

115+

expect(provider.wrapStreamFn).toBeUndefined();

116+

});

117+118+

it("surfaces the bundled NVIDIA models via augmentModelCatalog", async () => {

119+

const provider = await registerNvidiaProvider();

120+121+

const entries = await provider.augmentModelCatalog?.({

122+

env: process.env,

123+

entries: [],

124+

});

125+126+

expect(entries?.map((entry) => entry.id)).toEqual([

127+

"nvidia/nemotron-3-super-120b-a12b",

128+

"moonshotai/kimi-k2.5",

129+

"minimaxai/minimax-m2.5",

130+

"z-ai/glm5",

131+

]);

132+

expect(entries?.every((entry) => entry.provider === "nvidia")).toBe(true);

133+

});

134+135+

it("opts into literal provider-prefix preservation", async () => {

136+

const provider = await registerNvidiaProvider();

137+138+

// NVIDIA's ids like nvidia/nemotron-... sit alongside moonshotai/...,

139+

// minimaxai/..., z-ai/... in the same catalog, so the leading nvidia/

140+

// is a vendor namespace rather than a redundant provider prefix. The

141+

// flag keeps the canonical ref as nvidia/nvidia/nemotron-... instead

142+

// of letting the default string-based dedupe collapse it.

143+

expect(provider.preserveLiteralProviderPrefix).toBe(true);

144+

});

145+146+

it("registers nvidia provider through the plugin api", () => {

147+

const registeredProviders: string[] = [];

148+149+

plugin.register({

150+

registerProvider(provider: { id: string }) {

151+

registeredProviders.push(provider.id);

152+

},

153+

} as any);

154+155+

expect(registeredProviders).toContain("nvidia");

156+

});

43157

});