Skip to content
Merged
2 changes: 1 addition & 1 deletion ai-tooling/user/skills/nvcf-self-managed-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ LLM function type is independent of workload packaging. For a Helm-chart backed

Invocation uses the LLM route, for example `https://llm.invocation.<domain>/v1/chat/completions`. The OpenAI `model` value must be `<function-id>/<model-name>`; the function ID is the routing key and the model name is forwarded upstream.

Update mutable per-model routing settings with `nvcf-cli function update --llm-model-update='name=<model>,routingMethod=<method>,tokenRateLimit=<limit>'`, or put the same fields under `modelUpdates[].llmConfig` in an update JSON file. See [reference/flags.md](reference/flags.md) for accepted routing methods. `tokenRateLimit` supports positive integer limits for `S`, `M`, `H`, `D`, and `W`; use JSON input for combined limits such as `1000-S,5000-M,100000-H,500000-D,1000000-W`. Do not include `uris` in model updates.
Update mutable per-model routing settings with `nvcf-cli function update --llm-model-update='name=<model>,routingMethod=<method>,tokenRateLimit=<limit>'`, or put the same fields under `modelUpdates[].llmConfig` in an update JSON file. See [reference/flags.md](reference/flags.md) for the routing method format. `tokenRateLimit` supports positive integer limits for `S`, `M`, `H`, `D`, and `W`; use JSON input for combined limits such as `1000-S,5000-M,100000-H,500000-D,1000000-W`. Do not include `uris` in model updates.

For `/v1/responses`, the gateway proxies the native Responses path upstream, relays SSE to streaming clients, and aggregates the terminal JSON response for non-streaming clients. For `/v1/embeddings`, input may be a string or string array, must be non-empty, and may contain at most 2048 entries.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Full subcommand list. Always pair with [flags.md](flags.md) for global flags and
| `function list` / `function list-ids` | List functions / IDs only | |
| `function get --function-id=ID --version-id=VID` | Function metadata | |
| `function update --function-id=ID --version-id=VID --tags=TAG[,TAG]` | Update function tags | |
| `function update --function-id=ID --version-id=VID --llm-model-update=SPEC` | Update LLM model routing config | `SPEC` uses `name=<model>,routingMethod=<method>,tokenRateLimit=<limit>`; accepted methods are listed in [flags.md](flags.md) |
| `function update --function-id=ID --version-id=VID --llm-model-update=SPEC` | Update LLM model routing config | `SPEC` uses `name=<model>,routingMethod=<method>,tokenRateLimit=<limit>`; the routing method format is in [flags.md](flags.md) |
| `function deploy create --input-file=FILE` | Schedule a deployment | Blocks until ACTIVE (default 900s) |
| `function deploy get --function-id=ID --version-id=VID [--json]` | Deployment status | `functionStatus: ACTIVE\|DEPLOYING\|ERROR\|FAILED` |
| `function deploy update --input-file=FILE` | Modify a deployment in place | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ Extended duration units: `s` (seconds), `m` (minutes), `h` (hours), `d` (days),
| `--helm-chart CHART` | Helm chart URL or OCI reference. Can be used with `--function-type=LLM` for chart-packaged LLM workloads. | - |
| `--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-model SPEC` | LLM model config; format `name=<model>,uris=<uri>\|<uri>,routingMethod=<method>[;<param>=<value>...],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`.
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` is a routing algorithm name, optionally followed by `;name=value` tuning parameters, such as `pulsar;seed=stable-a`. The CLI sends it unchanged; the API rejects a malformed value and the CLI prints that error. Quote inline specs that contain `;`.
`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.

Helm chart packaging is independent of `functionType`. For a Helm-chart backed LLM function, set `functionType: "LLM"`, `helmChart`, `helmChartServiceName`, and `models[].llmConfig` in the same create request. `inferencePort` must be the Kubernetes Service port exposed by `helmChartServiceName`.
Expand All @@ -97,7 +97,7 @@ LLM invocation requests use `model: "<function-id>/<model-name>"`. The function
| Flag | Purpose | Default |
|---|---|---|
| `--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-model-update SPEC` | LLM model update; format `name=<model>,routingMethod=<method>[;<param>=<value>...],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. | - |

Expand Down
4 changes: 2 additions & 2 deletions docs/overview/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ All `function create` flags:
| `--secrets` | Secrets in `name=value` format (repeatable) |
| `--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-model` | LLM model config in `name=MODEL,uris=URI\|URI,routingMethod=METHOD[;PARAM=VALUE...],tokenRateLimit=LIMIT` format (repeatable). The CLI forwards `routingMethod` unchanged; the API checks it. 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) |
Expand Down Expand Up @@ -799,7 +799,7 @@ LLM functions use `functionType: "LLM"` and define model routing metadata under
}
```

For LLM models, `llmConfig.routingMethod` accepts `round_robin`, `power_of_two`, `groq_multiregion`, `pulsar`, or `random`.
For LLM models, `llmConfig.routingMethod` is a routing algorithm name, optionally followed by tuning parameters, such as `pulsar;seed=stable-a`. The CLI forwards the value unchanged and prints the API error for a malformed value. For algorithms, parameters, and errors, see [LLM Request Router Load Balancing](../self-managed/llm-request-router-load-balancing.md#tune-a-model-with-a-routing-expression).
Supported LLM paths are `/v1/chat/completions`, `/v1/responses`, and `/v1/embeddings`.
`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 `1000-S` for a single limit, or `1000-S,5000-M,100000-H,500000-D,1000000-W` for a combined limit with distinct units. Use JSON input for combined limits because inline CLI model specs use commas as field separators.

Expand Down
9 changes: 6 additions & 3 deletions docs/overview/llm-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ gateway does not wrap it in a second NVCF envelope.
| `/v1/embeddings` | Supports embeddings requests with string or string array input. |
| `/v1/messages` | Preserves native Anthropic Messages JSON responses and server-sent events, including tool and thinking content blocks. |

`nvcf-cli` accepts `round_robin`, `power_of_two`, `groq_multiregion`,
`pulsar`, or `random` for `llmConfig.routingMethod`.
`llmConfig.routingMethod` is a routing algorithm name, optionally followed by
tuning parameters, such as `pulsar;seed=stable-a;consider_kv_free_tokens=true`.
`nvcf-cli` forwards the value unchanged. The function API checks its format,
and the request router checks the algorithm and parameters on each request.

For the mapping to Stargate algorithms and the request-router allowlist, see
For the mapping to Stargate algorithms, the request-router allowlist, and the
tuning parameters, see
[LLM Request Router Load Balancing](../self-managed/llm-request-router-load-balancing.md).

`llmConfig.tokenRateLimit` applies a per-model token limit. Use one or more comma-separated limits in `<value>-<unit>` format, where `<value>` is a positive integer and `<unit>` is one of `S` (seconds), `M` (minutes), `H` (hours), `D` (days), or `W` (weeks). A single limit is one token budget over one time window, such as `1000-S`. A combined limit is multiple token budgets over distinct time windows, such as `1000-S,5000-M,100000-H,500000-D,1000000-W`; do not repeat a unit in the same value.
Expand Down
Loading
Loading