Skip to content

[docs] feat: update model support skill with encapsulation guidance#3313

Open
cuichenx wants to merge 4 commits intomainfrom
chcui/update-model-support-skill
Open

[docs] feat: update model support skill with encapsulation guidance#3313
cuichenx wants to merge 4 commits intomainfrom
chcui/update-model-support-skill

Conversation

@cuichenx
Copy link
Copy Markdown
Contributor

@cuichenx cuichenx commented Apr 14, 2026

Summary

  • Clarify that LLMs should use the bridge-only pattern — no provider file needed; the base GPTModelProvider returned by super().provider_bridge() is sufficient for all LLMs
  • Add new "Encapsulating model-specific layers" section with three strategies for handling custom architectural blocks: local mapping subclasses, bridge hook overrides, and VLM-only custom providers
  • Expand the quick decision tree with custom layer/weight layout handling branches

Test plan

  • Verify skill renders correctly in Markdown
  • Confirm guidance aligns with recent model additions (GLM, Nemotron-H, MiniMax-M2)

Summary by CodeRabbit

  • Documentation
    • Updated guidance for implementing new AI model support with simplified LLM and VLM workflows
    • Clarified best practices for organizing model-specific configurations and layers
    • Enhanced decision tree to simplify developer implementation choices
    • Expanded with concrete strategies for model integration patterns

Clarify that LLMs should use bridge-only pattern (no provider file) and
add a new "Encapsulating model-specific layers" section with three
strategies for handling custom architectural blocks: local mapping
subclasses, bridge hook overrides, and VLM-only custom providers.
Also expand the decision tree for custom layer handling.

Signed-off-by: Chen Cui <chcui@nvidia.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

Documentation update for model support skill that removes the requirement for provider files in most LLM cases, revises VLM workflow guidance, introduces a new section on encapsulating model-specific layers, expands strategy guidance with concrete examples, and updates decision tree routing.

Changes

Cohort / File(s) Summary
Model Support Documentation
skills/adding-model-support/SKILL.md
Updated LLM file layout guidance to remove need for <model>_provider.py in most cases; revised VLM workflow to prioritize bridge/config; added new section on encapsulating model-specific layers in dedicated directories; expanded strategic guidance with local mapping subclasses, bridge hook overrides, and provider subclass criteria; updated quick decision tree with simplified LLM routing and custom layer handling.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4
✅ 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 accurately summarizes the main change: updating documentation for model support with new encapsulation guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Test Results For Major Changes ✅ Passed PR contains documentation-only changes to SKILL.md with no code modifications, no API changes, and no impact on functionality, numerics, or performance.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chcui/update-model-support-skill

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
skills/adding-model-support/SKILL.md (1)

99-111: ⚠️ Potential issue | 🟡 Minor

Use a consistent modeling/modelling directory naming convention

Line 99 uses modelling_<model>/ while Line 111 uses modeling_<model>.py. If both aren’t intentionally distinct conventions, this is likely to cause copy-paste setup errors.

Suggested doc fix
-└── modelling_<model>/        # If using Megatron vision encoder
+└── modeling_<model>/         # If using Megatron vision encoder
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/adding-model-support/SKILL.md` around lines 99 - 111, The docs mix
British and American spelling for the module directory/file names causing
potential copy-paste errors; pick one convention and make names consistent
(e.g., change `modelling_<model>/` to `modeling_<model>/` or vice versa) so the
directory name and the file `modeling_<model>.py` align, and update any
references in the same section to use the chosen symbol (`modeling_<model>` or
`modelling_<model>`) uniformly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/adding-model-support/SKILL.md`:
- Around line 119-120: The sentence overstates that GPTModelProvider covers "all
LLMs"; update the documentation text to clarify that super().provider_bridge()
returns a provider determined by PROVIDER_CLASS and that GPTModelProvider is
sufficient only for GPT-style LLM implementations — for non-GPT providers
authors should verify the returned provider type from provider_bridge() and
implement provider-specific logic or subclassing as needed. Reference
GPTModelProvider, provider_bridge(), and PROVIDER_CLASS in the revised sentence
to make the behavior explicit.

---

Outside diff comments:
In `@skills/adding-model-support/SKILL.md`:
- Around line 99-111: The docs mix British and American spelling for the module
directory/file names causing potential copy-paste errors; pick one convention
and make names consistent (e.g., change `modelling_<model>/` to
`modeling_<model>/` or vice versa) so the directory name and the file
`modeling_<model>.py` align, and update any references in the same section to
use the chosen symbol (`modeling_<model>` or `modelling_<model>`) uniformly.
🪄 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: Pro Plus

Run ID: 062513ca-81d8-4b31-8ebc-2c19d9e0f41f

📥 Commits

Reviewing files that changed from the base of the PR and between ad27e2c and c1e6ea6.

📒 Files selected for processing (1)
  • skills/adding-model-support/SKILL.md

Comment thread skills/adding-model-support/SKILL.md Outdated
@cuichenx cuichenx added the docs-only With great power comes great responsibility. label Apr 14, 2026
- Fix inconsistent directory naming: modelling_<model>/ → modeling_<model>/
- Soften provider guarantee: clarify that super().provider_bridge() returns
  a stock provider (not necessarily GPTModelProvider) via PROVIDER_CLASS
- Apply same fix to Strategy 3 section for consistency

Signed-off-by: Chen Cui <chcui@nvidia.com>
Comment thread skills/adding-model-support/SKILL.md
Comment thread skills/adding-model-support/SKILL.md Outdated
Signed-off-by: Chen Cui <chcui@nvidia.com>
Signed-off-by: Chen Cui <chcui@nvidia.com>
@yaoyu-33 yaoyu-33 added docs Documentation-only updates or documentation debt area:misc Cross-cutting utilities, logging, helpers, and other changes needs-review PR is ready for code review and waiting on a reviewer labels Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:misc Cross-cutting utilities, logging, helpers, and other changes docs Documentation-only updates or documentation debt docs-only With great power comes great responsibility. needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants