update-models
Refresh elph-ai chat model catalogs by compiling the primary authoritative sources (models.dev, OpenRouter, ai-model-directory) alongside live provider probes…
от riipandi★ 34 звезды на GitHub
Установить update-models в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Update Models (Multi-Source Catalog Compilation)
Language & Conventions
- In-chat reports follow the user's language.
- Persisted docs, skill text, and generated comments stay English.
Overview & Architecture
Model catalogs reside as JSON definitions in crates/elph-ai/models/*.json (and models/index.json). At compile time, crates/elph-ai/build.rs compresses them into zstd frames embedded directly in the binary. There is no generated Rust catalog source code to maintain manually.
Catalogs are produced by compiling three primary compiled sources alongside supplementary live discovery probes and dedicated endpoints:
flowchart TD
subgraph CompiledSources["Compiled Model Sources"]
MDEV["1. models.dev<br/>(api.json / models.json / catalog.json)"]
OR["2. OpenRouter /models<br/>(Canonical supported_efforts & live rates)"]
AIMD["3. ai-model-directory<br/>(data/all.json compiled pricing fallback)"]
end
subgraph SupplementarySources["Supplementary Sources & Overlays"]
LIVE["Provider Live /models Probes<br/>(Active ID discovery & live pricing)"]
DEDICATED["Dedicated Pricing Endpoints<br/>(Provider-specific official rates)"]
PREV["Preserved Disk Overlays<br/>(Previous catalog snapshot)"]
end
CompiledSources --> D["Unified Model Catalog<br/>(crates/elph-ai/models/*.json)"]
SupplementarySources --> D
D --> H["build.rs Embedding<br/>(Compressed zstd in binary)"]
Compiled Model Sources
The catalog compiler relies on three primary compiled sources:
models.dev (
api.json,models.json,catalog.json)api.json: Nestedprovider → {models}index. Primary source for baseline costs,reasoning_options, modalities, and token limits.models.json/catalog.json: Flat catalog index. Authoritative fordescription,knowledge(cutoff),benchmarks,release_date, andweights.- Cached locally under
models/.cache/models.dev/with a 24h freshness check.
OpenRouter (
/api/v1/models)- Authoritative and canonical source for
reasoning.supported_efforts(thinking level mapping) and live per-token pricing (converted to per-million USD). - Requires
OPENROUTER_API_KEYfor authenticated live queries.
- Authoritative and canonical source for
ai-model-directory (
The-Best-Codes/ai-model-directory,data/all.json)- Compiled community catalog used as a pricing fallback when neither live API nor models.dev provides costs.
- Fills the
reasoningboolean flag only when models.dev has no opinion on that model. - Public, no key required (cached raw GitHub snapshot).
Supplementary Sources & Provider Notes
Additional data sources and provider-specific configurations:
- Provider Live
/modelsProbes:- Queried for active model discovery and live pricing.
- Public endpoints: e.g. OpenCode (
/zen/v1/models), OpenCode Go (/zen/go/v1/models), Hetzner, etc. (probed anonymously). - Authwalled endpoints: e.g. OpenAI, xAI, Mistral, Hyper, Infron, Kilo, DataByte, Kenari, etc. (probed with provider env keys when present).
- Dedicated Pricing Endpoints:
- e.g. Nara Router (
https://router.bynara.id/api/pricing) provides official USD per million rates (official_in_usd_m/official_out_usd_m) since Nara's/v1/modelsendpoint exposes no pricing. Credit fields are ignored.
- e.g. Nara Router (
- Cline Model Directory (
cline.rs):- Cline (usage-billing) and ClinePass catalogs are built from Cline's public model directory (no API key required), not models.dev:
https://api.cline.bot/api/v1/ai/cline/recommended-models— curated id groups (recommended+freeforcline,clinePassforcline-pass).https://api.cline.bot/api/v1/ai/cline/models— full detail (per-token pricing, context length, input modalities) keyed by OpenRouter-style id.
- Detail entries are paired to catalog ids by tail segment (
kimi-k3→moonshotai/kimi-k3). ClinePass ids keep thecline-pass/prefix. CLINE_API_KEYis not required for catalog generation (the/v1/modelsendpoint is authwalled, but the model directory is public).
- Cline (usage-billing) and ClinePass catalogs are built from Cline's public model directory (no API key required), not models.dev:
- Preserved Overlays & Previous Catalog Snapshot:
- Existing
models/*.jsonentries are preserved for non-gateway manual overrides and fallback non-zero pricing when fresh sources are unpriced.
- Existing
Model Lifecycle: Additions vs Removals
The generator rebuilds each provider file from scratch, but whether stale models survive depends on the id source (bin/generate_models/chat.rs):
| Provider source state | Stale id behavior |
|---|---|
On models.dev (models_dev_keys match) |
Dropped — catalog is exactly the models.dev id set. |
| Gateway-preserve + live probe succeeded | Dropped — catalog |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл update-models?
Refresh elph-ai chat model catalogs by compiling the primary authoritative sources (models.dev, OpenRouter, ai-model-directory) alongside live provider probes and dedicated endpoints. Discovers live model IDs, resolves 7-key thinkingLevelMap, enriches pricing and metadata, and validates quality gates. Use when running /update-models, refreshing model lists, or updating provider pricing and capabilities.
Как установить скилл update-models?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл update-models запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…