add-model-price
作者: langfuse
在編輯 worker/src/constants/default-model-prices.json、packages/shared/src/server/llm/types.ts、定價層級、tokenizer ID 或 matchPattern 正則表達式時使用…
npx skills add https://github.com/langfuse/langfuse --skill add-model-priceAdd 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.mdas 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
matchPatternthat 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.tsif 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
updatedAtto today's ISO-8601 timestamp. - Validate the JSON after editing.
Reference Map
| Topic | Read this when | File |
|---|---|---|
| Schema and tier rules | You need the entry shape or pricing-tier invariants | references/schema-and-tiers.md |
| Provider sources and price keys | You need official pricing URLs, per-token conversion, or provider-specific usage keys | references/provider-sources-and-price-keys.md |
| Match patterns | You are editing matchPattern regexes or provider coverage | references/match-patterns.md |
| Workflow and validation | You are applying the end-to-end edit process or checking common mistakes | references/workflow-and-validation.md |
| Automated audit mode | You are running a scheduled/default-price audit and need CI-safe edit rules | references/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
來自 langfuse 的更多技能
agent-setup-maintenance
langfuse
當需要變更儲存庫的共享代理設定時,使用此技能。
official
backend-dev-guidelines
langfuse
Langfuse 的 Next.js、tRPC、BullMQ 與 TypeScript 單一儲存庫的共用後端指南。適用於建立或審查 tRPC 路由器、公開 REST 端點、BullMQ…
official
changelog-writing
langfuse
當一個功能分支完成且需要撰寫變更日誌條目時,請使用此技能。
official
clickhouse-best-practices
langfuse
在審查 ClickHouse 的 schema、查詢或配置時必須使用。包含 28 條規則,在提供建議前必須檢查。務必閱讀…
official
code-review
langfuse
當任務是審查程式碼變更而非實作功能時,使用此技能。
official
frontend-browser-review
langfuse
當變更影響使用者在瀏覽器中看到或進行的操作時,使用此技能。
official
skill-developer
langfuse
遵循Anthropic最佳實踐來建立和管理Claude Code技能。在建立新技能、修改skill-rules.json、理解觸發器時使用…
official
turborepo
langfuse
JavaScript/TypeScript 單一程式碼庫的建置系統。Turborepo 會快取任務輸出,並根據依賴圖平行執行任務。
official