Skip to content

fix(agents): resolve default model in SDK-created agents#789

Merged
mckornfield merged 1 commit into
mainfrom
6480318-k8s-agent-docs/mkornfield
Jul 20, 2026
Merged

fix(agents): resolve default model in SDK-created agents#789
mckornfield merged 1 commit into
mainfrom
6480318-k8s-agent-docs/mkornfield

Conversation

@mckornfield

@mckornfield mckornfield commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Agent configs can include ${NEMO_DEFAULT_MODEL}, which is resolved when creating agents via the SDK/CLI.
    • Agent and deployment operations now consistently derive the effective workspace when it’s not explicitly provided.
  • Bug Fixes

    • Agent creation now fails fast with a clear error when ${NEMO_DEFAULT_MODEL} cannot be resolved.
  • Documentation

    • Clarified REST API guidance for substituting the ${NEMO_DEFAULT_MODEL} placeholder with an explicit VirtualModel name.
    • Updated local-install, self-managed Kubernetes requirements, and broadened the OSS support matrix.
  • Tests

    • Added unit coverage for default-model resolution, error handling, and workspace URL behavior.

@mckornfield
mckornfield requested review from a team as code owners July 20, 2026 17:01
@github-actions github-actions Bot added the fix label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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: 0791199e-b702-448f-bbd2-4551c1791a6a

📥 Commits

Reviewing files that changed from the base of the PR and between b47ae53 and 0ec2151.

📒 Files selected for processing (5)
  • docs/agents/deploy-agents.mdx
  • docs/requirements.mdx
  • docs/support-matrix.mdx
  • plugins/nemo-agents/src/nemo_agents_plugin/sdk.py
  • plugins/nemo-agents/tests/unit/test_sdk.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/support-matrix.mdx
  • plugins/nemo-agents/src/nemo_agents_plugin/sdk.py

📝 Walkthrough

Walkthrough

Changes

Agent SDK and deployment documentation

Layer / File(s) Summary
Default model resolution
plugins/nemo-agents/src/nemo_agents_plugin/sdk.py, plugins/nemo-agents/tests/unit/test_sdk.py, docs/agents/deploy-agents.mdx
Agent creation resolves ${NEMO_DEFAULT_MODEL}, rejects unresolved placeholders, preserves input configs, and documents SDK/CLI versus REST API behavior.
Workspace routing across resources
plugins/nemo-agents/src/nemo_agents_plugin/sdk.py, plugins/nemo-agents/tests/unit/test_sdk.py
Agent and deployment operations resolve workspaces from explicit arguments, the platform client, or the SDK fallback.
Platform requirements and support scope
docs/requirements.mdx, docs/support-matrix.mdx
Documentation now covers OSS local installs and self-managed Kubernetes deployments, including Helm, storage, credentials, supported platforms, and out-of-scope guides.

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant AgentsResource
  participant inject_default_model
  participant AgentAPI
  Caller->>AgentsResource: create(config)
  AgentsResource->>inject_default_model: resolve default model
  inject_default_model-->>AgentsResource: resolved config
  AgentsResource->>AgentAPI: POST resolved agent config
Loading

Suggested labels: test, docs

Suggested reviewers: tylersbray, svvarom

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. 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 clearly matches the main change: SDK-created agents now resolve the default model placeholder.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 6480318-k8s-agent-docs/mkornfield

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 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/requirements.mdx`:
- Line 32: Update the “Image access” requirement in docs/requirements.mdx to
distinguish NGC credentials for API/model-download access from imagePullSecrets
for private registry or mirror pulls. Do not present both as jointly required
for pulling NeMo Platform images; state each requirement independently according
to its scope.
🪄 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: 1f646c0b-c877-4fe0-a86d-e02cd807ece3

📥 Commits

Reviewing files that changed from the base of the PR and between 945d06b and b47ae53.

📒 Files selected for processing (5)
  • docs/agents/deploy-agents.mdx
  • docs/requirements.mdx
  • docs/support-matrix.mdx
  • plugins/nemo-agents/src/nemo_agents_plugin/sdk.py
  • plugins/nemo-agents/tests/unit/test_sdk.py

Comment thread docs/requirements.mdx
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 26385/34036 77.5% 61.8%
Integration Tests 15175/32661 46.5% 18.7%

Signed-off-by: Matt Kornfield <mkornfield@nvidia.com>
@mckornfield
mckornfield force-pushed the 6480318-k8s-agent-docs/mkornfield branch from b47ae53 to 0ec2151 Compare July 20, 2026 21:39
@mckornfield
mckornfield enabled auto-merge July 20, 2026 21:45
@mckornfield
mckornfield added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit a8b5a72 Jul 20, 2026
62 checks passed
@mckornfield
mckornfield deleted the 6480318-k8s-agent-docs/mkornfield branch July 20, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants