---
name: model-pricing-sync
description: >
  Sync model pricing, context windows, and capabilities from LiteLLM's
  community-maintained pricing database. Updates the model registry in
  Wall-E's brain so the Model Registry UI shows accurate costs.
version: 1.0.0
author: wall-e
execution: script
entry: run.js
trigger:
  type: interval
  interval_ms: 604800000
tags: [models, pricing, registry, litellm]
permissions:
  - brain:write
  - network:read
---
# Model Pricing Sync

## What This Skill Does

Fetches the latest model pricing data from LiteLLM's open-source pricing
database and updates models in Wall-E's brain model_registry table.

## How It Works

1. Fetch `model_prices_and_context_window.json` from LiteLLM's GitHub repo
2. Load all models from the brain's model registry
3. For each model with missing or outdated cost data:
   - Match against the LiteLLM catalog by model_id
   - Update cost_per_1m_input, cost_per_1m_output, max_context_tokens
4. Log a summary of updated models

## Schedule

Runs once per week (604800000ms). On first boot (when the skill has never
run), it executes immediately since `last_run` is null.

## Data Source

LiteLLM maintains a community-updated JSON file covering 300+ models from
OpenAI, Anthropic, Google, Mistral, Cohere, and more:
https://github.com/BerriAI/litellm
