Files
librefang-registry/scripts
Evan aa5822992a fix: route OpenRouter-only providers through OpenRouter API (#38)
Providers without their own public API now use OpenRouter as their
base_url with OPENROUTER_API_KEY, making them testable and usable
when the user has an OpenRouter key configured.

- 20 OpenRouter-only providers: set base_url to openrouter.ai/api/v1
- morph: set correct official API (api.morphllm.com/v1)
- sync-pricing.py: default to OpenRouter routing for new providers
2026-04-02 23:41:25 +08:00
..

Scripts

Utility scripts for maintaining the LibreFang registry.

validate.py

Validates all TOML content files across the registry.

python scripts/validate.py

What It Checks

Per content type:

  • Providers -- required fields, valid tiers, non-negative costs, no duplicate model IDs
  • Agents -- required fields (name, description, module), name matches directory
  • Hands -- required fields (id, name, description), valid category, [agent] section, id matches directory
  • Integrations -- required fields (id, name), [transport] section, id matches filename
  • Skills -- [skill] section with name, [runtime] with valid type
  • Plugins -- name matches directory, [hooks] section, hook files exist

Cross-type checks:

  • Routing alias collisions between agents and hands (reported as warnings)
  • Cross-file duplicate model IDs within the same provider

Requirements

  • Python 3.11+ (uses tomllib)
  • Or Python 3.8+ with pip install tomli

Exit Codes

  • 0 -- all checks passed
  • 1 -- one or more validation errors