Token cost shows "—" for custom provider models

オープン
#159 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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."

主要言語
言語のデータがありません
スター
5
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/assistant-feedback のほかの issue

posit-dev/assistant-feedback の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。