galaxyproject / galaxyproject/loom

Model-picker price tags come from pi-ai's bundled registry and go stale (DeepSeek raised prices)

Open
#433 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
14
Forks
12
Avg merge
6d 5h
Merged PRs (30d)
17

Description

## Ask

> "DeepSeek recently increased API token prices. Updating them in the GUI could
> help the user better decide which models to use."

The model picker puts a price tag in every label, so a user reasonably reads it
as current. Right now it can silently drift.

## Where the numbers come from

We don't own a DeepSeek rate table. `models:list-all`
(`app/src/main/ipc-handlers.ts`) builds each label straight from pi-ai's bundled
registry:

```ts
const priceTag = `$${m.cost.input}/$${m.cost.output}`;
```

At `@earendil-works/pi-ai` 0.84.2 (what `^0.84.1` on main resolves to today),
`dist/providers/data/deepseek.json` has:

| model | input | output | cacheRead |
|---|---|---|---|
| `deepseek-v4-flash` | $0.14 | $0.28 | $0.0028 |
| `deepseek-v4-pro` | $0.435 | $0.87 | $0.003625 |

Those are byte-identical to what 0.78.1 shipped, so **a pi bump does not fix
this** -- the recent dependency sweep already carried us from 0.78 to 0.84 and
the DeepSeek rates never moved.

The renderer's hardcoded `PRICING` map in `app/src/renderer/app.ts` is a startup
fallback only, and it has no DeepSeek entries at all, so what the tester saw is
pi's registry verbatim. The `/cost` footer likewise prefers pi's own
`calculateCost` over our map.

## So the fix is upstream

If DeepSeek's published rates differ from the table above, the correction belongs
in pi-ai's generated registry, not here. A local override table would immediately
start drifting against the registry the footer already trusts, and would have to
be re-reconciled on every pi bump.

## The general problem

Either way this recurs: the price tag is only as fresh as whatever pi-ai version
we shipped, nothing revalidates it, and nothing tells the user how old it is.
Worth deciding whether the picker should say where the number came from (or drop
the tag when we can't vouch for it) rather than presenting a possibly-stale rate
as fact. #273 is a related accuracy bug on the spend side.

## First step

Check DeepSeek's current published rates against the table above -- those figures
are what we ship today, not a claim about what DeepSeek charges now. If they've
moved, file it upstream against pi-ai and bump once it lands.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by checking DeepSeek's current published rates against the table in the issue and inspect dist/providers/data/deepseek.json from the bundled pi-ai registry. Read app/src/main/ipc-handlers.ts and app/src/renderer/app.ts to trace how picker labels and cost calculations obtain prices. Done means either an upstream correction is filed and adopted, or the project has decided and implemented how stale or unverifiable rates should be presented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.