@oh-my-pi/pi-catalog 17.2.13 → 17.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [17.2.15] - 2026-08-12
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed classification of model IDs with large minor versions (e.g., `claude-opus-5-11`) or three-part versions, ensuring they no longer fall back to stale default configurations.
|
|
10
|
+
|
|
5
11
|
## [17.2.13] - 2026-08-11
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-catalog",
|
|
4
|
-
"version": "17.2.
|
|
4
|
+
"version": "17.2.15",
|
|
5
5
|
"description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@bufbuild/protobuf": "^2.12.1",
|
|
38
|
-
"@oh-my-pi/omptype": "17.2.
|
|
39
|
-
"@oh-my-pi/pi-utils": "17.2.
|
|
38
|
+
"@oh-my-pi/omptype": "17.2.15",
|
|
39
|
+
"@oh-my-pi/pi-utils": "17.2.15"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@oh-my-pi/pi-ai": "17.2.
|
|
42
|
+
"@oh-my-pi/pi-ai": "17.2.15",
|
|
43
43
|
"@types/bun": "^1.3.14"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
package/src/identity/classify.ts
CHANGED
|
@@ -181,7 +181,9 @@ function createSemVer(major: number, minor: number, patch = 0): SemVer {
|
|
|
181
181
|
return { major, minor, patch };
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
//
|
|
184
|
+
// Fast path for the common 1–2 component versions; anything the table misses
|
|
185
|
+
// (large minors, 3-part versions) parses dynamically below so no future
|
|
186
|
+
// version ever classifies as unknown (the failure class #8256 fixed).
|
|
185
187
|
const precomputeTable: Record<string, SemVer> = {};
|
|
186
188
|
for (let major = 0; major <= 9; major++) {
|
|
187
189
|
for (let minor = 0; minor <= 10; minor++) {
|
|
@@ -192,8 +194,14 @@ for (let major = 0; major <= 9; major++) {
|
|
|
192
194
|
precomputeTable[`${major}`] = createSemVer(major, 0, 0);
|
|
193
195
|
}
|
|
194
196
|
|
|
197
|
+
const SEMVER_PATTERN = /^(\d{1,2})(?:[.-](\d{1,2}))?(?:[.-](\d{1,2}))?$/;
|
|
198
|
+
|
|
195
199
|
export function parseSemVer(version: string): SemVer | null {
|
|
196
|
-
|
|
200
|
+
const hit = precomputeTable[version];
|
|
201
|
+
if (hit) return hit;
|
|
202
|
+
const match = SEMVER_PATTERN.exec(version);
|
|
203
|
+
if (!match) return null;
|
|
204
|
+
return createSemVer(Number(match[1]), Number(match[2] ?? 0), Number(match[3] ?? 0));
|
|
197
205
|
}
|
|
198
206
|
|
|
199
207
|
export function semverGte(left: SemVer | string, right: SemVer | string): boolean {
|
|
@@ -67,9 +67,11 @@ export function createReferenceResolver<TApi extends Api>(
|
|
|
67
67
|
? () => (lazyProviderReferences ??= providerReferenceSource())
|
|
68
68
|
: () => providerReferenceSource;
|
|
69
69
|
return (modelId: string) => {
|
|
70
|
-
const
|
|
70
|
+
const providerRefs = getProviderReferences();
|
|
71
|
+
const globalRefs = getGlobalReferences();
|
|
72
|
+
const providerRef = providerRefs.get(modelId);
|
|
71
73
|
if (providerRef) return providerRef;
|
|
72
|
-
const globalRef =
|
|
74
|
+
const globalRef = globalRefs.get(modelId);
|
|
73
75
|
return globalRef ? toModelSpec(globalRef as Model<TApi>) : undefined;
|
|
74
76
|
};
|
|
75
77
|
}
|