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

推荐订阅源

雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Blog of Author Tim Ferriss
D
Docker
博客园 - 聂微东
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
量子位
宝玉的分享
宝玉的分享
博客园 - 司徒正美
The Cloudflare Blog
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC

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): tag NIM request origin (#81524) · openclaw/...
nv-kasikritc · 2026-05-19 · via Recent Commits to openclaw:main

@@ -55,6 +55,11 @@ const providerEndpointPlugins = vi.hoisted(() => [

5555

endpointClass: "xai-native",

5656

hosts: ["api.x.ai"],

5757

},

58+

{

59+

endpointClass: "nvidia-native",

60+

hosts: ["integrate.api.nvidia.com"],

61+

baseUrls: ["https://integrate.api.nvidia.com/v1"],

62+

},

5863

],

5964

providerRequest: {

6065

providers: {

@@ -68,6 +73,7 @@ const providerEndpointPlugins = vi.hoisted(() => [

6873

kimi: { family: "moonshot", compatibilityFamily: "moonshot" },

6974

mistral: { family: "mistral" },

7075

moonshot: { family: "moonshot", compatibilityFamily: "moonshot" },

76+

nvidia: { family: "nvidia" },

7177

openrouter: { family: "openrouter" },

7278

qwen: { family: "modelstudio" },

7379

together: { family: "together" },

@@ -132,6 +138,29 @@ describe("provider attribution", () => {

132138

});

133139

});

134140141+

it("returns a documented NVIDIA attribution policy", () => {

142+

const policy = resolveProviderAttributionPolicy("nvidia", {

143+

OPENCLAW_VERSION: "2026.3.22",

144+

});

145+146+

expect(policy).toEqual({

147+

provider: "nvidia",

148+

enabledByDefault: true,

149+

verification: "vendor-documented",

150+

hook: "request-headers",

151+

reviewNote:

152+

"NVIDIA NIM billing invoke-origin attribution header. Applied only on verified NVIDIA routes.",

153+

product: "OpenClaw",

154+

version: "2026.3.22",

155+

headers: {

156+

"X-BILLING-INVOKE-ORIGIN": "OpenClaw",

157+

},

158+

});

159+

expect(resolveProviderAttributionHeaders("NVIDIA", { OPENCLAW_VERSION: "2026.3.22" })).toEqual({

160+

"X-BILLING-INVOKE-ORIGIN": "OpenClaw",

161+

});

162+

});

163+135164

it("normalizes aliases when resolving provider headers", () => {

136165

expect(

137166

resolveProviderAttributionHeaders("OpenRouter", {

@@ -221,6 +250,7 @@ describe("provider attribution", () => {

221250

]),

222251

).toEqual([

223252

["openrouter", true, "vendor-documented", "request-headers"],

253+

["nvidia", true, "vendor-documented", "request-headers"],

224254

["openai", true, "vendor-hidden-api-spec", "request-headers"],

225255

["openai-codex", true, "vendor-hidden-api-spec", "request-headers"],

226256

["xai", true, "vendor-hidden-api-spec", "request-headers"],

@@ -446,6 +476,10 @@ describe("provider attribution", () => {

446476

endpointClass: "cerebras-native",

447477

hostname: "api.cerebras.ai",

448478

});

479+

expectRecordFields(resolveProviderEndpoint("https://integrate.api.nvidia.com/v1"), {

480+

endpointClass: "nvidia-native",

481+

hostname: "integrate.api.nvidia.com",

482+

});

449483

expectRecordFields(resolveProviderEndpoint("https://opencode.ai/api"), {

450484

endpointClass: "opencode-native",

451485

hostname: "opencode.ai",

@@ -511,6 +545,46 @@ describe("provider attribution", () => {

511545

).toBeUndefined();

512546

});

513547548+

it("gates documented NVIDIA attribution to official NVIDIA NIM endpoints", () => {

549+

expectRecordFields(

550+

resolveProviderRequestPolicy({

551+

provider: "nvidia",

552+

api: "openai-completions",

553+

baseUrl: "https://integrate.api.nvidia.com/v1",

554+

transport: "stream",

555+

capability: "llm",

556+

}),

557+

{

558+

endpointClass: "nvidia-native",

559+

knownProviderFamily: "nvidia",

560+

attributionProvider: "nvidia",

561+

allowsHiddenAttribution: false,

562+

},

563+

);

564+565+

expect(

566+

resolveProviderRequestAttributionHeaders({

567+

provider: "custom-nim",

568+

api: "openai-completions",

569+

baseUrl: "https://integrate.api.nvidia.com/v1",

570+

transport: "stream",

571+

capability: "llm",

572+

}),

573+

).toEqual({

574+

"X-BILLING-INVOKE-ORIGIN": "OpenClaw",

575+

});

576+577+

expect(

578+

resolveProviderRequestAttributionHeaders({

579+

provider: "nvidia",

580+

api: "openai-completions",

581+

baseUrl: "https://proxy.example.com/v1",

582+

transport: "stream",

583+

capability: "llm",

584+

}),

585+

).toBeUndefined();

586+

});

587+514588

it("summarizes proxy-like, local, invalid, default, and native routing compactly", () => {

515589

expect(

516590

describeProviderRequestRoutingSummary({

@@ -580,6 +654,18 @@ describe("provider attribution", () => {

580654

capability: "llm",

581655

}),

582656

).toBe("provider=groq api=openai-completions endpoint=groq-native route=native policy=none");

657+658+

expect(

659+

describeProviderRequestRoutingSummary({

660+

provider: "nvidia",

661+

api: "openai-completions",

662+

baseUrl: "https://integrate.api.nvidia.com/v1",

663+

transport: "stream",

664+

capability: "llm",

665+

}),

666+

).toBe(

667+

"provider=nvidia api=openai-completions endpoint=nvidia-native route=native policy=documented",

668+

);

583669

});

584670585671

it("models other provider families without enabling hidden attribution", () => {