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

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,16 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [17.4.2] - 2026-08-21
6
+
7
+ ### Added
8
+
9
+ - Added identification of provider-side image fetchers (OpenAI, Anthropic, xAI, Google), so a server hosting images by URL can attribute an inbound fetch to the vendor that issued it.
10
+
11
+ ### Fixed
12
+
13
+ - Fixed Cursor model discovery showing separate picker rows for pure effort-suffixed models beyond GPT-5.6 by collapsing each standard and Fast lane into one reasoning-effort model ([#9237](https://github.com/can1357/oh-my-pi/issues/9237)).
14
+
5
15
  ## [17.4.1] - 2026-08-21
6
16
 
7
17
  ### Added
@@ -16,3 +16,4 @@ export * from "./wire/codex.js";
16
16
  export * from "./wire/coreweave.js";
17
17
  export * from "./wire/gemini-headers.js";
18
18
  export * from "./wire/github-copilot.js";
19
+ export * from "./wire/image-fetchers.js";
@@ -2,6 +2,8 @@ export interface ModelCacheProviderIdOptions {
2
2
  apiKey?: string;
3
3
  baseUrl?: string;
4
4
  }
5
+ /** Whether a provider's model-cache namespace requires its resolved credential. */
6
+ export declare function isCredentialScopedModelCacheProvider(providerId: string): boolean;
5
7
  export declare function getDefaultModelDiscoveryBaseUrl(providerId: string): string | undefined;
6
8
  /** Resolve an Ollama model-cache namespace scoped to the normalized discovery endpoint. */
7
9
  export declare function resolveOllamaModelCacheProviderId(providerId: string, baseUrl?: string): string;
@@ -91,10 +91,11 @@ export declare function isVariantCollapsedSpec(spec: VariantSpecLike): boolean;
91
91
  */
92
92
  export declare function collapseEffortVariants<TSpec extends VariantSpecLike>(specs: readonly TSpec[], table: VariantCollapseTable): TSpec[];
93
93
  /**
94
- * Collapse a full mixed-provider list: per provider, the hand table (when
95
- * registered) plus the automatic `X`/`X-thinking` pair rule. Used by the
96
- * catalog generator; the runtime equivalent lives at the model-manager merge
97
- * point. Output is regrouped by provider — callers re-sort.
94
+ * Collapse a full mixed-provider list: per provider, the hand table, Cursor's
95
+ * conservative live effort-sibling rule, and the automatic `X`/`X-thinking`
96
+ * pair rule. Used by the catalog generator; the runtime equivalent lives at
97
+ * the model-manager merge point. Output is regrouped by provider — callers
98
+ * re-sort.
98
99
  */
99
100
  export declare function collapseEffortVariantsAcrossProviders<TSpec extends VariantSpecLike>(specs: readonly TSpec[]): TSpec[];
100
101
  /**
@@ -107,29 +108,30 @@ export declare function collapseEffortVariantsAcrossProviders<TSpec extends Vari
107
108
  export declare function collapseBuiltModelVariants<TApi extends Api>(models: readonly Model<TApi>[]): Model<TApi>[];
108
109
  /**
109
110
  * Resolve a retired effort-tier variant id (collapsed member, recycled id) to
110
- * its replacement model id for `provider` via the hand table. Returns
111
- * `undefined` when the id is not a known alias; derived `X-thinking` members
112
- * resolve through `stripThinkingVariantToken` instead. Callers must try an
113
- * exact model lookup first — a live model always wins over an alias.
111
+ * its replacement model id for `provider` via hand-table or registered live
112
+ * aliases. Returns `undefined` when the id is not a known alias; derived
113
+ * `X-thinking` members also resolve through `stripThinkingVariantToken`.
114
+ * Callers must try an exact model lookup first — a live model always wins over
115
+ * an alias.
114
116
  */
115
117
  export declare function resolveVariantAlias(provider: Provider, modelId: string): string | undefined;
116
118
  /** Bare-id alias hit: replacement id plus the providers declaring it. */
117
119
  export interface BareVariantAliasHit {
118
120
  id: string;
119
- /** Providers whose table declares the alias — candidates from these win ties. */
121
+ /** Providers declaring the alias — candidates from these win ties. */
120
122
  providers: readonly Provider[];
121
123
  }
122
124
  /**
123
- * Provider-agnostic hand-table alias lookup for bare-id selectors. Returns
124
- * the declaring providers so callers can prefer their models when the
125
- * replacement id exists on unrelated providers too (e.g. a retired Cursor
126
- * tier id must not resolve to `openai/gpt-5.4`).
125
+ * Provider-agnostic alias lookup for bare-id selectors. Returns the declaring
126
+ * providers so callers can prefer their models when the replacement id exists
127
+ * on unrelated providers too (e.g. a retired Cursor tier id must not resolve
128
+ * to `openai/gpt-5.4`).
127
129
  */
128
130
  export declare function resolveBareVariantAlias(modelId: string): BareVariantAliasHit | undefined;
129
131
  /**
130
132
  * Reverse alias lookup: the retired ids that resolve to `modelId` for
131
- * `provider` via the hand table. Used to re-key config keyed by raw member
132
- * ids (models.yml `modelOverrides`, suppressed selectors) onto the collapsed
133
- * model. Empty for providers without a table.
133
+ * `provider` via hand-table or registered live aliases. Used to re-key config
134
+ * keyed by raw member ids (models.yml `modelOverrides`, suppressed selectors)
135
+ * onto the collapsed model.
134
136
  */
135
137
  export declare function getVariantAliasSources(provider: Provider, modelId: string): readonly string[];
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Identification of provider-side image fetchers.
3
+ *
4
+ * A request may carry an image either inline (base64) or as a URL. With a URL,
5
+ * the provider's backend performs its own server-side GET against that URL, so
6
+ * a local blob server sees an inbound request from vendor infrastructure rather
7
+ * than from the client. This module names those fetchers, letting a blob server
8
+ * attribute an inbound GET to the vendor that issued it — which is how a caller
9
+ * learns where a request actually landed when a router sits between them and
10
+ * the model.
11
+ *
12
+ * NOT an authentication mechanism. Every value here is a request header chosen
13
+ * by the caller and is trivially forged. Authorize blob reads with an
14
+ * unguessable URL (single-use capability token, short TTL) and treat a fetcher
15
+ * match as attribution/telemetry only.
16
+ *
17
+ * Each entry was captured from a live fetch triggered by handing that vendor's
18
+ * API a URL-sourced image.
19
+ */
20
+ /** Vendor whose infrastructure performed an inbound fetch. */
21
+ export type ImageFetcherVendor = "openai" | "anthropic" | "xai" | "google";
22
+ /** Registry key for a known fetcher. */
23
+ export type ImageFetcherId = "openai-file-downloader" | "anthropic-claude-user" | "anthropic-claude-user-preview" | "xai-image-api-fetch" | "google";
24
+ /** Request signature of one provider-side fetcher. */
25
+ export interface ImageFetcherIdentity {
26
+ vendor: ImageFetcherVendor;
27
+ /** Human-readable name for logs and UI. */
28
+ label: string;
29
+ /**
30
+ * `User-Agent` contract: an exact string for fetchers that send a fixed
31
+ * value, or a pattern for those embedding a client version.
32
+ */
33
+ userAgent: string | RegExp;
34
+ /**
35
+ * Vendor-proprietary headers observed alongside the agent, used to
36
+ * corroborate a `User-Agent` claim. Generic infrastructure headers
37
+ * (`traceparent`, `x-cloud-trace-context`) are deliberately excluded: they
38
+ * are emitted by unrelated infrastructure and corroborate nothing. Empty
39
+ * means the agent string is the only available signal, so
40
+ * {@link ImageFetcherMatch.corroborated} can never be true for that entry.
41
+ */
42
+ markerHeaders: readonly string[];
43
+ /** API surface the capture came from. */
44
+ observedVia: string;
45
+ /** Operational caveats a blob server should account for. */
46
+ note?: string;
47
+ }
48
+ /**
49
+ * Known provider-side fetchers.
50
+ *
51
+ * Agent contracts do not overlap — exact strings never collide with the
52
+ * versioned patterns — so lookup order carries no meaning.
53
+ */
54
+ export declare const IMAGE_FETCHERS: Readonly<Record<ImageFetcherId, ImageFetcherIdentity>>;
55
+ /** Attribution outcome for one inbound request. */
56
+ export interface ImageFetcherMatch {
57
+ id: ImageFetcherId;
58
+ identity: ImageFetcherIdentity;
59
+ /**
60
+ * Whether every proprietary marker header for the matched identity is
61
+ * present. Always false for identities declaring no markers — absence of
62
+ * corroboration is not evidence against the match.
63
+ */
64
+ corroborated: boolean;
65
+ }
66
+ /** Inbound header bag, as exposed by either `fetch` or a Node-style server. */
67
+ export type InboundHeaders = Headers | Readonly<Record<string, string | readonly string[] | undefined>>;
68
+ /**
69
+ * Attribute an inbound blob request to a known provider-side fetcher, or
70
+ * `null` when the agent matches none.
71
+ *
72
+ * Matches on `User-Agent` alone and reports marker-header corroboration
73
+ * separately; callers MUST NOT treat either as proof of origin. Gate access on
74
+ * the unguessable URL.
75
+ */
76
+ export declare function identifyImageFetcher(headers: InboundHeaders): ImageFetcherMatch | null;
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.1",
4
+ "version": "17.4.2",
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.1",
38
- "@oh-my-pi/pi-utils": "17.4.1"
37
+ "@oh-my-pi/omptype": "17.4.2",
38
+ "@oh-my-pi/pi-utils": "17.4.2"
39
39
  },
40
40
  "devDependencies": {
41
- "@oh-my-pi/pi-ai": "17.4.1",
41
+ "@oh-my-pi/pi-ai": "17.4.2",
42
42
  "@types/bun": "^1.3.14"
43
43
  },
44
44
  "engines": {
package/src/index.ts CHANGED
@@ -16,3 +16,4 @@ export * from "./wire/codex";
16
16
  export * from "./wire/coreweave";
17
17
  export * from "./wire/gemini-headers";
18
18
  export * from "./wire/github-copilot";
19
+ export * from "./wire/image-fetchers";