Skip to content

feat(nvcf-cli): support LLM request priority - #1312

Open
cr7258 wants to merge 10 commits into
NVIDIA:mainfrom
cr7258:feat/nvcf-cli-request-priority
Open

feat(nvcf-cli): support LLM request priority#1312
cr7258 wants to merge 10 commits into
NVIDIA:mainfrom
cr7258:feat/nvcf-cli-request-priority

Conversation

@cr7258

@cr7258 cr7258 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Add nvcf-cli function create and function update support for function-level LLM request priority, including default and per-account priority configuration, input-file overrides and clearing, request serialization, validation, output, tests, and user documentation.

Additional Details

  • Add --llm-default-priority and repeatable --llm-per-account-priority <nca-id>:<priority> flags to function create and update.
  • Preserve explicit priority 0, require a default when per-account overrides are configured, reject invalid or duplicate overrides, and enforce the 64-account limit.
  • Merge explicitly supplied flags over --input-file configuration without modifying omitted fields; use an empty llmInvocationConfig object in an update input file to clear priority.

Checklist

  • I am familiar with the Contributing Guidelines.
  • I have signed off my commits for Developer Certificate of Origin (DCO) compliance.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

Summary by CodeRabbit

  • New Features

    • Added CLI options for default LLM request priorities.
    • Added repeatable per-account priority overrides for up to 64 account IDs.
    • Priority settings can be configured when creating or updating functions and displayed in function details.
    • Per-account overrides require a default priority and support replacing or clearing settings during updates.
  • Documentation

    • Added usage examples and flag references for configuring request priorities.
  • Tests

    • Added coverage for validation, updates, overrides, JSON handling, and displayed priority settings.

@cr7258
cr7258 requested review from a team as code owners August 28, 2026 14:53
@cr7258
cr7258 requested a review from sbaum1994 August 28, 2026 14:53
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 53358cbe-607d-42cc-9d25-a8863b0fa2a4

📥 Commits

Reviewing files that changed from the base of the PR and between 1e93602 and 8203119.

📒 Files selected for processing (1)
  • docs/user/cli.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/user/cli.md

Included review availability: Your plan provides up to 12 included reviews per hour; 10 remain after this review.


📝 Walkthrough

Walkthrough

The CLI now supports default and per-account LLM request priorities for function creation and updates. Client models serialize and decode these settings. Validation enforces priority formats, duplicate detection, required defaults, and the 64-account limit. Function details display priorities deterministically.

Changes

LLM request priority configuration

Layer / File(s) Summary
Client priority contract and API payloads
src/clis/nvcf-cli/internal/client/client.go, src/clis/nvcf-cli/internal/client/client_test.go
Client DTOs and function models now carry LLM invocation priorities for create, update, detail, and list operations. Tests cover serialization, decoding, clearing, and an explicit default priority of zero.
CLI priority flags, merging, and validation
src/clis/nvcf-cli/cmd/function.go, src/clis/nvcf-cli/cmd/function_request_priority_test.go, src/clis/nvcf-cli/cmd/BUILD.bazel
Create and update commands parse repeatable per-account flags, merge values with JSON configuration, validate limits and required defaults, and construct client requests. Tests cover valid, invalid, duplicate, empty, and priority-only configurations.
Priority display and CLI guidance
src/clis/nvcf-cli/cmd/function.go, ai-tooling/user/skills/nvcf-self-managed-cli/reference/flags.md, docs/user/cli.md, src/clis/nvcf-cli/README.md, src/clis/nvcf-cli/USAGE-GUIDE.md
Function details display default and per-account priorities in sorted order. CLI references and examples document create and update usage.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to 82031

This change adds configurable LLM request-priority options for function creation and updates; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant FunctionCommand
  participant NVCFClient
  participant FunctionAPI
  FunctionCommand->>NVCFClient: Build request with LLM priority configuration
  NVCFClient->>FunctionAPI: Create or update function
  FunctionAPI-->>NVCFClient: Return configured function data
  NVCFClient-->>FunctionCommand: Display decoded priority settings
Loading

Suggested reviewers: sbaum1994

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 5 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the required Conventional Commits format, includes the required scope for a feature, and accurately describes the new LLM request-priority support in nvcf-cli.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 3.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 5 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Comment thread docs/user/cli.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants