Command Palette

Search for a command to run...

Назад к скиллам
скилл № 45201

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от 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:

  1. models.dev (api.json, models.json, catalog.json)

    • api.json: Nested provider → {models} index. Primary source for baseline costs, reasoning_options, modalities, and token limits.
    • models.json / catalog.json: Flat catalog index. Authoritative for description, knowledge (cutoff), benchmarks, release_date, and weights.
    • Cached locally under models/.cache/models.dev/ with a 24h freshness check.
  2. 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_KEY for authenticated live queries.
  3. 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 reasoning boolean 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 /models Probes:
    • 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/models endpoint exposes no pricing. Credit fields are ignored.
  • 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 + free for cline, clinePass for cline-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 the cline-pass/ prefix.
    • CLINE_API_KEY is not required for catalog generation (the /v1/models endpoint is authwalled, but the model directory is public).
  • Preserved Overlays & Previous Catalog Snapshot:
    • Existing models/*.json entries are preserved for non-gateway manual overrides and fallback non-zero pricing when fresh sources are unpriced.

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
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

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), без исполняемых скриптов.

Похожие скиллы

Сравнить update-models с