🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat(costs): add gemini input_text price (#12375)
Jannik Maierhöferf3b4d22ee11f
diff --git a/.claude/skills/add-model-price/SKILL.md b/.claude/skills/add-model-price/SKILL.mdindex ce1b334055..2c3aa5b6b9 100644--- a/.claude/skills/add-model-price/SKILL.md+++ b/.claude/skills/add-model-price/SKILL.md@@ -23,6 +23,8 @@ Automatically activates when:## Quick Start Checklist+### Adding a New Model+- [ ] **Gather model info**: Fetch official pricing from provider documentation URL- [ ] **Generate UUID**: Run `uuidgen` for the model entry ID (use lowercase)- [ ] **Create matchPattern**: Regex covering all provider formats@@ -31,6 +33,12 @@ Automatically activates when:- [ ] **Add to LLM types**: Add model to `/packages/shared/src/server/llm/types.ts` (for playground/LLM-as-judge)- [ ] **Validate JSON**: Run `jq . default-model-prices.json` to verify syntax+### Updating an Existing Model++- [ ] **Modify the entry**: Update prices, add new usage type keys, etc.+- [ ] **Update `updatedAt`**: Set to today's date in ISO-8601 format (e.g., `"2026-03-04T00:00:00.000Z"`)+- [ ] **Validate JSON**: Run `jq . default-model-prices.json` to verify syntax+---## File Location@@ -77,8 +85,8 @@ This JSON file contains an array of model pricing definitions used for cost calc| `id` | string | Unique UUID (use `uuidgen` command, lowercase) || `modelName` | string | Primary model identifier || `matchPattern` | string | Regex for matching model names |-| `createdAt` | string | ISO-8601 timestamp |-| `updatedAt` | string | ISO-8601 timestamp |+| `createdAt` | string | ISO-8601 timestamp (set once on creation) |+| `updatedAt` | string | ISO-8601 timestamp (**must be updated to today's date whenever the entry is modified**) || `pricingTiers` | array | At least one pricing tier |### Optional Fields@@ -465,6 +473,15 @@ The system validates pricing tiers with these rules:"matchPattern": "anthropic\\.claude"```+**Forgetting to update `updatedAt` when modifying an existing entry:**+```json+// Wrong - stale timestamp after modifying prices+"updatedAt": "2025-12-12T15:00:06.513Z"++// Correct - set to today's date+"updatedAt": "2026-03-04T00:00:00.000Z"+```+---## Testing Model Matchingdiff --git a/worker/src/constants/default-model-prices.json b/worker/src/constants/default-model-prices.jsonindex 5980def347..3cc13b05c7 100644--- a/worker/src/constants/default-model-prices.json+++ b/worker/src/constants/default-model-prices.json@@ -2797,7 +2797,7 @@"modelName": "gemini-2.5-flash","matchPattern": "(?i)^(google\/)?(gemini-2.5-flash)$","createdAt": "2025-07-03T13:44:06.964Z",- "updatedAt": "2025-12-12T15:00:06.513Z",+ "updatedAt": "2026-03-04T00:00:00.000Z","pricingTiers": [{"id": "cmcnjkfwn000107l43bf5e8ax_tier_default",@@ -2807,6 +2807,7 @@"conditions": [],"prices": {"input": 3e-7,+ "input_text": 3e-7,"input_modality_1": 3e-7,"prompt_token_count": 3e-7,"promptTokenCount": 3e-7,@@ -2829,7 +2830,7 @@"modelName": "gemini-2.5-flash-lite","matchPattern": "(?i)^(google\/)?(gemini-2.5-flash-lite)$","createdAt": "2025-07-03T13:44:06.964Z",- "updatedAt": "2025-12-12T15:00:06.513Z",+ "updatedAt": "2026-03-04T00:00:00.000Z","pricingTiers": [{"id": "cmcnjkrfa000207l4fpnh5mnv_tier_default",@@ -2839,6 +2840,7 @@"conditions": [],"prices": {"input": 1e-7,+ "input_text": 1e-7,"input_modality_1": 1e-7,"prompt_token_count": 1e-7,"promptTokenCount": 1e-7,@@ -3361,7 +3363,7 @@"modelName": "gemini-2.5-pro","matchPattern": "(?i)^(google\/)?(gemini-2.5-pro)$","createdAt": "2025-11-26T13:27:53.545Z",- "updatedAt": "2025-12-12T15:00:06.513Z",+ "updatedAt": "2026-03-04T00:00:00.000Z","pricingTiers": [{"id": "cmig1hb7i000104l72qrzgc6h_tier_default",@@ -3371,6 +3373,7 @@"conditions": [],"prices": {"input": 1.25e-6,+ "input_text": 1.25e-6,"input_modality_1": 1.25e-6,"prompt_token_count": 1.25e-6,"promptTokenCount": 1.25e-6,@@ -3400,6 +3403,7 @@],"prices": {"input": 2.5e-6,+ "input_text": 2.5e-6,"input_modality_1": 2.5e-6,"prompt_token_count": 2.5e-6,"promptTokenCount": 2.5e-6,