Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add echoVic/blade-code --skill model-catalog-configuration-and-credentialsgit clone --depth 1 https://github.com/echoVic/blade-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/echovic/blade-code/model-catalog-configuration-and-credentials)<a href="https://agentmods.dev/skills/echovic/blade-code/model-catalog-configuration-and-credentials"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/model-catalog-configuration-and-credentials.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00160 | $0.01940 |
| Opus 5 | $0.00080 | $0.00970 |
| Sonnet 5 | $0.00032 | $0.00388 |
| Haiku 4.5 | $0.00016 | $0.00194 |
Grade A, and why
knowledge-model-and-provider-runtime-model-catalog-configuration-and-credentials scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- knowledge-model-and-provider-runtime-provider-transport-and-context-adaptation — 88% identical, 88 lines differ
How it starts
The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
该节点负责从 pi-ai 与 Blade 配置构建模型/Provider 目录,将每条模型配置解析成 Session 使用的模型能力和独立通道参数,并把敏感凭据保存在配置之外。
Directory Layout
packages/cli/src/services/pi/PiModelCatalog.ts— 内置、兼容和自定义 Provider 的可变目录packages/cli/src/services/pi/catalogTypes.ts— 对 UI/API 暴露的非敏感目录投影packages/cli/src/services/pi/modelRuntime.ts— 主模型与 fallback 模型实例化packages/cli/src/services/pi/resolveModelConfig.ts— 模型能力、选择项、凭据和 fallback channel 解析packages/cli/src/services/pi/FileCredentialStore.ts—auth.json的原子安全存储packages/cli/src/services/pi/endpoint.ts— wire API 感知的 endpoint 规范化packages/cli/src/config/modelIds.ts— 模型配置 ID 生成和旧随机 ID 迁移packages/cli/src/config/modelProviders.ts— 自定义 Provider ID、协议和环境变量验证packages/cli/src/services/modelAlias.ts— CLI 模型简称解析
Key Entry Points
PiModelCatalog.configureModelProviders()inpackages/cli/src/services/pi/PiModelCatalog.ts— 以当前配置整体重建自定义 ProviderPiModelCatalog.getModel()inpackages/cli/src/services/pi/PiModelCatalog.ts— 获取模型并按需注册兼容/自定义模型resolveModelConfig()inpackages/cli/src/services/pi/resolveModelConfig.ts— 生成模型、显示名、能力选择和ChatConfigFileCredentialStore.modify()inpackages/cli/src/services/pi/FileCredentialStore.ts— 串行、原子更新 Provider 凭据
Gotchas
- 自定义 Provider ID 必须匹配小写 ID 规则且不能覆盖任何启动时已注册的 pi-ai Provider;即使 wire API 相同,也必须为每个网关分配独立 ID 才能隔离 endpoint 与凭据 (
packages/cli/src/config/modelProviders.ts,packages/cli/src/services/pi/PiModelCatalog.ts) - API key 放入
modelProviders会被显式拒绝;凭据键是具体 Provider channel ID,模型配置只保存非敏感路由信息 (packages/cli/src/config/modelProviders.ts,packages/cli/src/services/pi/FileCredentialStore.ts) - fallback 只写
provider + model时,只有目录中恰好存在一条匹配配置才会吸收该配置的 channel;重复匹配必须提供configId,且configId指向不同 provider/model 会直接失败 (packages/cli/src/services/pi/resolveModelConfig.ts) - 跨 Provider fallback 必须通过独立配置或凭据来源解析 channel;它不会沿用 primary 的
BLADE_API_KEY、base URL、headers、service tier 或 response verbosity (packages/cli/src/services/pi/resolveModelConfig.ts,packages/cli/src/services/PiAIChatService.ts) - Anthropic Messages SDK 会自行追加版本路径,因此仅该 wire API 会剥离 base URL 末尾的
/v1;OpenAI-compatible 地址只去除尾部斜杠,不能共用同一规范化假设 (packages/cli/src/services/pi/endpoint.ts,packages/cli/tests/unit/services/pi-model-runtime.test.ts) - 任意兼容模型可按需注册,但完全未知的模型会落到文本输入、关闭 reasoning、128K context、32K 输出和零价格;它可运行不代表能力与费用元数据准确 (
packages/cli/src/services/pi/PiModelCatalog.ts) openai-compatible和anthropic-compatible是兼容渠道创建入口,目录投影故意不把它们报告为已配置;多渠道场景应使用modelProviders,而不是依赖这两个共享凭据键 (packages/cli/src/services/pi/PiModelCatalog.ts,docs/configuration/config-system.md)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 63 lines · 160 tokens per session scan A 823b0338345c
knowledge-model-and-provider-runtime-model-catalog-configuration-and-credentials is a skill published in the GitHub repository echoVic/blade-code (178 stars, last pushed yesterday), licensed MIT. It adds 160 tokens to every session and 1,940 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
histolab
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
torch-geometric
Graph Neural Networks (PyG). Node/graph classification, link prediction, GCN, GAT, GraphSAGE, heterogeneous graphs, molecular property prediction, for geometric deep learning.
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
glycobiology
Glycosylation site prediction and glycobiology analysis. N-glycosylation motif finding, O-glycosylation hotspot prediction, glycan structure resources. Lightweight, pure Python. For protein function queries use uniprot-database; for structure analysis use alphafold-database.
pyhealth
Comprehensive healthcare AI toolkit for developing, testing, and deploying machine learning models with clinical data. This skill should be used when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC)…
deepchem
Molecular ML with diverse featurizers and pre-built datasets. Use for property prediction (ADMET, toxicity) with traditional ML or GNNs when you want extensive featurization options and MoleculeNet benchmarks. Best for quick experiments with pre-trained models, diverse molecular representations. For graph-first…