Rate card: no place for a stated optional rate (OpenAI 12-hour cache write)

Aperta
#744 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Start in packages/rate-card/src/card.ts: the RateCard type has only inputs, tables, price, examples and source, so decide how an opt-in rate is represented before editing. Then find the POST /v1/estimate handler that serves the GPT-6.2 cards from #739 and make it read the new field for gpt-6.2-astra/gpt-6.2-sol when a 12-hour cache write is selected. Done means the estimate returns the 12-hour price or explicitly says the estimate excludes it; add a test around that endpoint.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The GPT-6.2 cards (#739) do not model OpenAI's optional 12-hour cache write. A consumer who opts into ttl: "12h" pays 2x the cache-write rate ($20 vs $10 per 1M on gpt-6.2-astra, $5 vs $2.5 on gpt-6.2-sol), and nothing on the card says so. RateCard (packages/rate-card/src/card.ts) has only inputs, tables, price, examples and source.

Ask

Give a card a way to state an opt-in rate the provider publishes, as an input that selects it or as a labelled caveat, and read it from the page.

Acceptance

  • POST /v1/estimate for gpt-6.2-astra with a 12-hour cache write returns the 12-hour price, or the response says the estimate excludes it.
Lingua principale
TypeScript
Stelle
0
Fork
1
Merge medio
5h 40m
PR unite (30g)
193

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/schemas

Tutte le issue di TanStack/schemas

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.