← Back to Skills Marketplace
431
Downloads
0
Stars
1
Active Installs
4
Versions
Install in OpenClaw
/install semantic-model-router
Description
Smart LLM Router — routes every query to the cheapest capable model. Supports 17 models across Anthropic, OpenAI, Google, DeepSeek & xAI (Grok). Uses a pre-t...
Usage Guidance
This skill appears to be a local classifier that selects which provider/model would be most cost-efficient — it does not itself call provider APIs or require provider API keys. However:
- SKILL.md's “zero external calls” is misleading: if sentence-transformers is installed and used, the encoder (all-MiniLM-L6-v2) will normally be downloaded from the internet (Hugging Face) unless already cached. If you require strictly offline behavior, do not install or instantiate the encoder, or ensure the model is pre-cached in a controlled environment.
- The skill writes a local file named query_history.json by default; review/relocate it if you want to avoid storing queries on disk.
- If you expected the skill to automatically route and invoke remote LLMs for you, note that it only selects/labels models and reports costs — you still need the provider integrations and credentials to actually call chosen models.
Recommendations before installing:
1. Review the full model_router.py and model_weights.py contents locally (they are auditable). 2. If you want zero network activity, avoid installing/using sentence-transformers or pre-cache the embedding model in a private environment. 3. Run the skill in a sandbox or isolated environment first to observe whether it attempts to download models. 4. Confirm you understand that cost savings are estimates based on the embedded price catalog and that no provider billing or credential handling is included.
Capability Analysis
Type: OpenClaw Skill
Name: semantic-model-router
Version: 1.0.3
The skill bundle is classified as benign. The `SKILL.md` documentation accurately describes the skill's functionality and does not contain any prompt injection attempts. The `model_router.py` script implements the described LLM routing logic, utilizing local ML models and keyword matching. It performs file I/O to a `query_history.json` file for local logging, which is a plausible feature for 'refinement' and does not target sensitive paths. While the `sentence-transformers` library might perform a one-time model download on first use, this is a standard library setup behavior and not an 'external call' for classification inference, aligning with the stated intent of local operation and providing a fallback via `model_weights.py`.
Capability Assessment
Purpose & Capability
Name/description describe a router that selects the cheapest capable model. The included code and weights implement a local classifier/selector (ModelRouter) — they do not themselves call provider APIs or require provider credentials. That is coherent, but the description could mislead users into thinking the skill will automatically invoke external LLM provider endpoints; it only selects/labels a model id and reports costs.
Instruction Scope
SKILL.md states “Zero external calls” and “no API keys needed.” The code instantiates SentenceTransformer('all-MiniLM-L6-v2') when available, which will normally download model files from Hugging Face (an external network activity) if not already cached. The router also writes a local history_file (query_history.json). There are no explicit network/post endpoints or credential access in the visible code, but the potential for implicit external downloads via dependencies contradicts the SKILL.md claim.
Install Mechanism
No explicit install spec (instruction-only), but requirements.txt lists sentence-transformers and numpy. Installing those will pull in heavy Python packages and may cause additional downloads (tokenizers, huggingface components). No remote arbitrary archive downloads or unknown URLs were observed in the files provided.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The code likewise does not reference environment secrets or external API keys. This is proportionate to a local classifier/selector.
Persistence & Privilege
The skill is not always-enabled and does not request elevated system privileges. It writes a local query_history.json by default (user-writable), and loads local model files if present. It does not modify other skill configs or global agent settings.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install semantic-model-router - After installation, invoke the skill by name or use
/semantic-model-router - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.3
- Updated documentation for model tiers, supported providers, and pricing details.
- Expanded model support list to 17 models across Anthropic, OpenAI, Google, DeepSeek, and xAI.
- Clarified routing architecture (ML classifier, semantic fallback, keyword rules).
- Added examples for runtime model override, CLI usage, and dynamic keyword rules.
- Documentation now emphasizes zero external calls and no required API keys.
- Improved quickstart and output explanation for users.
v1.0.2
- Added new script: scripts/model_weights.py.
- Updated files list in SKILL.md to include model_weights.py and requirements.txt.
- No changes to core logic; this is a minor addition for future modularity.
v1.0.1
- Added new module: scripts/model_weights.py for improved modularity.
- Updated SKILL.md to explicitly list core files (model_router.py, model_weights.py, requirements.txt).
- Improved internal organization and separation of logic within scripts/model_router.py.
- No changes to external APIs or usage; skill remains fully local and privacy-preserving.
v1.0.0
- Added initial release of semantic-model-router.
- Routes AI queries to Elite, Balanced, or Basic LLM tiers based on semantic similarity.
- Reduces costs by matching simple queries to less expensive models.
- Supports dynamic keyword expansion and logs query history locally for refinement.
- Operates fully locally with no external network calls or API key requirements.
Metadata
Frequently Asked Questions
What is semantic-model-router?
Smart LLM Router — routes every query to the cheapest capable model. Supports 17 models across Anthropic, OpenAI, Google, DeepSeek & xAI (Grok). Uses a pre-t... It is an AI Agent Skill for Claude Code / OpenClaw, with 431 downloads so far.
How do I install semantic-model-router?
Run "/install semantic-model-router" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is semantic-model-router free?
Yes, semantic-model-router is completely free (open-source). You can download, install and use it at no cost.
Which platforms does semantic-model-router support?
semantic-model-router is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created semantic-model-router?
It is built and maintained by Ray (@rayray1218); the current version is v1.0.3.
More Skills