Estimate missing index costs#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5af889d2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if tokens is None or output_price is None or tokens <= 0 or output_price <= 0: | ||
| return None |
There was a problem hiding this comment.
Preserve zero-priced cost estimates
When a model has a real zero output price and no published AA index cost, this branch treats the fallback estimate as unavailable because output_price <= 0; the checked-in CSV has such non-deprecated rows like muse-spark with price_1m_output_tokens=0. That makes --max-cost filters drop free/zero-priced models and shows idx-run$ as missing, even though the documented fallback formula idx-tok * out$/1m yields $0. Allow zero output prices while still rejecting missing or negative values.
Useful? React with 👍 / 👎.
This adds an effective index cost that prefers published idx-run$ and falls back to idx-tok multiplied by output token price when published cost is missing. The fallback is exposed in tables, JSON, filters, cost sorting, and Pareto plots.