Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

Merge remote-tracking branch 'origin/main' into fix/pr-1047-landing

vastsacb57ebd5bf42
diff --cc packages/shared/src/types/models.ts
index b21f1e353,782c19949..035da97c8
--- a/packages/shared/src/types/models.ts
+++ b/packages/shared/src/types/models.ts
@@@ -199,17 -202,31 +199,13 @@@ export function catalogModelIdsMatch(ca
const left = candidate.trim().toLowerCase();
const right = requested.trim().toLowerCase();
if (!left || !right) return false;
-
- const cleanLeft = stripRegion(left);
- const cleanRight = stripRegion(right);
- // Exact id, known vendor prefix, route leaf, then thinking/agent/latest.
- if (normalizedMatch(cleanLeft, cleanRight, true)) return true;
-
- const variantLeft = stripVariantSuffix(cleanLeft);
- const variantRight = stripVariantSuffix(cleanRight);
- if (normalizedMatch(variantLeft, variantRight, true)) return true;
-
- /* Published release stamps are tried last, so a dated snapshot can never
- displace the exact id or a documented alias. A catalog that publishes both
- `foo-v2` and `foo-v2-0731` therefore still answers `foo-v2-0731` with its
- own record: the caller's exact-first ranking decides between them. */
- return normalizedMatch(
- stripReleaseSuffix(variantLeft),
- stripReleaseSuffix(variantRight),
- true,
- );
+ return pathLeaf(left) === pathLeaf(right);
}
- /**
- * Where a saved context window came from.
- *
- * `catalog` is a metadata snapshot: the value follows the published models.dev
- * record, so a later catalog correction still reaches an already saved binding.
- * `user` is the user's own number and is never overwritten by the catalog.
- */
- export type ContextWindowSource = "catalog" | "user";
+ /** Where a saved model limit came from; user-authored values are never replaced. */
+ export type ModelLimitSource = "catalog" | "user";
+ /** @deprecated Use ModelLimitSource; kept for existing context-window callers. */
+ export type ContextWindowSource = ModelLimitSource;
/** Provider-local model settings persisted with the provider configuration. */
export type ModelBinding = {