@oh-my-pi/pi-catalog 17.4.2 → 18.0.0

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
+ ## [18.0.0] - 2026-08-22
6
+
7
+ ### Added
8
+
9
+ - Added model capability metadata for reversible private-use glyph tokenization on Claude-compatible models, so provider request handling can apply the compatibility layer without inferring from transport details.
10
+
5
11
  ## [17.4.2] - 2026-08-21
6
12
 
7
13
  ### Added
@@ -212,7 +212,7 @@ export declare const supportsMidConversationSystemMessages: (modelId: string) =>
212
212
  * Models that reliably follow the hashline line-anchored edit dialect
213
213
  * (`[path#TAG]` headers plus 1-indexed anchors). Kimi, MiMo, DeepSeek V4
214
214
  * Flash, and Step 3.7 Flash miscount anchors or drop the tag header often
215
- * enough that hosts fall back to a literal search-replace edit format for
215
+ * enough that hosts fall back to the sloppy edit format for
216
216
  * them.
217
217
  */
218
218
  export declare const supportsHashlineEdits: (modelId: string) => boolean;
@@ -727,6 +727,12 @@ export interface ModelCost extends TokenCost {
727
727
  export type ModelTokenizer = "claude-v3" | "claude-v47" | "claude-v5" | "claude-v5-sonnet" | "qwen3" | "deepseek-v3" | "kimi-k2" | "glm5";
728
728
  export interface Model<TApi extends Api = Api> {
729
729
  id: string;
730
+ /**
731
+ * Whether provider-bound private-use glyphs require reversible ASCII tokenization.
732
+ * Materialized by `buildModel`; request handlers read this capability instead of
733
+ * inferring it from the transport API.
734
+ */
735
+ requiresGlyphTokenization?: boolean;
730
736
  /**
731
737
  * Model id to send on the wire when it differs from `id`. Used by catalog
732
738
  * variants that present one upstream model under several local entries —
@@ -852,7 +858,7 @@ export interface Model<TApi extends Api = Api> {
852
858
  * vocabulary of `buildModel`. Identical to `Model` except `compat` carries the
853
859
  * sparse override shape and nothing is resolved yet.
854
860
  */
855
- export interface ModelSpec<TApi extends Api = Api> extends Omit<Model<TApi>, "compat" | "compatConfig" | "supportsComputerUseConfig"> {
861
+ export interface ModelSpec<TApi extends Api = Api> extends Omit<Model<TApi>, "compat" | "compatConfig" | "requiresGlyphTokenization" | "supportsComputerUseConfig"> {
856
862
  /** Sparse compatibility overrides; resolved into `Model.compat` by `buildModel`. */
857
863
  compat?: CompatConfigOf<TApi>;
858
864
  }
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.4.2",
4
+ "version": "18.0.0",
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": "Stencil Labs, Inc.",
@@ -34,11 +34,11 @@
34
34
  "gen:proto": "bun scripts/generate-protocols.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@oh-my-pi/omptype": "17.4.2",
38
- "@oh-my-pi/pi-utils": "17.4.2"
37
+ "@oh-my-pi/omptype": "18.0.0",
38
+ "@oh-my-pi/pi-utils": "18.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@oh-my-pi/pi-ai": "17.4.2",
41
+ "@oh-my-pi/pi-ai": "18.0.0",
42
42
  "@types/bun": "^1.3.14"
43
43
  },
44
44
  "engines": {
package/src/build.ts CHANGED
@@ -15,6 +15,7 @@ import { buildBedrockCompat } from "./compat/bedrock";
15
15
  import { buildDevinCompat } from "./compat/devin";
16
16
  import { buildOpenAICompat, buildOpenAIResponsesCompat, buildOpenRouterCompat } from "./compat/openai";
17
17
  import { bareModelId, parseOpenAIModel, semverGte } from "./identity/classify";
18
+ import { isClaudeModelId } from "./identity/family";
18
19
  import { resolveModelThinking } from "./model-thinking";
19
20
  import { resolveModelTokenizer } from "./model-tokenizer";
20
21
  import type { Api, CompatOf, Model, ModelSpec } from "./types";
@@ -70,6 +71,7 @@ export function buildModel<TApi extends Api>(spec: ModelSpec<TApi>): Model<TApi>
70
71
  return {
71
72
  ...spec,
72
73
  name: cleanModelName(spec.name),
74
+ requiresGlyphTokenization: isClaudeModelId(spec.id),
73
75
  tokenizer: spec.tokenizer ?? resolveModelTokenizer(spec.requestModelId ?? spec.id),
74
76
  thinking: resolveModelThinking(spec, compat),
75
77
  supportsComputerUse: supportsOpenAIGAComputerUse(spec, supportsComputerUseConfig),
@@ -418,7 +418,7 @@ export const supportsMidConversationSystemMessages = memo((modelId: string): boo
418
418
  * Models that reliably follow the hashline line-anchored edit dialect
419
419
  * (`[path#TAG]` headers plus 1-indexed anchors). Kimi, MiMo, DeepSeek V4
420
420
  * Flash, and Step 3.7 Flash miscount anchors or drop the tag header often
421
- * enough that hosts fall back to a literal search-replace edit format for
421
+ * enough that hosts fall back to the sloppy edit format for
422
422
  * them.
423
423
  */
424
424
  export const supportsHashlineEdits = memo((modelId: string): boolean => {