feat: add nvidia NIM provider type#34
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
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: nvidiasupport inmake_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 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" |
Owner
Author
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
nvidiaprovider 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 existingOpenAIProviderpath — same wiring asopenrouter, differing only by base URL andNVIDIA_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