feat(studio): Virtual Models view/delete page with search, filtering, and autoprovisioned exclusion#689
Conversation
Add a Studio page to view and delete VirtualModels: list with a read-only details side panel (core fields + middleware pipelines) and delete, wired to the IGW virtual-models API and generated SDK. Route + sidebar nav under the Models group. Controller-managed passthrough VirtualModels are noise in the UI, so the IGW list endpoint gains an include_autoprovisioned flag (default true to preserve CLI/SDK behavior) plus a VirtualModelFilter for name/entity/date filtering. The Studio list passes include_autoprovisioned=false to hide them. Regenerated OpenAPI, Python SDK, and CLI accordingly. Signed-off-by: mschwab <mschwab@nvidia.com>
Add a name search bar (filter[name][$like]) plus column filters for default_model_entity (text) and created_at (date range) to the Virtual Models list, mirroring the other Studio data tables. The empty state becomes search/filter-aware with a Clear Filters action. Signed-off-by: mschwab <mschwab@nvidia.com>
…K and CLI Codex review surfaced two dead filtering paths: - filter[autoprovisioned]=false was advertised on the VirtualModel list filter but returned nothing: the deep-object value arrives as the string "false" while the SQLite entity store holds JSON booleans, so the exact match never hit. Drop the autoprovisioned field from VirtualModelFilter; string/date filters are unaffected. - The generated CLI rendered the boolean list flag as a positive-only switch, so with a default of true it could never exclude autoprovisioned models (--include-autoprovisioned false was rejected as an extra arg). Invert the query parameter to exclude_autoprovisioned (default false), which the server ANDs as a real boolean data.autoprovisioned == false condition. The CLI now exposes a working --exclude-autoprovisioned switch, and Studio passes exclude_autoprovisioned=true. Regenerated OpenAPI, Python SDK, and CLI. Signed-off-by: mschwab <mschwab@nvidia.com>
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughChangesVirtual Models API and CLI
Studio Virtual Models
Sequence Diagram(s)sequenceDiagram
participant User
participant VirtualModelsDataView
participant list_virtual_models
participant entity_client
User->>VirtualModelsDataView: Search or open Virtual Models
VirtualModelsDataView->>list_virtual_models: Filtered list request
list_virtual_models->>entity_client: Query filtered, non-autoprovisioned models
entity_client-->>list_virtual_models: Virtual Model page
list_virtual_models-->>VirtualModelsDataView: Page response
VirtualModelsDataView-->>User: Table and row actions
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.test.tsx (1)
58-130: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueNo coverage for default-model or creation-date filters.
PR objectives mention filtering by default model and creation date, but only name-filter and autoprovisioned-exclusion are tested here. Consider adding cases for those filters if
VirtualModelsDataViewimplements them.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.test.tsx` around lines 58 - 130, Add tests in the VirtualModelsDataView suite for the implemented default-model and creation-date filters, following the existing name-filter request pattern: render with each corresponding query parameter, capture the VMS_URL request, and assert the API receives the expected filter parameters and values.web/packages/studio/src/routes/VirtualModelsListRoute/index.tsx (1)
10-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
import typefor type-only symbols.
web/packages/studio/src/routes/VirtualModelsListRoute/index.tsx#L10-L10: changeFCto a type-only import.web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.tsx#L20-L24: type-import the generated schema symbols.web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.tsx#L32-L38: splitComponentPropsandFCintoimport type, then useComponentPropson Line 37.web/packages/studio/src/routes/VirtualModelsListRoute/VirtualModelDetailsSidePanel/index.tsx#L6-L8: type-import the schema symbols andFC.As per coding guidelines, “Use
import typefor type-only imports in TypeScript.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/packages/studio/src/routes/VirtualModelsListRoute/index.tsx` at line 10, Convert type-only imports to import type in web/packages/studio/src/routes/VirtualModelsListRoute/index.tsx:10-10, web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.tsx:20-24 and 32-38, and web/packages/studio/src/routes/VirtualModelsListRoute/VirtualModelDetailsSidePanel/index.tsx:6-8. Type-import the generated schema symbols, FC, and ComponentProps; split ComponentProps and FC from any runtime imports and keep ComponentProps used for the relevant component props.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/cli/reference.mdx`:
- Around line 3473-3475: Regenerate the CLI reference so the Filter Options text
in the relevant documentation entry uses the correct `--filter.FIELD` syntax
instead of `--filter. FIELD`. Preserve the rest of the description and
precedence guidance unchanged.
---
Nitpick comments:
In
`@web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.test.tsx`:
- Around line 58-130: Add tests in the VirtualModelsDataView suite for the
implemented default-model and creation-date filters, following the existing
name-filter request pattern: render with each corresponding query parameter,
capture the VMS_URL request, and assert the API receives the expected filter
parameters and values.
In `@web/packages/studio/src/routes/VirtualModelsListRoute/index.tsx`:
- Line 10: Convert type-only imports to import type in
web/packages/studio/src/routes/VirtualModelsListRoute/index.tsx:10-10,
web/packages/studio/src/components/dataViews/VirtualModelsDataView/index.tsx:20-24
and 32-38, and
web/packages/studio/src/routes/VirtualModelsListRoute/VirtualModelDetailsSidePanel/index.tsx:6-8.
Type-import the generated schema symbols, FC, and ComponentProps; split
ComponentProps and FC from any runtime imports and keep ComponentProps used for
the relevant component props.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: e036d87e-652a-4d4f-b9e8-658d444c1f68
⛔ Files ignored due to path filters (11)
sdk/python/nemo-platform/.nmpcontext/openapi.yamlis excluded by!sdk/**sdk/python/nemo-platform/.nmpcontext/stainless.yamlis excluded by!sdk/**sdk/python/nemo-platform/scripts/lintis excluded by!sdk/**sdk/python/nemo-platform/src/nemo_platform/cli/commands/api/inference/virtual_models.pyis excluded by!sdk/**sdk/python/nemo-platform/src/nemo_platform/resources/inference/api.mdis excluded by!sdk/**sdk/python/nemo-platform/src/nemo_platform/resources/inference/virtual_models.pyis excluded by!sdk/**sdk/python/nemo-platform/src/nemo_platform/types/inference/__init__.pyis excluded by!sdk/**sdk/python/nemo-platform/src/nemo_platform/types/inference/virtual_model_filter_param.pyis excluded by!sdk/**sdk/python/nemo-platform/src/nemo_platform/types/inference/virtual_model_list_params.pyis excluded by!sdk/**sdk/python/nemo-platform/tests/api_resources/inference/test_virtual_models.pyis excluded by!sdk/**sdk/stainless.yamlis excluded by!sdk/**
📒 Files selected for processing (18)
docs/cli/reference.mdxopenapi/ga/individual/platform.openapi.yamlopenapi/ga/openapi.yamlopenapi/openapi.yamlpackages/nemo_platform_ext/src/nemo_platform_ext/cli/commands/api/inference/virtual_models.pyservices/core/inference-gateway/src/nmp/core/inference_gateway/api/v2/virtual_models.pyservices/core/inference-gateway/tests/unit/test_virtual_models_router.pyweb/packages/studio/src/components/dataViews/VirtualModelsDataView/index.test.tsxweb/packages/studio/src/components/dataViews/VirtualModelsDataView/index.tsxweb/packages/studio/src/constants/routes.tsweb/packages/studio/src/routes/VirtualModelsListRoute/VirtualModelDetailsSidePanel/index.test.tsxweb/packages/studio/src/routes/VirtualModelsListRoute/VirtualModelDetailsSidePanel/index.tsxweb/packages/studio/src/routes/VirtualModelsListRoute/index.tsxweb/packages/studio/src/routes/WorkspaceLayout/WorkspaceSideNav.tsxweb/packages/studio/src/routes/groups/index.tsweb/packages/studio/src/routes/groups/virtualModelsRoutes.tsxweb/packages/studio/src/routes/index.tsxweb/packages/studio/src/routes/utils.ts
…invariant The Virtual Models route ships without a feature flag, so the all-flags-disabled safety-net test must allow it explicitly. Every other workspace route stays gated. Signed-off-by: mschwab <mschwab@nvidia.com>
Addresses a CodeRabbit nitpick — FC, ComponentProps, and generated schema symbols are type-only; import them with import type per the repo TS guideline. Signed-off-by: mschwab <mschwab@nvidia.com>
Summary
Adds a Virtual Models page to NeMo Studio (ASTD-300) — view and delete inference-routing VirtualModels, with a read-only middleware-pipeline details panel. Nav lives under the Models group.
Because nearly all VirtualModels are controller-managed passthroughs (
autoprovisioned), the IGW list endpoint gains a way to exclude them, and the UI hides them by default. Search + column filtering round out the table to match the other Studio data views.What's included
Studio UI (
web/packages/studio)VirtualModelsListRoute+VirtualModelsDataView+VirtualModelDetailsSidePanel$like) + column filters (default model text, created-at date range), search/filter-aware empty stateInference Gateway (
services/core/inference-gateway)exclude_autoprovisionedquery param onlist_virtual_models(defaultfalse) — server ANDs a real-booleandata.autoprovisioned == falseconditionVirtualModelFilterforname/default_model_entity/created_at/updated_atfilteringRegenerated: OpenAPI spec, Python SDK (stainless), CLI (
--exclude-autoprovisionedswitch), web SDK (CI-rebuilt).Design notes
exclude_autoprovisionedand not a genericfilter[autoprovisioned]? A string-based deep-object filter delivers the value as"false", which never matches the SQLite entity store's JSON boolean. Inverting to a dedicated boolean param (defaultfalse) both fixes the match and lets the generated CLI expose a working positive--exclude-autoprovisionedswitch. (Both issues were caught in a Codex review and fixed inafc16b7.)Verification
pytest services/core/inference-gateway/tests/unit/test_virtual_models_router.py— 34 pass (incl. real-store exclusion +name $like)pnpm --filter nemo-studio-ui test(VM suites) — 7 pass;typecheck+typecheck:go+eslintcleanruff+tyclean on the IGW route--exclude-autoprovisionedCLI switch verified🤖 Generated with Claude Code
Summary by CodeRabbit
--exclude-autoprovisioned/exclude_autoprovisioned, plus expandedfilteroptions (includingdefault_model_entity,name,project,workspace,created_at,updated_at).