Skip to content

[pull] main from gi-dellav:main#84

Merged
pull[bot] merged 4 commits into
lenylvt:mainfrom
gi-dellav:main
Jun 30, 2026
Merged

[pull] main from gi-dellav:main#84
pull[bot] merged 4 commits into
lenylvt:mainfrom
gi-dellav:main

Conversation

@pull

@pull pull Bot commented Jun 30, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Note

Add OpenRouter per-model pricing fetch to populate session token costs

  • Adds provider::fetch_openrouter_pricing, which calls GET https://openrouter.ai/api/v1/models and returns a map of model ID to (input_price, output_price) scaled by 1,000,000.
  • On startup and when switching models via /model, the app now attempts to populate session.input_token_cost and session.output_token_cost from cache or by fetching live pricing when the provider is OpenRouter.
  • Adds input_price and output_price optional fields to ModelEntry in both provider.rs and models_catalog.rs, and a lookup_pricing_from_cache helper in providers.rs for cache-first pricing lookups.
  • Risk: startup now makes a network request to OpenRouter when the provider is active and token costs are unset.

Macroscope summarized 0743fa9.

wowi42 and others added 4 commits June 29, 2026 22:22
Add fetch_openrouter_pricing() to query OpenRouter's /api/v1/models
endpoint at startup and on model switch. Extend ModelEntry with
input_price/output_price fields. Add cached pricing lookup to avoid
re-fetching. Bump version to 1.5.1-rc2.
fix(sandbox): must bind CACHE HOME after /
feat: fetch OpenRouter pricing for accurate cost tracking
@pull pull Bot locked and limited conversation to collaborators Jun 30, 2026
@pull pull Bot added the ⤵️ pull label Jun 30, 2026
@pull pull Bot merged commit 0743fa9 into lenylvt:main Jun 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants