Files
routstrd/tests/integrations
redshift 154c690bdf feat(integrations): derive pi thinking levels from the daemon's reasoning metadata
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.
2026-09-17 18:45:23 +02:00
..