Connect Your Inference Models#
POC Factory uses an OpenAI-compatible inference profile: one base URL, an API key, four chat roles, and an embedding role. Use the hardware, inference services, and combination of models that fit your workload, capacity, security, and cost requirements. You can use a hosted service, self-managed serving, or a gateway that combines multiple endpoints. A GPU is not required for the POC Factory application containers; your model-serving and generated-workload requirements are separate.
We validate POC Factory with the Nemotron family, including nemotron-3-ultra-nvfp4, nemotron-3.5-lightning, nemotron-3-embed-1b, and nemotron-3.5-super-vl. These are model names, not universal API identifiers: your service might expose namespaced IDs or gateway aliases. Copy the actual IDs returned by your endpoint. Other compatible models can be used after validating the complete workflow in your environment.
Our validated trials with NVIDIA NIMs served through LiteLLM demonstrate the routing approach below. They do not prescribe one GPU configuration or require all listed models to run together. The configuration is an adaptable example, not a prequalified hardware bill of materials.
Prerequisites#
Prepare the model services and deployment access before connecting the application.
Obtain access to POC Factory Settings or the administrator-managed deployment configuration.
Choose models that support the chat and embedding APIs required by the roles below. Check model licenses, context limits, output limits, structured-output behavior, and expected concurrency.
For self-hosted NIMs, select supported GPU hardware, drivers, NVIDIA Container Toolkit, model profiles, and cache/storage capacity using each NIM’s documentation. Obtain the necessary NGC access. Size for model weights, precision, context/KV cache, and concurrent requests; a model name alone does not establish memory requirements.
Plan network access from the POC Factory backend to the inference endpoint, authentication, TLS, and persistent model caches. Pin reviewed NIM and gateway versions or digests for a reproducible deployment.
POC Factory setting |
Role |
Example selection approach |
|---|---|---|
|
Planning and complex reasoning |
A reasoning-capable model that fits the required context and latency |
|
General generation tasks |
A general-purpose chat model, such as an appropriate Nemotron variant |
|
Lower-latency chat tasks |
A smaller or faster model, such as Nemotron 3.5 Lightning |
|
Code generation through inference |
A model validated on the requested coding and structured-output tasks |
|
Semantic blueprint matching |
An embedding model, such as Nemotron 3 Embed 1B |
Several chat roles can share one model. Use a compatible embedding endpoint for the embedding role; do not point it at a chat-only model. Measure quality and latency before deciding whether separate models or shared capacity make sense.
Prepare the Serving Endpoints#
Use your provider’s deployment procedure; the following steps describe the NIM example.
Start the selected chat and embedding NIMs using their documented image, supported profile, GPU allocation, and persistent cache mounts. They can run on one host, several hosts, or a cluster. Avoid copying GPU indices or profile hashes from another machine.
Wait for model loading and readiness, then send a real request to each service’s
/v1/chat/completionsor/v1/embeddingsendpoint. Record the served model IDs and any required model-specific parameters.Check concurrency and maximum request sizes against available memory. Test embedding output and chat response content, including structured responses used by the application.
See the NVIDIA NIM documentation for serving prerequisites and model-specific instructions. If a hosted endpoint already exposes every required role through one base URL, continue to Configure POC Factory without adding a gateway.
Route Models Through LiteLLM#
A gateway can present several NIM endpoints as one OpenAI-compatible API. The aliases below are examples; replace every angle-bracket placeholder before use.
Create a LiteLLM configuration that maps public aliases to the actual upstream model IDs and URLs:
model_list: - model_name: reasoning-chat litellm_params: model: openai/<reasoning-model-id> api_base: http://reasoning-nim:8000/v1 api_key: os.environ/REASONING_NIM_API_KEY - model_name: general-chat litellm_params: model: openai/<general-model-id> api_base: http://general-nim:8000/v1 api_key: os.environ/GENERAL_NIM_API_KEY - model_name: fast-chat litellm_params: model: openai/<fast-model-id> api_base: http://fast-nim:8000/v1 api_key: os.environ/FAST_NIM_API_KEY - model_name: embeddings litellm_params: model: openai/<embedding-model-id> api_base: http://embedding-nim:8000/v1 api_key: os.environ/EMBEDDING_NIM_API_KEY general_settings: master_key: os.environ/LITELLM_MASTER_KEY
The service names assume a private shared container network. Replace them for your topology. Configure upstream authentication to match each NIM; an NGC image-pull key is not automatically its serving API key. Keep credentials in your secret store or protected runtime environment, outside this YAML and generated POC archives.
Run a pinned LiteLLM image with this file mounted read-only and the referenced secrets supplied securely. For example, on an existing private Docker network with reachable NIMs:
docker run -d --name litellm-nim --network nim-net \ --env-file /secure/path/litellm.env \ -v /absolute/path/litellm-config.yaml:/app/config.yaml:ro \ <pinned-litellm-image> \ --config /app/config.yaml --port 4000 --host 0.0.0.0
Replace the paths, network, and image. Protect the environment file and supply
LITELLM_MASTER_KEYplus the upstream secrets it references. Expose the endpoint only to authorized clients; use authenticated HTTPS for shared or remote access. Follow LiteLLM proxy configuration for your pinned version.Confirm that the gateway lists the intended aliases at
/v1/models, then repeat real chat and embedding requests through those aliases. Preserve required embedding parameters, such asinput_type=queryorpassagefor NIMs that require them. Thinking controls such aschat_template_kwargs.enable_thinkingare model-specific; do not add them indiscriminately.
Configure POC Factory#
Set the administrator profile or save a complete permitted user profile in Settings.
Set the base URL to a location reachable from the backend runtime. An illustrative private Docker configuration is:
INFERENCE_BASE_URL=http://litellm-nim:4000/v1 INFERENCE_API_KEY=<gateway-client-key> MODEL_REASONING=reasoning-chat MODEL_BALANCED=general-chat MODEL_FAST=fast-chat MODEL_CODE=reasoning-chat MODEL_EMBEDDING=embeddings
Use the aliases that your gateway actually exposes. The sample shares the reasoning model with code generation; choose a separate code route if testing shows that it works better. The inference key authenticates to the gateway and may be a scoped client key if configured; keep the gateway’s administrative key restricted.
Verify routing for the deployment topology:
Backend location
Example base URL and prerequisite
Same private Docker network
http://litellm-nim:4000/v1; connect the gateway to the backend’s actual Compose networkHost process
http://localhost:4000/v1; publish the gateway port to that hostDocker using host gateway
http://host.docker.internal:4000/v1; configure host-gateway resolution and reachable host port for your Docker platformShared or remote deployment
https://inference.example.com/v1; configure DNS, TLS trust, authentication, and allowed network accesslocalhostinside a container refers to that container. For the private Docker HTTP example, explicitly setALLOW_DOCKER_HOST_INFERENCE_URLS=trueandDOCKER_NETWORK_INFERENCE_HOSTNAMES=litellm-nimin the backend environment. Keep this opt-in restricted to a trusted local Docker environment; use HTTPS for shared endpoints. These are optional settings for this topology, not required changes for upgrading POC Factory.Recreate the backend when administrator environment values change, or validate and save the user profile in Settings when overrides are enabled. Confirm the effective profile; a saved user profile can differ from administrator defaults.
Choose the code-generation mode.
llmuses these inference routes for implementation;autoselects Cursor if a permitted key and usable CLI exist, otherwise inference.cursorrequires Cursor. Every mode still needs the inference profile for other workflow stages and uses the same contract-first harness.
Verify the Complete Workflow#
Validate actual behavior before onboarding users.
From the backend’s network context, verify the model list and successful chat requests for all four role mappings, plus a successful embedding request. Check authentication, response shape, nonempty results, and any model-specific parameters. A healthy service or successful model listing alone is insufficient.
Validate the effective profile in POC Factory Settings, then generate a small POC through the browser. To exercise inference-backed implementation specifically, use
llmfor this acceptance run; a successful Cursor run does not prove the inference code route.Download the archive and inspect the reported validation gates. Record failures and skips accurately. Repeat representative requests under expected concurrency and adjust model selection, capacity, timeouts, or request limits based on evidence.
Record serving versions, model IDs/profiles, role aliases, hardware, context limits, concurrency, and observed results without secret values. Preserve the configuration and cache strategy for restart and recovery.
For an authentication error, check gateway and upstream credentials separately. For an unknown model, compare aliases and exact upstream IDs. For timeouts or out-of-memory errors, inspect serving logs and capacity. If direct requests succeed but Settings validation fails, check backend reachability, URL policy, response compatibility, and required embedding parameters before retrying.
Next Steps#
Complete Configure and validate for deployment acceptance. Use Generate your first POC for the browser workflow and Troubleshooting for application symptoms.