add-model-price

À utiliser lors de l'édition de worker/src/constants/default-model-prices.json, packages/shared/src/server/llm/types.ts, des niveaux de prix, des identifiants de tokenizer ou des regex matchPattern…

npx skills add https://github.com/langfuse/langfuse --skill add-model-price

Add Model Price

Use this skill for model pricing changes in worker/ and shared LLM type updates in packages/shared/.

When to Apply

  • Editing worker/src/constants/default-model-prices.json
  • Editing packages/shared/src/server/llm/types.ts
  • Adding a new priced model
  • Updating provider prices, cache pricing, or tier conditions
  • Expanding regex coverage for Bedrock, Vertex, Azure, or provider-prefixed model names
  • Auditing default model prices for stale, missing, or unmatched provider pricing

How to Read This Skill

  • Use this SKILL.md as the high-level workflow and helper index.
  • Open only the specific reference file that matches the task.

Quick Start Checklist

Adding a New Model

  • Gather official pricing from the provider documentation.
  • Generate a lowercase UUID for the model entry.
  • Create a matchPattern that covers supported provider formats.
  • Add at least one default pricing tier.
  • Insert the pricing entry into worker/src/constants/default-model-prices.json.
  • Update packages/shared/src/server/llm/types.ts if the model should be selectable in playground or evaluation flows.
  • Validate the JSON after editing.

Updating an Existing Model

  • Update the relevant prices, keys, tiers, or regexes.
  • Refresh updatedAt to today's ISO-8601 timestamp.
  • Validate the JSON after editing.

Reference Map

TopicRead this whenFile
Schema and tier rulesYou need the entry shape or pricing-tier invariantsreferences/schema-and-tiers.md
Provider sources and price keysYou need official pricing URLs, per-token conversion, or provider-specific usage keysreferences/provider-sources-and-price-keys.md
Match patternsYou are editing matchPattern regexes or provider coveragereferences/match-patterns.md
Workflow and validationYou are applying the end-to-end edit process or checking common mistakesreferences/workflow-and-validation.md
Automated audit modeYou are running a scheduled/default-price audit and need CI-safe edit rulesreferences/automated-audit.md

Deterministic Helpers

  • Pricing file validator: node .agents/skills/add-model-price/scripts/validate-pricing-file.mjs
  • Match-pattern tester: node .agents/skills/add-model-price/scripts/test-match-pattern.mjs --model <modelName> --accept <sample...> --reject <sample...>
  • Direct regex tester: node .agents/skills/add-model-price/scripts/test-match-pattern.mjs --pattern '(?i)^(openai/)?(gpt-4o)$' --accept gpt-4o openai/gpt-4o --reject gpt-4o-mini

Plus de skills de langfuse

agent-setup-maintenance
langfuse
Utilisez cette compétence lors de la modification de la configuration partagée de l'agent pour le dépôt.
official
backend-dev-guidelines
langfuse
Guide backend partagé pour le monorepo Next.js, tRPC, BullMQ et TypeScript de Langfuse. À utiliser lors de la création ou de la révision de routeurs tRPC, d'endpoints REST publics, de BullMQ…
official
changelog-writing
langfuse
Utilisez cette compétence lorsqu’une branche de fonctionnalité terminée nécessite une entrée de changelog.
official
clickhouse-best-practices
langfuse
À UTILISER impérativement lors de l'examen des schémas, requêtes ou configurations ClickHouse. Contient 28 règles qui DOIVENT être vérifiées avant de fournir des recommandations. Toujours lire…
official
code-review
langfuse
Utilisez cette compétence lorsque la tâche consiste à examiner des modifications de code plutôt qu'à implémenter une fonctionnalité.
official
frontend-browser-review
langfuse
Utilisez cette compétence lorsqu’un changement affecte ce que les utilisateurs voient ou font dans le navigateur.
official
skill-developer
langfuse
Créer et gérer des compétences Claude Code en suivant les meilleures pratiques d'Anthropic. Utiliser lors de la création de nouvelles compétences, de la modification de skill-rules.json, de la compréhension des déclencheurs…
official
turborepo
langfuse
Système de construction pour monorepos JavaScript/TypeScript. Turborepo met en cache les sorties des tâches et exécute les tâches en parallèle en fonction du graphe de dépendances.
official