add-model-price

Use ao editar worker/src/constants/default-model-prices.json, packages/shared/src/server/llm/types.ts, níveis de preço, IDs de tokenizador ou regexes de 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
  • Auditing official provider docs for newly released major models that should receive default pricing and, when appropriate, selectable-model coverage

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.
  • Map every supported semantic usage bucket to the provider aliases Langfuse may persist.
  • 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
Provider usage-key matrixYou are adding or changing OpenAI, Gemini, Anthropic, or Bedrock usage keysreferences/provider-usage-key-matrix.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
Audit memoryYou need optional per-model context retained from a useful prior automated auditreferences/model-audit-memory.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

Mais skills de langfuse

clickhouse-best-practices
langfuse
DEVE SER USADO ao revisar esquemas, consultas ou configurações do ClickHouse. Contém 28 regras que DEVEM ser verificadas antes de fornecer recomendações. Sempre leia…
official
skill-creator
langfuse
Guia para criar skills eficazes. Esta skill deve ser usada quando os usuários quiserem criar uma nova skill (ou atualizar uma skill existente) que estenda as capacidades do Claude…
official
vercel-react-best-practices
langfuse
Diretrizes de otimização de desempenho para React e Next.js da Vercel Engineering. Esta habilidade deve ser usada ao escrever, revisar ou refatorar React/Next.js…
official
add-model-price
langfuse
Use when editing worker/src/constants/default-model-prices.json, packages/shared/src/server/llm/types.ts, pricing tiers, tokenizer IDs, or matchPattern regexes…
official
analyze-cloud-costs
langfuse
Analise a estrutura de custos da infraestrutura Langfuse Cloud usando os cost marts do Metabase. Use quando perguntarem sobre gastos com nuvem, divisão de custos entre AWS e ClickHouse, custos...
official
backend-dev-guidelines
langfuse
Build or review Langfuse backend code. Use for tRPC routers, public REST APIs, BullMQ processors, services, middleware, Prisma or ClickHouse access,…
official
clickhouse-best-practices
langfuse
MUST USE when reviewing ClickHouse schemas, queries, or configurations. Contains 28 rules that MUST be checked before providing recommendations. Always read…
official
code-review
langfuse
Review Langfuse code changes for correctness, regressions, and best practices.
official