Routstr Provider Index

Historical implementation notes for the Routstr index and command surface. The /ai provider selection and first-class /routstr command described below are not part of the current public command registry. Routstr is not yet an installable model-source plugin; the current AI runtime is OpenCode with a core model source and optional model-source apps.

Goal

Routstr is not a single provider endpoint. It is a marketplace of providers announced through Nostr. AppWeaver should discover Routstr providers, index their model catalogs and prices, and let the user choose a model and provider based on price and other provider metadata.

The first implementation phase builds the persisted model/provider index. Later phases should make model and provider selection usable from the web UI and route requests through the selected provider.

Protocol Inputs

Provider discovery follows Routstr RIP-02:

Discovery currently uses these hard-coded relays:

Routing and ranking should eventually follow RIP-06. The first phase does not implement scoring; it only creates the data index needed for scoring and selection.

Implemented So Far

Routstr Command Surface

Status Widget

/routstr status now shows:

In the web UI it also provides:

The composer provider menu now shows a Routstr status shortcut only when the current provider is routstr.

Deposits And Refunds

Persisted Provider/Model Index

The old model cache was a single JSON blob fetched from https://api.routstr.com/v1/models. The first-phase index replaces the command read path with normalized SQLite tables:

/routstr sync-models now:

/routstr models now:

/routstr models <exact-model-id> now:

The historical index stored models for inspection. Adding them directly to OpenCode configuration has been retired; model-source apps own their runtime catalogs.

Current Limitations

Next Work

Sync Progress

Add progress feedback for /routstr sync-models.

Possible approaches:

The user should see at least:

Web Model Selector

Build a web model picker similar to web/src/components/OpenCodeModelField.tsx.

It should:

Provider Price Selector

After selecting a model, populate a provider selector for that model.

It should show:

Model Metadata Policy

Investigate provider-specific model descriptions and decide how to display them.

Possible policies:

Tor Endpoint Handling

Investigate Tor/onion provider URLs.

The current normal fetch path cannot reach onion endpoints. Options include:

Routing And Selection

After the index is usable from the UI, implement actual provider selection for runs:

RIP-06 Ranking

Future ranking should support: