Token cost shows "—" for custom provider models

Đang mở
#159 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
backend-api-design

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
5
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của posit-dev/assistant-feedback

Tất cả issue của posit-dev/assistant-feedback

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.