Skip to content

feat(provider): add NVIDIA endpoints origin header#27394

Merged
rekram1-node merged 1 commit into
anomalyco:devfrom
nv-kasikritc:nvidia-billing-origin-tracking
May 14, 2026
Merged

feat(provider): add NVIDIA endpoints origin header#27394
rekram1-node merged 1 commit into
anomalyco:devfrom
nv-kasikritc:nvidia-billing-origin-tracking

Conversation

@nv-kasikritc
Copy link
Copy Markdown
Contributor

@nv-kasikritc nv-kasikritc commented May 13, 2026

Issue for this PR

N/A

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds X-BILLING-INVOKE-ORIGIN: OpenCode to NVIDIA provider requests so NVIDIA can identify requests originating from opencode. The header is added through the same provider-level header path used for existing NVIDIA/OpenRouter attribution headers.

The default billing-origin header is applied for hosted NVIDIA and custom/local NVIDIA NIM baseURL configurations so app-origin attribution is consistent across NVIDIA provider requests. Explicitly configured X-BILLING-INVOKE-ORIGIN values are preserved.

How did you verify your code works?

  • Ran git diff --check
  • Ran bun typecheck from packages/core
  • Ran bun typecheck from packages/opencode
  • Ran bun test test/v2/plugin/provider-nvidia.test.ts from packages/core (4 pass)
  • Ran bun test test/provider/provider.test.ts --test-name-pattern nvidia from packages/opencode (3 pass, 78 filtered)
  • Pre-push hook ran bun turbo typecheck successfully (14 tasks)
  • Earlier full bun test from packages/core: 333 pass, 1 unrelated failure in cross-spawn-spawner.test.ts caused by macOS temp path canonicalization (/var/... expected, /private/var/... received)
  • Earlier full bun test from packages/opencode: 2298 pass, 282 fail, 49 errors; failures were outside the NVIDIA provider path and dominated by FSEvents, port binding, and timeout issues

Screenshots / recordings

N/A. This is not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label May 13, 2026
@nv-kasikritc nv-kasikritc changed the title feat(provider): add NVIDIA billing origin header feat(provider): add NVIDIA endpoints origin header May 13, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@nv-kasikritc nv-kasikritc force-pushed the nvidia-billing-origin-tracking branch 3 times, most recently from a599aac to 98fe39e Compare May 14, 2026 19:31
@nv-kasikritc nv-kasikritc force-pushed the nvidia-billing-origin-tracking branch from 98fe39e to fac76af Compare May 14, 2026 19:34
@rekram1-node rekram1-node enabled auto-merge (squash) May 14, 2026 22:21
@rekram1-node rekram1-node disabled auto-merge May 14, 2026 22:21
@rekram1-node rekram1-node merged commit d34a019 into anomalyco:dev May 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants