feat(nvidia): tag NIM requests with app origin#81524
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: not applicable. this is a new provider attribution feature, not a bug report. The behavior is source-reviewable through the diff and tests, but no live request proof was supplied. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the route-gated header through manifest endpoint metadata and the shared request-policy seam once redacted runtime proof from a real NVIDIA request and maintainer header-contract acceptance are in place. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a new provider attribution feature, not a bug report. The behavior is source-reviewable through the diff and tests, but no live request proof was supplied. Is this the best way to solve the issue? Yes for code shape: manifest endpoint classification plus shared provider request policy is the narrow maintainable route. The remaining gate is proof and policy acceptance rather than a code rewrite. Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 3225ec43c887. |
fa66cab to
304828b
Compare
Summary
X-BILLING-INVOKE-ORIGIN: OpenClawthrough the shared provider attribution policy path, with endpoint metadata forhttps://integrate.api.nvidia.com/v1and coverage for official-route and custom-proxy behavior.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
X-BILLING-INVOKE-ORIGIN: OpenClawonly on verified NVIDIA NIM routes.pnpm test src/gateway/sessions-patch.test.ts src/plugins/registry.runtime-config.test.ts src/agents/provider-attribution.test.ts src/agents/provider-request-config.test.ts extensions/nvidia/index.test.ts extensions/nvidia/provider-catalog.test.ts extensions/nvidia/plugin-registration.contract.test.tsOPENCLAW_LOCAL_CHECK=1 OPENCLAW_LOCAL_CHECK_MODE=throttled pnpm check:changedexited 0 after typecheck, lint, guard, and selected changed-lane checks.X-BILLING-INVOKE-ORIGIN: OpenClaw; custom proxy routes preserve operator-provided headers and do not get automatic NVIDIA attribution.Root Cause (if applicable)
Regression Test Plan (if applicable)
src/agents/provider-attribution.test.ts;src/agents/provider-request-config.test.tsX-BILLING-INVOKE-ORIGIN: OpenClaw, custom proxy hosts do not, and spoofed caller header values cannot override route-owned attribution.User-visible / Behavior Changes
NVIDIA NIM requests sent to verified NVIDIA routes now include
X-BILLING-INVOKE-ORIGIN: OpenClaw. Custom NVIDIA-compatible proxy hosts are unchanged.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/A. This changes request metadata on existing NVIDIA NIM calls by adding a non-secret app-origin header on verified NVIDIA routes only.Repro + Verification
Environment
https://integrate.api.nvidia.com/v1Steps
nvidiaand official NVIDIA NIM base URL.nvidiapointed at a custom proxy host.Expected
X-BILLING-INVOKE-ORIGIN: OpenClaw.Actual
src/agents/provider-attribution.test.tsandsrc/agents/provider-request-config.test.ts.Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations