跳到正文
cccskills
免费在 GitHub 公开

model-catalog-audit

Audit the in-tree model catalog against each provider's live API (Anthropic, OpenAI, Google, OpenRouter, xAI) using the keys in .env. Surfaces new models the catalog is missing, catalog models a provider no longer returns, and price/context drift on the curated OpenRouter subset, so the catalog stays current. Works on both stacks (docker containers or host venv). Run periodically or when a provider ships new models / changes pricing.

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy星标 68(GitHub 68 + cccskills 0)
集成工具OpenAI

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md6.1 KB
  • scripts/audit_models.py10.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Keep src/uniffy/data/models/catalog.json current by diffing it against what the providers actually serve. The catalog is the source of truth for the model list, pricing, capabilities, and image-gen support (see .agents/rules/agents.md), so it drifts as providers ship and retire models.

When to use

  • Periodically (e.g. monthly) to catch new models and retirements.
  • When someone reports a missing model, or a provider announces a launch.
  • After a pricing change announcement (the audit finds the models; you research the prices).

Steps

  1. Detect the stack (same protocol as the stack notes in AGENTS.md) - never assume:

    docker compose ps -q --status running backend
    
    • Output non-empty -> docker stack: the backend container has the venv, the repo bind-mounted at /app, and .env injected via env_file.
    • Empty -> local ONLY if .venv/bin/python exists on the host. A bare .venv directory does NOT count (empty or root-owned leftovers happen and uv will fail trying to populate them).
    • Neither -> docker: the command below falls back to a one-off run --rm backend container (compose builds the dev image on first use). Never fix a broken host .venv by letting uv sync onto the host.
  2. Run the audit from the repo root. deps run -s backend is a raw uv passthrough that targets whichever stack you detected:

    # docker stack (default)
    ./manage.py deps run -s backend run python .agents/skills/model-catalog-audit/scripts/audit_models.py
    
    # local stack
    ./manage.py deps run -s backend --stack local run python .agents/skills/model-catalog-audit/scripts/audit_models.py
    

    It loads provider keys from .env (CLAUDE_API_KEY, OPENAI_API_KEY, GOOGLE_GENAI_API_KEY, XAI_API_KEY), lists each provider's live models, and diffs against the catalog. A provider with no key in .env is skipped. OpenRouter uses a public endpoint and needs no key, so it always runs. It is read-only - it never edits the catalog.

  3. Read the report. Per provider:

    • NEW - a live model the catalog does not resolve. These are candidates to add. Expect noise from OpenAI/Google: embeddings, tts-*, whisper-*, gpt-realtime-*, *-moderation, aqa, deep-research-*, computer-use-*, sora-* are not chat or image-generation models - skip them unless we add a code path. Focus on chat models and image-gen models.
    • UNSEEN - a catalog model this key did not return. Often just means the account lacks access or it is a dated snapshot; do not delete blindly.
    • openrouter - different semantics. The catalog holds a deliberately curated subset of 400+ upstream models, so the script never reports NEW there. Instead it reports MISSING UPSTREAM (a catalog slug or alias the live list no longer serves - candidate for replacement or deprecation), PRICE DRIFT (catalog cost_per_1m_* vs live per-token prices times 1M, beyond a small tolerance), and CONTEXT DRIFT (catalog context_window vs live context_length).
    • xai - standard NEW/UNSEEN via XAI_API_KEY. When the richer /v1/language-models endpoint responds with pricing, the same PRICE DRIFT report runs; otherwise the plain /v1/models list is used.
  4. Review the findings with the user before adopting anything.

  5. Decide what to adopt. For each NEW model worth adding (a real chat or image-gen model), and for any model whose pricing may have changed:

    • Research capabilities + pricing on the web - the anthropic/openai/ google APIs do not return pricing. Use the provider's official pricing/docs page (this is the same flow used to add the Gemini "Nano Banana" models). Record the source. For openrouter entries the audit's PRICE DRIFT output already carries the live rates.
    • Confirm context window, max output tokens, vision/tools/reasoning support, and reasoning effort levels.
  6. Edit catalog.json (catwalk-shaped - match existing entries):

    • Chat model: id, name, cost_per_1m_in/out, cost_per_1m_in_cached (cache write) + cost_per_1m_out_cached (cache read), context_window, default_max_tokens, can_reason (+ reasoning_levels / default_reasoning_effort when it reasons), supports_attachments.
    • Image model: set supports_image_generation: true and either image_prices (size/quality matrix) or cost_per_image (flat). Leave pricing out if genuinely unknown - the model is still selectable, cost just stays unrecorded.
    • Use aliases for -preview / -latest / dated variants that should resolve to one canonical entry.
    • For confirmed retirements, set deprecated: true and sunset_date rather than deleting, so existing references still resolve.
  7. Verify on the same stack you detected in step 1 (add --stack local for the host venv). The loader re-reads on file change:

    ./manage.py deps run -s backend run python -c "from uniffy.domains.agents.providers.catalog import loader; loader.load_catalog(); print('catalog valid')"
    ./manage.py deps run -s backend run pytest src/uniffy/tests/test_pricing.py -q
    

    A malformed catalog raises on load (hard fail), so a clean load means the schema is satisfied.

Notes

  • Price drift IS auto-detected for openrouter (its API exposes per-token prices), and for xai when /v1/language-models reports pricing. Anthropic, OpenAI, and Google expose no pricing, so their price changes remain a manual web-research step.
  • New entries are picked up live (mtime reload); no restart needed to test.
  • Do not commit anything from .env or print key values.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

commit

免费

Create a conventional commit for all uncommitted changes

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy682026年10月23日 更新

Create a Product Requirements Document from the current conversation and save it under `.agents/local/plans/`. Use when the user asks for a PRD, product specification, or requirements document for an Uniffy feature.

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy682026年10月23日 更新

execute

免费

Execute or resume an implementation plan from `.agents/local/plans/`, keeping its companion backlog and validation evidence current. Use when the user asks to implement a saved plan or continue planned multi-phase work.

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy682026年10月23日 更新

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy682026年10月23日 更新

Create a comprehensive Uniffy feature plan in `.agents/local/plans/` through deep codebase analysis, applicable rules, verified patterns, risks, tests, and executable validation steps. Use when the user asks to plan a feature or prepare implementation work without writing product code.

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy682026年10月23日 更新

pr

免费

Check the current branch for an existing PR and either update or create one with an auto-generated description based on all commits since diverging from main.

中文简介正在准备中。当前显示原文说明。

uniffy-io/uniffy682026年10月23日 更新

查看 uniffy-io 的全部技能

报告此技能的问题