Skip to content

Structured multi-perspective deliberation for hard decisions. Run full councils, focused triads, or duo debates across Claude Code, Codex, Gemini CLI, and OpenCode.

feat: add NVIDIA NIM provider support (#14)

miakhand8511ee61c25
diff --git a/README.md b/README.md
index c34ed9b..b02d9fd 100644
--- a/README.md
+++ b/README.md
@@ -208,6 +208,9 @@ The council automatically detects installed LLM providers and distributes member
| OpenAI | `codex` | `codex exec` |
| Google | `gemini` | `gemini -p` |
| Ollama (local) | `ollama` | `ollama run` |
+| NVIDIA NIM | `NVIDIA_API_KEY` env | `openai_compatible_api` |
+
+NVIDIA NIM ([build.nvidia.com](https://build.nvidia.com)) exposes 130+ open-weight models (DeepSeek, Kimi, MiniMax, GLM, Qwen, Nemotron) via an OpenAI-compatible endpoint. Free tier: 1,000 credits, 40 RPM. Detection requires only `export NVIDIA_API_KEY=nvapi-...` — no CLI binary needed. See `configs/provider-model-slots.nim.example.yaml` for a sample seat allocation.
**How routing works:**
1. Polarity pairs are separated across providers (hard constraint)
diff --git a/configs/provider-model-slots.nim.example.yaml b/configs/provider-model-slots.nim.example.yaml
new file mode 100644
index 0000000..de99ada
--- /dev/null
+++ b/configs/provider-model-slots.nim.example.yaml
@@ -0,0 +1,83 @@
+# NVIDIA NIM provider example for Council of High Intelligence.
+# Use with: /council --profile exploration-orthogonal --models configs/provider-model-slots.nim.example.yaml "..."
+#
+# NVIDIA NIM (build.nvidia.com) exposes ~130 open-weight models via an
+# OpenAI-compatible endpoint at https://integrate.api.nvidia.com/v1.
+# Free tier: 1,000 inference credits on signup, 40 RPM rate limit.
+#
+# Setup:
+# 1. Get key at https://build.nvidia.com (key prefix: nvapi-)
+# 2. export NVIDIA_API_KEY=nvapi-...
+# 3. Verify live model IDs: curl -H "Authorization: Bearer $NVIDIA_API_KEY" \
+# https://integrate.api.nvidia.com/v1/models | jq '.data[].id'
+#
+# Why mix providers: spreading seats across model families reduces shared
+# training-data bias and amplifies dissent. NIM gives access to non-Anthropic,
+# non-OpenAI, non-Google open-weight models (DeepSeek, Kimi, MiniMax, GLM, Qwen)
+# without separate provider accounts.
+
+profile: exploration-orthogonal
+strategy:
+ provider_spread_first: true
+ avoid_pair_collocation: true
+ force_counterfactual_if_consensus_gt: 0.70
+ require_dissenting_members: 2
+
+seats:
+ # Anthropic seats kept for high-stakes reasoning roles
+ socrates:
+ provider: anthropic
+ model: claude-sonnet-4
+ reasoning_mode: analytical
+ aurelius:
+ provider: anthropic
+ model: claude-opus-4
+ reasoning_mode: normative
+
+ # NIM seats — open-weight models via OpenAI-compatible API
+ feynman:
+ provider: nvidia_nim
+ model: deepseek-ai/deepseek-v4-pro
+ base_url: https://integrate.api.nvidia.com/v1
+ api_key_env: NVIDIA_API_KEY
+ reasoning_mode: mechanistic
+
+ sun-tzu:
+ provider: nvidia_nim
+ model: moonshotai/kimi-k2.6
+ base_url: https://integrate.api.nvidia.com/v1
+ api_key_env: NVIDIA_API_KEY
+ reasoning_mode: strategic
+
+ ada:
+ provider: nvidia_nim
+ model: qwen/qwen3.5-397b-a17b
+ base_url: https://integrate.api.nvidia.com/v1
+ api_key_env: NVIDIA_API_KEY
+ reasoning_mode: formal
+
+ machiavelli:
+ provider: nvidia_nim
+ model: z-ai/glm-5.1
+ base_url: https://integrate.api.nvidia.com/v1
+ api_key_env: NVIDIA_API_KEY
+ reasoning_mode: adversarial
+
+ lao-tzu:
+ provider: nvidia_nim
+ model: minimaxai/minimax-m2.7
+ base_url: https://integrate.api.nvidia.com/v1
+ api_key_env: NVIDIA_API_KEY
+ reasoning_mode: emergent
+
+ # Google for breadth on a third axis
+ torvalds:
+ provider: google
+ model: gemini-2.5-pro
+ reasoning_mode: pragmatic
+
+fallback:
+ provider: nvidia_nim
+ model: deepseek-ai/deepseek-v4-pro
+ base_url: https://integrate.api.nvidia.com/v1
+ api_key_env: NVIDIA_API_KEY
diff --git a/scripts/detect-providers.sh b/scripts/detect-providers.sh
index d7849e4..06a1bbd 100755
--- a/scripts/detect-providers.sh
+++ b/scripts/detect-providers.sh
@@ -76,6 +76,31 @@ if [[ -n "$ollama_bin" ]]; then
fi
providers+=("$(json_provider "ollama" "$ollama_available" "ollama_run" "${ollama_bin:-not_found}" "$ollama_models")")
+# NVIDIA NIM (OpenAI-compatible hosted endpoint at build.nvidia.com)
+# Detection: NVIDIA_API_KEY env var + optional reachability check.
+nim_available=false
+nim_models=""
+nim_endpoint="https://integrate.api.nvidia.com/v1"
+if [[ -n "${NVIDIA_API_KEY:-}" ]]; then
+ # Verify the key is not a placeholder (real keys start with nvapi-)
+ if [[ "${NVIDIA_API_KEY}" =~ ^nvapi- ]]; then
+ # Optional: confirm catalog reachability. Skip if curl missing or offline.
+ if command -v curl >/dev/null 2>&1; then
+ if run_with_timeout curl -sf -o /dev/null \
+ -H "Authorization: Bearer ${NVIDIA_API_KEY}" \
+ "${nim_endpoint}/models" 2>/dev/null; then
+ nim_available=true
+ fi
+ else
+ # Curl unavailable; trust env var presence + key prefix as availability signal.
+ nim_available=true
+ fi
+ # Default model suggestions (verify live IDs at build.nvidia.com/models).
+ nim_models='"deepseek-ai/deepseek-v4-pro","moonshotai/kimi-k2.6","minimaxai/minimax-m2.7","z-ai/glm-5.1","qwen/qwen3.5-397b-a17b"'
+ fi
+fi
+providers+=("$(json_provider "nvidia_nim" "$nim_available" "openai_compatible_api" "$nim_endpoint" "$nim_models")")
+
# --- Build JSON output ---
available_count=0