mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 08:24:46 +00:00
* fix(agents): preserve Claude thinking selections Model switches now resolve thinking against the target model's saved preference instead of resetting to the catalog default. Claude owns its configured-model defaults and legacy Fable alias handling, while persisted permission modes remain unchanged. * chore(claude): tag Fable compatibility shim * fix(app): resolve persisted model aliases * fix(models): preserve aliases for older clients * fix(models): hide compatibility aliases from listings * fix(settings): hide compatibility model aliases * test(claude): cover legacy catalog entry * test(app): expect mock thinking controls in schedules * fix(app): preserve queued thinking preferences * fix(app): reconcile schedule provider snapshots * fix(app): preserve schedule model selections * fix(claude): preserve exact configured model ids * fix(app): preserve committed thinking preferences * fix(app): preserve aliased schedule thinking
22 lines
698 B
TypeScript
22 lines
698 B
TypeScript
import type { AgentModelDefinition } from "@getpaseo/protocol/agent-types";
|
|
|
|
export function findModelByReference(
|
|
models: AgentModelDefinition[] | null,
|
|
modelId: string,
|
|
): AgentModelDefinition | null {
|
|
if (!models || models.length === 0) return null;
|
|
const normalizedModelId = modelId.trim();
|
|
if (!normalizedModelId) return null;
|
|
return (
|
|
models.find((model) => model.id === normalizedModelId) ??
|
|
models.find((model) => model.aliases?.includes(normalizedModelId)) ??
|
|
null
|
|
);
|
|
}
|
|
|
|
export function filterSelectableModels(
|
|
models: AgentModelDefinition[] | null,
|
|
): AgentModelDefinition[] | null {
|
|
return models?.filter((model) => model.isSelectable !== false) ?? null;
|
|
}
|