skills/llm-add-model-support/SKILL.md
Add or revise a model configuration JSON under model_configuration_files/ and ensure it is exercised by CTest (test/CMakeLists.txt) for the relevant backend; optionally onboard a new model end-to-end (downloads/sha256 entries, backend prompt/template quirks, tests, README updates). Use when onboarding a new model, updating supported models, or fixing model-related load/inference/test failures.
npx skillsauth add arm-examples/llm-runner llm-add-model-supportInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This repo’s “model support” typically means: a config in model_configuration_files/, model assets available under resources_downloaded/models/<backend>/..., and CTest coverage wired in test/CMakeLists.txt.
Windows note: if python3 isn’t available, use python (or py -3) for the scripts below.
Use this path when you’re not onboarding new model assets or changing backend code, and only need to add/update a JSON config and ensure CI/test wiring covers it.
model_configuration_files/ (keep naming consistent for the target backend).skills/llm-config-schema-change/ for the parsing/tests/docs flow, then return here for config/test wiring.CONFIG_FILE_NAME list in test/CMakeLists.txt.python3 skills/llm-add-model-support/scripts/assert_config_listed.py <your-config.json>
scripts/py/requirements.json (URLs + sha256sum) and keep downloads deterministic.LLM_FRAMEWORK and a model identifier (folder name under resources_downloaded/models/<backend>/).HF_TOKEN or ~/.netrc is available for downloads.Prefer extending the downloads manifest:
scripts/py/requirements.json under models → <backend> → <model-name>.url, destination, and sha256sum.python3 skills/llm-add-model-support/scripts/sha256_file.py <file> to compute hashes for local files.If downloads are not desirable (very large / licensing constraints), document how to supply the model manually and keep tests/configs from implicitly requiring the download.
Never commit artifacts from resources_downloaded/ (keep downloads deterministic via scripts/py/requirements.json).
model_configuration_files/<backend><Text|Vision>Config-<model>.json (follow existing naming patterns).src/cpp/config/ (LlmConfig.*).test/cpp/LlmConfigTest.cpp.Use the minimal set of changes needed for the chosen backend:
src/cpp/frameworks/.SupportedInputModalities() matches the model (text-only vs vision).Ensure CTest actually runs your config:
python3 skills/llm-add-model-support/scripts/assert_config_listed.py <your-config.json>
If it’s a new backend (or new modality), ensure test/CMakeLists.txt has the right branch and config list entries.
cmake --preset=native -B build -DLLM_FRAMEWORK=<backend>
cmake --build ./build --parallel
ctest --test-dir ./build --output-on-failure
If JNI is not relevant to model support changes, isolate:
cmake --preset=native -B build -DLLM_FRAMEWORK=<backend> -DBUILD_JNI_LIB=OFF
cmake --build ./build --parallel
ctest --test-dir ./build --output-on-failure
If a new model causes output drift (tests fail but the model is “reasonable”), revise tests deliberately:
See skills/llm-add-model-support/references/output-validation.md for concrete patterns used in this repo’s tests.
README.md “Supported Models” table (and link its license).TROUBLESHOOTING.md.skills/llm-add-model-support/references/new-model-checklist.mdskills/llm-add-model-support/references/backend-notes.mdskills/llm-add-model-support/references/output-validation.mdtools
Update scripts/py/requirements.json entries (URLs + sha256sum) for models/tools, validate hash changes, and keep downloads deterministic without committing artifacts. Use when adding or refreshing model/tool downloads.
tools
Run fast “session start / doctor” checks for this repository (toolchain + wiring sanity, framework version report, optional upstream update check), optionally generate a debug bundle, and when needed bump pinned backend framework versions with build+ctest verification. Use at session start or when upgrading llama.cpp/onnxruntime-genai/mediapipe/mnn pins.
tools
Run a fast JNI-focused build/test smoke check (JNI on, minimal test run), and isolate JNI toolchain issues. Use when changing JNI/Java code or validating JNI setup.
development
Debug failing LLM integration tests caused by model output drift, incorrect context/runtime parameters (contextSize, batchSize, threads), prompt/template mismatches, or backend/framework regressions. Use when tests fail and you need to see the model response, reproduce a single failing CTest, or trace issues into src/cpp/frameworks (llama.cpp, onnxruntime-genai, mediapipe, mnn).