Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ Extended duration units: `s` (seconds), `m` (minutes), `h` (hours), `d` (days),
| `--helm-chart-service NAME` | Kubernetes Service name exposed by the chart. Required when `--helm-chart` is set. | - |
| `--models NAME:VERSION:URI` | Standard model artifact; repeatable | - |
| `--llm-model SPEC` | LLM model config; format `name=<model>,uris=<uri>\|<uri>,routingMethod=<method>,tokenRateLimit=<limit>`; repeatable. Token limits use `<value>-<unit>` with `S`, `M`, `H`, `D`, or `W`, for example `1000-S`. Use input JSON for combined token limits because inline specs use commas as field separators. | - |
| `--llm-default-priority PRIORITY` | Function-level default request priority. Lower values have higher priority. | - |
| `--llm-per-account-priority NCA-ID:PRIORITY` | Per-account priority override; repeatable; supports up to 64 distinct NCA ID overrides. Requires a default priority. | - |

In JSON and inline specs, LLM functions set `functionType: "LLM"` and model routing metadata under `models[].llmConfig`. `llmConfig.uris` declares the OpenAI-compatible upstream paths exposed by the model. Current supported paths are `/v1/chat/completions`, `/v1/responses`, and `/v1/embeddings`. `llmConfig.routingMethod` accepts `round_robin`, `power_of_two`, `groq_multiregion`, `pulsar`, or `random`.
`llmConfig.tokenRateLimit` accepts one or more comma-separated positive integer token limits in `<value>-<unit>` format. Supported units are `S` (seconds), `M` (minutes), `H` (hours), `D` (days), and `W` (weeks). Use distinct units when combining limits, for example `1000-S,5000-M,100000-H,500000-D,1000000-W` in input JSON.
Expand All @@ -96,6 +98,8 @@ LLM invocation requests use `model: "<function-id>/<model-name>"`. The function
|---|---|---|
| `--tags TAG[,TAG]` | Replace function tags | - |
| `--llm-model-update SPEC` | LLM model update; format `name=<model>,routingMethod=<method>,tokenRateLimit=<limit>`; repeatable. Routing methods match `--llm-model`. Token limit example: `1000-S`. Use input JSON for combined token limits. | - |
| `--llm-default-priority PRIORITY` | Replace the function-level priority configuration with this default and any supplied per-account overrides. | - |
| `--llm-per-account-priority NCA-ID:PRIORITY` | Per-account priority override; repeatable; supports up to 64 distinct NCA ID overrides. Requires a default priority. | - |

In JSON, `function update` accepts `modelUpdates[]` entries with `modelName` and `llmConfig.routingMethod` and/or `llmConfig.tokenRateLimit`. `uris` are create-time model metadata and are not part of model updates.

Expand Down Expand Up @@ -142,4 +146,3 @@ In JSON, `function update` accepts `modelUpdates[]` entries with `modelName` and
| `--logs-telemetry-id UUID` | Logs telemetry endpoint ID | - |
| `--metrics-telemetry-id UUID` | Metrics telemetry endpoint ID | - |
| `--traces-telemetry-id UUID` | Traces telemetry endpoint ID | - |

32 changes: 32 additions & 0 deletions docs/user/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,29 @@ API key, which `api-key generate` mints automatically alongside the function key
--inference-port 8000 \
--function-type LLM \
--llm-model "name=dummy-model,uris=/v1/chat/completions|/v1/responses|/v1/embeddings,routingMethod=round_robin,tokenRateLimit=1000-S"

# Create an LLM function with request priority
Comment thread
cr7258 marked this conversation as resolved.
./nvcf-cli function create \
--name "my-priority-llm-function" \
--image "nvcr.io/example/openai-compatible:latest" \
--inference-url "/" \
--inference-port 8000 \
--function-type LLM \
--llm-model "name=dummy-model,uris=/v1/chat/completions" \
--llm-default-priority 7 \
--llm-per-account-priority "nca-id:3"

# Create an LLM function with request priority for multiple accounts
./nvcf-cli function create \
--name "my-multi-account-priority-llm-function" \
--image "nvcr.io/example/openai-compatible:latest" \
--inference-url "/" \
--inference-port 8000 \
--function-type LLM \
--llm-model "name=dummy-model,uris=/v1/chat/completions" \
--llm-default-priority 7 \
--llm-per-account-priority "nca-a:3" \
--llm-per-account-priority "nca-b:5"
```

All `function create` flags:
Expand All @@ -716,6 +739,8 @@ All `function create` flags:
| `--tags` | Comma-separated tags |
| `--models` | Model artifacts in `name:version:uri` format (repeatable) |
| `--llm-model` | LLM model config in `name=MODEL,uris=URI\|URI,routingMethod=round_robin\|power_of_two\|groq_multiregion\|pulsar\|random,tokenRateLimit=LIMIT` format (repeatable). Token limits use `<value>-<unit>` with `S`, `M`, `H`, `D`, or `W`, for example `1000-S`. Use JSON input for combined token limits because inline model specs use commas as field separators. |
| `--llm-default-priority` | Function-level default request priority. Lower values have higher priority, and `0` is highest. |
| `--llm-per-account-priority` | Per-account override in `<nca-id>:<priority>` format. Repeatable; supports up to 64 distinct NCA ID overrides. Requires a default priority. |
| `--resources` | Resource artifacts in `name:version:uri` format (repeatable) |
| `--helm-chart` | Helm chart specification |
| `--helm-chart-service` | Helm chart service name |
Expand Down Expand Up @@ -889,6 +914,13 @@ Example deployment JSON:
--version-id <version-id> \
--llm-model-update "name=dummy-model,routingMethod=round_robin,tokenRateLimit=1000-S"

# Replace the function-level request priority configuration
./nvcf-cli function update \
--function-id <function-id> \
--version-id <version-id> \
--llm-default-priority 7 \
--llm-per-account-priority "nca-id:3"

# Update from JSON file
./nvcf-cli function update \
--function-id <function-id> \
Expand Down
18 changes: 18 additions & 0 deletions src/clis/nvcf-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,17 @@ export NVCF_TOKEN="nvapi-your-function-creation-token"
--inference-port 8000 \
--function-type "LLM" \
--llm-model "name=dummy-model,uris=/v1/chat/completions|/v1/responses|/v1/embeddings,routingMethod=round_robin,tokenRateLimit=1000-S"

# Create an LLM function with request priority
./nvcf-cli function create \
--name "my-priority-llm-function" \
--image "nvcr.io/example/openai-compatible:latest" \
--inference-url "/" \
--inference-port 8000 \
--function-type "LLM" \
--llm-model "name=dummy-model,uris=/v1/chat/completions" \
--llm-default-priority 7 \
--llm-per-account-priority "nca-id:3"
```

**Required flags:**
Expand Down Expand Up @@ -746,6 +757,13 @@ export NVCF_API_KEY="nvapi-your-general-operations-token" # optional fallback
--version-id "ver-12345678-1234-1234-1234-123456789abc" \
--llm-model-update "name=dummy-model,routingMethod=round_robin,tokenRateLimit=1000-S"

# Replace the function-level request priority configuration
./nvcf-cli function update \
--function-id "func-12345678-1234-1234-1234-123456789abc" \
--version-id "ver-12345678-1234-1234-1234-123456789abc" \
--llm-default-priority 7 \
--llm-per-account-priority "nca-id:3"

# Update function deployment specifications
./nvcf-cli function deploy update \
--function-id "func-12345678-1234-1234-1234-123456789abc" \
Expand Down
19 changes: 18 additions & 1 deletion src/clis/nvcf-cli/USAGE-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,17 @@ curl -X POST https://api.nvcf.nvidia.com/v2/nvcf/accounts/nvcf-default/registry-
--inference-url / \
--function-type LLM \
--llm-model "name=dummy-model,uris=/v1/chat/completions|/v1/responses|/v1/embeddings,routingMethod=round_robin,tokenRateLimit=1000-S"

# Create an LLM function with request priority
./nvcf-cli function create \
--name my-priority-llm-function \
--image nvcr.io/example/openai-compatible:latest \
--inference-port 8000 \
--inference-url / \
--function-type LLM \
--llm-model "name=dummy-model,uris=/v1/chat/completions" \
--llm-default-priority 7 \
--llm-per-account-priority "nca-id:3"
```

**Secrets Format:**
Expand Down Expand Up @@ -1036,6 +1047,13 @@ When `--json` is set:
--function-id "550e8400-e29b-41d4-a716-446655440000" \
--version-id "01234567-89ab-cdef-0123-456789abcdef" \
--llm-model-update "name=dummy-model,routingMethod=round_robin,tokenRateLimit=1000-S"

# Replace the function-level request priority configuration
./nvcf-cli function update \
--function-id "550e8400-e29b-41d4-a716-446655440000" \
--version-id "01234567-89ab-cdef-0123-456789abcdef" \
--llm-default-priority 7 \
--llm-per-account-priority "nca-id:3"
```

### Delete Function or Deployment
Expand Down Expand Up @@ -1373,4 +1391,3 @@ nvcf-cli task delete # DELETE - permanent
```

`task delete` clears the saved task from state when it matches.

1 change: 1 addition & 0 deletions src/clis/nvcf-cli/cmd/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ go_test(
"deploy_test.go",
"exit_code_error_test.go",
"function_llm_model_test.go",
"function_request_priority_test.go",
"main_test.go",
"registry_test.go",
"root_test.go",
Expand Down
Loading
Loading