Skip to content

feat: add nvidia NIM provider type#34

Merged
cgpadwick merged 5 commits into
masterfrom
worktree-saage-nvidia-nim
Jun 28, 2026
Merged

feat: add nvidia NIM provider type#34
cgpadwick merged 5 commits into
masterfrom
worktree-saage-nvidia-nim

Conversation

@cgpadwick

Copy link
Copy Markdown
Owner

Summary

Adds a nvidia provider type so flows can run NVIDIA NIM hosted models (https://integrate.api.nvidia.com/v1). NIM is OpenAI-compatible, so this is a thin alias of the existing OpenAIProvider path — same wiring as openrouter, differing only by base URL and NVIDIA_API_KEY.

Use:

NVIDIA_API_KEY=... saage run f.yaml --provider nvidia --model "nvidia/nemotron-3-ultra-550b-a55b"

Scope

In: new provider branch in make_provider, offline unit test, docs (cli help, AGENTS.md).
Out (deferred): reasoning_content capture, extra_body/reasoning_budget, temperature/max_tokens, streaming, pricing entries. Reasoning models run; saage uses their final content, thinking channel dropped.

Tests

python -m pytest -q → 392 passed, 7 skipped (was 391). New: tests/test_providers.py.

Design + plan: docs/superpowers/specs/2026-06-27-nvidia-nim-provider-design.md, docs/superpowers/plans/2026-06-27-nvidia-nim-provider.md.

🤖 Generated with Claude Code

cgpadwick and others added 4 commits June 27, 2026 21:14
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an nvidia provider type to let saage flows run against NVIDIA NIM’s OpenAI-compatible endpoint (https://integrate.api.nvidia.com/v1) by reusing the existing OpenAIProvider wiring.

Changes:

  • Add provider.type: nvidia support in make_provider (base URL + NVIDIA_API_KEY).
  • Add an offline unit test verifying provider construction and basic client wiring.
  • Update CLI/README/AGENTS.md and add design/plan docs describing the new provider.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/test_providers.py Adds an offline unit test asserting nvidia maps to OpenAIProvider with expected base URL and key.
saage/hydrate.py Extends make_provider with an nvidia branch pointing to the NIM base URL and NVIDIA_API_KEY.
saage/cli.py Adds a CLI usage example for running with --provider nvidia.
README.md Documents the nvidia provider in the providers table and YAML examples.
docs/superpowers/specs/2026-06-27-nvidia-nim-provider-design.md Captures the design decisions and scope for the NIM provider alias.
docs/superpowers/plans/2026-06-27-nvidia-nim-provider.md Provides an implementation plan and constraints for the change.
AGENTS.md Updates the documented provider.type enum to include nvidia.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_providers.py Outdated
Comment on lines +11 to +13
# openai client exposes base_url (httpx URL) and api_key
assert str(p.client.base_url).startswith("https://integrate.api.nvidia.com/v1")
assert p.client.api_key == "test-key-123"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5e8 — OpenAIProvider now exposes resolved base_url and api_key_env as its own attributes, and the test asserts on those instead of the openai client internals. Also drops the secret from the assertion (checks api_key_env name, not the resolved key).

Expose base_url/api_key_env on OpenAIProvider so the nvidia wiring test
no longer reaches into the unpinned openai SDK's client attributes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cgpadwick cgpadwick merged commit 2c49a48 into master Jun 28, 2026
6 checks passed
@cgpadwick cgpadwick deleted the worktree-saage-nvidia-nim branch June 28, 2026 05:49
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