askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
ai_prices.json · 3.0 KB · 89 lines
| 1 | { |
| 2 | "name": "ai_prices", |
| 3 | "title": "AI Model Prices", |
| 4 | "version": 2, |
| 5 | "description": "Per-model provider pricing for AI chat cost recording. Editable live like any other record -- object_ai never hardcodes a price table, so a stale entry here is a data-entry fix, not a code change.", |
| 6 | "fields": [ |
| 7 | { |
| 8 | "name": "id" |
| 9 | }, |
| 10 | { |
| 11 | "name": "provider", |
| 12 | "type": "text", |
| 13 | "required": true, |
| 14 | "label": "Provider", |
| 15 | "help": "anthropic, openai, ..." |
| 16 | }, |
| 17 | { |
| 18 | "name": "model", |
| 19 | "type": "text", |
| 20 | "required": true, |
| 21 | "label": "Model" |
| 22 | }, |
| 23 | { |
| 24 | "name": "input_per_million_cents", |
| 25 | "type": "int", |
| 26 | "required": true, |
| 27 | "label": "Input cents / 1M tokens", |
| 28 | "help": "Integer cents only -- never a float for money" |
| 29 | }, |
| 30 | { |
| 31 | "name": "output_per_million_cents", |
| 32 | "type": "int", |
| 33 | "required": true, |
| 34 | "label": "Output cents / 1M tokens", |
| 35 | "help": "Integer cents only -- never a float for money" |
| 36 | }, |
| 37 | { |
| 38 | "name": "cache_read_per_million_cents", |
| 39 | "type": "int", |
| 40 | "label": "Cache read cents / 1M tokens", |
| 41 | "help": "Integer cents. Blank means unknown, not free: a turn that read prompt cache is then recorded with a null cost. Seeded values that are not published prices are derived from the published multiplier (0.05x input) and rounded UP, so a cost is never under-reported; edit the row when the provider publishes a rate" |
| 42 | }, |
| 43 | { |
| 44 | "name": "cache_write_per_million_cents", |
| 45 | "type": "int", |
| 46 | "label": "Cache write cents / 1M tokens", |
| 47 | "help": "Integer cents. Blank means unknown, not free: a turn that wrote prompt cache is then recorded with a null cost. Seeded values are derived from the published 5-minute cache-write multiplier (1.25x input) and rounded UP, so a cost is never under-reported; edit the row when the provider publishes a rate" |
| 48 | }, |
| 49 | { |
| 50 | "name": "price_max_prompt_tokens", |
| 51 | "type": "int", |
| 52 | "label": "Priced up to (prompt tokens)", |
| 53 | "help": "For a model whose rates go up above a prompt size: the largest single request these rates cover. A turn with a bigger request is recorded with a null cost rather than priced at these rates. Blank means no limit" |
| 54 | }, |
| 55 | { |
| 56 | "name": "effective_date", |
| 57 | "type": "date", |
| 58 | "required": true, |
| 59 | "label": "Effective Date", |
| 60 | "help": "When this price took effect; lookups use the most recent row for a (provider, model) pair" |
| 61 | } |
| 62 | ], |
| 63 | "forms": { |
| 64 | "default": { |
| 65 | "fields": [ |
| 66 | "provider", |
| 67 | "model", |
| 68 | "input_per_million_cents", |
| 69 | "output_per_million_cents", |
| 70 | "cache_read_per_million_cents", |
| 71 | "cache_write_per_million_cents", |
| 72 | "price_max_prompt_tokens", |
| 73 | "effective_date" |
| 74 | ] |
| 75 | } |
| 76 | }, |
| 77 | "views": { |
| 78 | "list_mode": "table", |
| 79 | "list_fields": [ |
| 80 | "provider", |
| 81 | "model", |
| 82 | "input_per_million_cents", |
| 83 | "output_per_million_cents", |
| 84 | "cache_read_per_million_cents", |
| 85 | "cache_write_per_million_cents", |
| 86 | "effective_date" |
| 87 | ] |
| 88 | } |
| 89 | } |