NVIDIA NIM
The NVIDIA NIM provider uses provider key nvidia-nim and the HPD-Agent.Providers.NvidiaNim package. It is backed by HPD's shared OpenAI-compatible chat-completions client, so ModelName is a NVIDIA NIM chat model id.
Set an API key:
export NVIDIA_API_KEY="..."The default endpoint is https://integrate.api.nvidia.com/v1/, which sends chat requests to chat/completions. Pass endpoint to WithNvidiaNim(...), set Endpoint in ClientProviderConfig, or use NVIDIA_NIM_ENDPOINT / NVIDIA_NIM_BASE_URL / NVIDIA_ENDPOINT / NVIDIA_BASE_URL when you need a compatible proxy or custom base URL.
Use fluent chat setup first:
using HPD.Agent;
using HPD.Agent.Providers.NvidiaNim;
var agent = await new AgentBuilder()
.WithNvidiaNim(model: "meta/llama-3.1-70b-instruct")
.BuildAsync();
var result = await agent.RunAsync("Write one sentence about NVIDIA NIM setup.");
Console.WriteLine(result.Text);The equivalent Clients.Chat shape is:
{
"Clients": {
"Chat": {
"ProviderKey": "nvidia-nim",
"ModelName": "meta/llama-3.1-70b-instruct"
}
}
}Runtime Chat Options
Use ChatRunConfig for shared model-call behavior such as temperature, top-p, max output tokens, stop sequences, response format, tools, tool mode, seed, and generic reasoning options. Put agent-level defaults in ClientProviderConfig.ChatDefaults or .WithChatDefaults(...); use AgentRunConfig.Chat for per-run or per-session overrides.
Caveats
The default endpoint targets NVIDIA hosted APIs. For self-hosted NIM, pass a local endpoint such as http://localhost:8000/v1/.
This provider currently registers the chat family only. Other endpoint families, if the upstream service exposes them, are deferred until HPD has dedicated provider-family support for that surface.
Chat uses HPD's shared OpenAI-compatible chat-completions client. It supports token streaming, function tools, response format and tool mode, seed, max output tokens, top-p, temperature, and stop sequences where the selected model supports them.
Validation checks model and endpoint configuration. Runtime chat options are applied through ChatDefaults and AgentRunConfig.Chat. Missing credentials fail at BuildAsync() before a live provider call.