Skip to content

Add routerai-managed-profile - #1066

Open
vladimirovichivan wants to merge 4 commits into
get-bb:mainfrom
vladimirovichivan:add-routerai-managed-profile
Open

vladimirovichivan wants to merge 4 commits into
get-bb:mainfrom
vladimirovichivan:add-routerai-managed-profile

Conversation

@vladimirovichivan

Copy link
Copy Markdown

Adds routerai-managed-profile, a second OpenCode profile for RouterAI inside bb.

What it does

  • Caches the RouterAI model catalog and stops there: no network call on page open, filter, sort, toggle or reasoning change. Only an explicit refresh (button, CLI or optional daily background job) fetches models.
  • Sidebar page with a catalog filter, model toggles, a reasoning-level slider under every enabled model, ruble prices per 1M tokens, and the byte size of the generated config.
  • Builds an inline OpenCode config and hands it to opencode acp through bb's ACP bridge, so the picker and the thread see the same models and the user's ~/.config/opencode/opencode.json is never read or written.
  • Coexists with the official routerai plugin (different provider id, command and storage keys).

Costs and requirements

Needs a RouterAI account and API key from routerai.ru, and OpenCode on the host that runs threads. RouterAI bills the balance for tokens. No telemetry, no subscription.

Validation

  • node --test tests 48/48, npx tsc --noEmit clean, bb plugin build ok, also from a clean clone of the v0.0.2 tag.
  • npm run build in this repository validates the entry, the overview and the screenshot.
  • Provider registered in bb with the selected models; a thread on a routerai-managed model responds.

Screenshot

panel.png is the plugin page with enabled models, reasoning sliders and prices. Only catalog data is visible; there are no keys, emails or local paths. The capture is upscaled from a narrow panel to meet the 1200 px minimum width.

Live plugin: https://github.com/vladimirovichivan/bb-routerai-models

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant