feat(models): rolePins on GET /api/models — the background roles' resolved pins

Settings interlude (owner request, 2026-09-19): the route now also returns
rolePins: Record<BackgroundModelRole, {model: {provider, id},
thinkingLevel}> — the six background roles' RESOLVED models (the user's
agent-models override falling back to the config.ts MODELS pin), so the
settings UI shows each role row's 'Default: <actual pinned model>' instead
of a generic config caption. Same resolution the agent factories use
(effectiveSettings), so the caption can never drift from what runs.

Pure projection (rolePinsFor) + the fs wrapper (catalogRolePins); pins
tested against config defaults and model/thinkingLevel-only overrides.
BACKGROUND_MODEL_PINS exported from stores.ts for the test (was local).
This commit is contained in:
amosblomqvist
2026-09-19 22:28:25 +03:00
parent c32915b232
commit cc1e3193f4
4 changed files with 82 additions and 3 deletions
+1
View File
@@ -35,6 +35,7 @@ const BACKGROUND_MODEL_PINS: ModelRoleSpecs = {
auditor: MODELS.auditor,
labeler: MODELS.labeler,
};
export { BACKGROUND_MODEL_PINS };
/**
* The resolved view of the settings record (core/settings-resolution.ts):