Token cost shows "—" for custom provider models

Open
#159 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
No language data
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/assistant-feedback

All issues in posit-dev/assistant-feedback

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.