Token cost shows "—" for custom provider models

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva

Direzione di ricerca

The issue does not identify implementation files or tests. Start by locating how the Session information panel calculates token costs for built-in providers and how custom provider models are discovered. Define how administrators can supply model prices and how cost thresholds should work, then verify that custom-provider costs and limits are visible and behave as expected.

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

Descrizione

Summary

For models served through a custom provider, the Token Usage section of the Session information panel shows Cost as "—". Cost is only calculated for built-in providers, from Posit Assistant's own price list. There is no setting to supply prices for a custom provider's models.

Scenario

  • Posit Workbench 2026.09.0, Posit Assistant 1.10.0 (RStudio and Positron). Same behavior in 1.14.0.
  • Admin-enforced providers.custom.<name> entry with "type": "openai-compatible", pointing at an internal LiteLLM gateway, "discovery": "auto"
  • Token counts show correctly. Cost shows "—" for every model, including Claude and GPT models that are priced when used through a built-in provider.

Why the current behavior hurts

Organizations that route Assistant through an internal gateway are often the most cost-conscious ones. They issue keys per team and track spend internally. Their users can see token counts but not what they cost, so they can't judge the effect of model choice or long conversations.

Requested by the administrator

Their business teams asked for cost visibility and cost thresholds when using their own AI provider and API keys: "custom endpoints currently does not provide mechanisms to limit usage or associated costs, meaning consumption is effectively unrestricted."

Lingua principale
Nessun dato sulla lingua
Stelle
5
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 posit-dev/assistant-feedback

Tutte le issue di posit-dev/assistant-feedback

Issue simili

Altre issue su Backend & API Design

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.