mirror of
https://github.com/Routstr/routstrd.git
synced 2026-10-05 20:38:22 +00:00
The generated models.json previously left reasoning/thinkingLevelMap to hand curation, so a fresh install advertised no thinking levels at all and a stale hand-written map could disagree with what the model accepts. routstr-core now publishes a per-model `reasoning` object (OpenRouter shape) with `supported_efforts`. Derive pi's thinking fields from it: - write every pi level explicitly, because pi reads an omitted level as "provider default" for levels through `high` and as "unsupported" for `xhigh`/`max` — a partial map would advertise levels the model rejects - map pi's `off` to the provider's `none`, and never offer `off` on models that report `mandatory: true` - return null when the daemon publishes no allowlist (models that only report `mandatory`, or no reasoning at all), and keep the user's hand-curated values in that case Extract buildPiModelEntry so the projection is testable, and cover the derivation plus the preserve/overwrite behaviour in tests.