@oh-my-pi/pi-catalog 18.3.5 → 18.4.1

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,26 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [18.4.1] - 2026-09-28
6
+
7
+ ### Added
8
+
9
+ - Added `resolveCatalogAxes` to `compat/resolve`, which resolves a model's catalog-axis policy without computing its full compat and thinking policy; context-window and catalog-policy lookups now use it, reducing model-catalog load time.
10
+
11
+ ### Fixed
12
+
13
+ - Fixed `--thinking xhigh` on Amazon Bedrock Grok 4.6 (`us.xai.grok-4.6`, `global.xai.grok-4.6`, `xai.grok-4.6`), which was silently lowered to `high` ([#13515](https://github.com/can1357/oh-my-pi/pull/13515) by [@pgkt04](https://github.com/pgkt04)).
14
+ - Fixed `--thinking xhigh` and `--thinking max` on Amazon Bedrock Claude Opus 5.5, which were silently lowered to `high` ([#13515](https://github.com/can1357/oh-my-pi/pull/13515) by [@pgkt04](https://github.com/pgkt04)).
15
+ - Fixed GitHub Copilot GPT-5.6 and GPT-6 Astra starting on the 1.05M premium context window instead of the default tier ([#13017](https://github.com/can1357/oh-my-pi/pull/13017)).
16
+ - Added Cursor model pricing so usage stats no longer record zero cost for Cursor turns ([#13302](https://github.com/can1357/oh-my-pi/pull/13302) by [@eggpeat](https://github.com/eggpeat)).
17
+ - Devin requests now identify as Devin CLI 3000.11.3 instead of 3000.6.2, the CLI release that routes Fusion pairings ([#13527](https://github.com/can1357/oh-my-pi/pull/13527) by [@will-bogusz](https://github.com/will-bogusz)).
18
+
19
+ ## [18.4.0] - 2026-09-28
20
+
21
+ ### Fixed
22
+
23
+ - Corrected Cerebras model pricing so cached input tokens are charged at the model’s input rate, consistent with Cerebras billing.
24
+
5
25
  ## [18.3.5] - 2026-09-27
6
26
 
7
27
  ### Added
@@ -9,8 +9,8 @@
9
9
  import { type Api, type Model, type ModelSpec } from "./types.js";
10
10
  /**
11
11
  * Applies reviewed catalog-data value corrections (`cost-patch`,
12
- * `limits-patch`, `long-context-cost`, `context-window-floor`,
13
- * `input-modalities`) onto an upstream-sourced spec. Applied by
12
+ * `cache-read-at-input-rate`, `limits-patch`, `long-context-cost`,
13
+ * `context-window-floor`, `input-modalities`) onto an upstream-sourced spec. Applied by
14
14
  * `buildModel` to every upstream-sourced spec; user-authored overrides are
15
15
  * recomposed after building by the override applicators, so explicit user
16
16
  * limits and pricing still win.
@@ -10,6 +10,12 @@ export interface ResolvedModelPolicy<TApi extends Api = Api> {
10
10
  }
11
11
  /** Resolve the request adapter assigned to a discovery backend before materialization. */
12
12
  export declare function resolveDiscoveryApi(spec: ModelSpec<Api>, providerType: string): Api;
13
+ /**
14
+ * Catalog-data axis assignments for one model spec — the `catalog` field of
15
+ * {@link resolveModelPolicy} without resolving the compat and thinking
16
+ * policies, which dominate its cost on catalog-wide scans.
17
+ */
18
+ export declare function resolveCatalogAxes(spec: ModelSpec<Api>): Record<string, unknown>;
13
19
  /**
14
20
  * Resolves the full policy surface for one model spec: structured identity,
15
21
  * complete compat record, thinking metadata, and catalog-data corrections.
@@ -240,6 +240,8 @@ export interface CompiledCursorParameter {
240
240
  /** One provider quota-scope table. */
241
241
  export interface CompiledQuotaRule {
242
242
  provider: string;
243
+ /** Tier used when no exact or fallback membership matches. */
244
+ defaultTier?: string;
243
245
  tiers: {
244
246
  label: string;
245
247
  models: string[];
@@ -5070,6 +5070,11 @@ export interface TruncatedToolCallSuccess extends ProtoMessage {
5070
5070
  export declare const TruncatedToolCallSuccessSchema: MessageCodec<TruncatedToolCallSuccess>;
5071
5071
  /** Cursor agent message agent.v1.TurnEndedUpdate. */
5072
5072
  export interface TurnEndedUpdate extends ProtoMessage {
5073
+ inputTokens?: bigint;
5074
+ outputTokens?: bigint;
5075
+ cacheReadTokens?: bigint;
5076
+ cacheWriteTokens?: bigint;
5077
+ reasoningTokens?: bigint;
5073
5078
  }
5074
5079
  export declare const TurnEndedUpdateSchema: MessageCodec<TurnEndedUpdate>;
5075
5080
  /** Cursor agent message agent.v1.TypeAction. */
@@ -8,17 +8,28 @@
8
8
  export declare const DEVIN_DEFAULT_BASE_URL = "https://server.codeium.com";
9
9
  /** Session token as the wire format carries it: the scheme prefix is required. */
10
10
  export declare function normalizeDevinSessionToken(apiKey: string | undefined): string;
11
+ /** Released-CLI metadata with credential bytes already encoded for the wire. */
12
+ export declare function devinWireMetadata(apiKey: string | undefined, userJwt?: string): {
13
+ ideName: "devin-cli";
14
+ ideType: "chisel";
15
+ ideVersion: "3000.11.3";
16
+ extensionName: "chisel";
17
+ extensionVersion: "3000.11.3";
18
+ locale: "en";
19
+ os: "darwin" | "linux" | "windows";
20
+ apiKey: string;
21
+ userJwt: string;
22
+ };
11
23
  /**
12
24
  * Fields for `Metadata` on released-CLI calls (`GetUserJwt`, `AssignModel`,
13
- * `GetChatMessage`, `GetUserStatus`). `userJwt` stays empty for the calls the
14
- * CLI makes with the session token alone (auth, model assignment, usage).
25
+ * `GetChatMessage`, `GetUserStatus`) authenticated by a Devin session token.
15
26
  */
16
27
  export declare function devinCliMetadata(apiKey: string | undefined, userJwt?: string): {
17
28
  ideName: "devin-cli";
18
29
  ideType: "chisel";
19
- ideVersion: "3000.6.2";
30
+ ideVersion: "3000.11.3";
20
31
  extensionName: "chisel";
21
- extensionVersion: "3000.6.2";
32
+ extensionVersion: "3000.11.3";
22
33
  locale: "en";
23
34
  os: "darwin" | "linux" | "windows";
24
35
  apiKey: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-catalog",
3
- "version": "18.3.5",
3
+ "version": "18.4.1",
4
4
  "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
5
5
  "keywords": [
6
6
  "ai",
@@ -93,12 +93,12 @@
93
93
  "gen:proto": "bun scripts/generate-protocols.ts"
94
94
  },
95
95
  "dependencies": {
96
- "@oh-my-pi/omptype": "18.3.5",
97
- "@oh-my-pi/pi-utils": "18.3.5"
96
+ "@oh-my-pi/omptype": "18.4.1",
97
+ "@oh-my-pi/pi-utils": "18.4.1"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@bgotink/kdl": "0.4.0",
101
- "@oh-my-pi/pi-ai": "18.3.5",
101
+ "@oh-my-pi/pi-ai": "18.4.1",
102
102
  "@types/bun": "^1.3.14"
103
103
  },
104
104
  "engines": {
package/src/build.ts CHANGED
@@ -140,8 +140,8 @@ function applyCatalogAssignments<TApi extends Api>(model: Model<TApi>, catalog:
140
140
 
141
141
  /**
142
142
  * Applies reviewed catalog-data value corrections (`cost-patch`,
143
- * `limits-patch`, `long-context-cost`, `context-window-floor`,
144
- * `input-modalities`) onto an upstream-sourced spec. Applied by
143
+ * `cache-read-at-input-rate`, `limits-patch`, `long-context-cost`,
144
+ * `context-window-floor`, `input-modalities`) onto an upstream-sourced spec. Applied by
145
145
  * `buildModel` to every upstream-sourced spec; user-authored overrides are
146
146
  * recomposed after building by the override applicators, so explicit user
147
147
  * limits and pricing still win.
@@ -220,6 +220,14 @@ export function applyCatalogCorrections(
220
220
  applyEffectiveFallbackRates(model.cost, Reflect.get(fallback, "effectiveRates"));
221
221
  }
222
222
  }
223
+ if (catalog.cacheReadAtInputRate === true) {
224
+ const { longContext } = model.cost;
225
+ model.cost = {
226
+ ...model.cost,
227
+ cacheRead: model.cost.input,
228
+ ...(longContext && { longContext: { ...longContext, cacheRead: longContext.input } }),
229
+ };
230
+ }
223
231
  if (catalog.timeBased !== undefined) {
224
232
  model.cost = { ...model.cost, timeBased: materializeTimeBasedCost(catalog.timeBased) };
225
233
  }
@@ -321,6 +321,16 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
321
321
  "context-window-floor": { key: "contextWindowFloor", set: "catalog", shape: "scalar" },
322
322
  "cost-patch": { key: "costPatch", set: "catalog", shape: "object" },
323
323
  "cost-fallback": { key: "costFallback", set: "catalog", shape: "object" },
324
+ /**
325
+ * The host bills cache-hit input tokens at the full input rate (no cache
326
+ * discount), so the built row's `cacheRead` tracks its live `input` price.
327
+ */
328
+ "cache-read-at-input-rate": {
329
+ key: "cacheReadAtInputRate",
330
+ set: "catalog",
331
+ shape: "scalar",
332
+ values: [true, false],
333
+ },
324
334
  "delegation-bias": { key: "delegationBias", set: "catalog", shape: "scalar", values: DELEGATION_BIASES },
325
335
  "discovery-api": { key: "discoveryApi", set: "catalog", shape: "scalar" },
326
336
  "edit-prompt-variant": { key: "editPromptVariant", set: "catalog", shape: "scalar", values: ["full", "compact"] },
@@ -100,7 +100,7 @@ export function quotaTierFor(provider: string, model: string): string | undefine
100
100
  for (const fallback of rule.fallbacks) {
101
101
  if (model.includes(fallback.substring)) return fallback.label;
102
102
  }
103
- return undefined;
103
+ return rule.defaultTier;
104
104
  }
105
105
 
106
106
  /** UTC offset for a provider's timezone-naive absolute retry-reset timestamps. */
@@ -1,6 +1,6 @@
1
1
  import { toModelSpec } from "../provider-models/bundled-references";
2
2
  import type { Model } from "../types";
3
- import { resolveModelPolicy } from "./resolve";
3
+ import { resolveCatalogAxes } from "./resolve";
4
4
 
5
5
  /**
6
6
  * Rule-owned catalog-axis policy by model. Resolve once per process rather
@@ -21,7 +21,7 @@ export function resolveCatalogPolicy(model: Model): Readonly<Record<string, unkn
21
21
  const key = `${model.provider}\u0000${model.providerType ?? ""}\u0000${model.api}\u0000${model.id}\u0000${model.reasoning ? 1 : 0}`;
22
22
  const cached = catalogPolicyCache.get(key);
23
23
  if (cached !== undefined) return cached;
24
- const policy = Object.freeze({ ...resolveModelPolicy(toModelSpec(model)).catalog });
24
+ const policy = Object.freeze({ ...resolveCatalogAxes(toModelSpec(model)) });
25
25
  if (catalogPolicyCache.size >= CATALOG_POLICY_CACHE_MAX) catalogPolicyCache.clear();
26
26
  catalogPolicyCache.set(key, policy);
27
27
  return policy;
@@ -1,6 +1,6 @@
1
1
  import { toModelSpec } from "../provider-models/bundled-references";
2
2
  import type { Model } from "../types";
3
- import { resolveModelPolicy } from "./resolve";
3
+ import { resolveCatalogAxes } from "./resolve";
4
4
 
5
5
  /**
6
6
  * Rule-owned maxima by provider/id/api. Resolve once per process rather than
@@ -21,7 +21,7 @@ export function resolveMaxContextWindow(model: Model): number | undefined {
21
21
  const key = `${model.provider} ${model.id} ${model.api}`;
22
22
  let curated = ruleMaximumCache.get(key);
23
23
  if (curated === undefined) {
24
- const maximum = resolveModelPolicy(toModelSpec(model)).catalog.maxContextWindow;
24
+ const maximum = resolveCatalogAxes(toModelSpec(model)).maxContextWindow;
25
25
  curated = typeof maximum === "number" && Number.isFinite(maximum) && maximum > 0 ? maximum : null;
26
26
  if (ruleMaximumCache.size >= RULE_POLICY_CACHE_MAX) ruleMaximumCache.clear();
27
27
  ruleMaximumCache.set(key, curated);
@@ -56,7 +56,7 @@ export function clampsContextOverride(model: Model): boolean {
56
56
  const key = `${model.provider} ${model.id} ${model.api}`;
57
57
  const cached = clampOverrideCache.get(key);
58
58
  if (cached !== undefined) return cached;
59
- const clamps = resolveModelPolicy(toModelSpec(model)).catalog.clampContextOverride === true;
59
+ const clamps = resolveCatalogAxes(toModelSpec(model)).clampContextOverride === true;
60
60
  if (clampOverrideCache.size >= RULE_POLICY_CACHE_MAX) clampOverrideCache.clear();
61
61
  clampOverrideCache.set(key, clamps);
62
62
  return clamps;
@@ -1241,6 +1241,15 @@ export function resolveDiscoveryApi(spec: ModelSpec<Api>, providerType: string):
1241
1241
  return typeof discoveryApi === "string" ? discoveryApi : spec.api;
1242
1242
  }
1243
1243
 
1244
+ /**
1245
+ * Catalog-data axis assignments for one model spec — the `catalog` field of
1246
+ * {@link resolveModelPolicy} without resolving the compat and thinking
1247
+ * policies, which dominate its cost on catalog-wide scans.
1248
+ */
1249
+ export function resolveCatalogAxes(spec: ModelSpec<Api>): Record<string, unknown> {
1250
+ return resolveCascade(buildResolveTarget(spec, resolveIdentity(spec))).catalog;
1251
+ }
1252
+
1244
1253
  /**
1245
1254
  * Resolves the full policy surface for one model spec: structured identity,
1246
1255
  * complete compat record, thinking metadata, and catalog-data corrections.
@@ -7,11 +7,6 @@ provider "amazon-bedrock" {
7
7
  // (`amazon-bedrock.ts`), so a block can land above text already rendered.
8
8
  stream-revision "possible"
9
9
  class "anthropic" {
10
- family "fable" {
11
- revision ">=5.1 <5.2" {
12
- thinking-efforts "low" "medium" "high" "xhigh" "max"
13
- }
14
- }
15
10
  family "opus" {
16
11
  revision ">=4.6 <4.7" {
17
12
  thinking-mode "anthropic-adaptive"
@@ -22,6 +17,22 @@ provider "amazon-bedrock" {
22
17
  stream-idle-timeout-ms 900000
23
18
  thinking-efforts "low" "medium" "high" "max"
24
19
  }
20
+ // First-party >=4.7 xhigh/max omits amazon-bedrock: the host rule
21
+ // above is a shorter ladder. From 5.1 the host accepts the full set.
22
+ revision ">=5.1" {
23
+ thinking-efforts "low" "medium" "high" "xhigh" "max"
24
+ }
25
+ }
26
+ class "xai" {
27
+ family "grok" {
28
+ // Converse accepts reasoning.effort for Grok 4.6; budget_tokens is
29
+ // the Anthropic path and the unknown-class default. Older Groks
30
+ // are unverified and keep budget.
31
+ revision ">=4.6" {
32
+ thinking-mode "effort"
33
+ thinking-efforts "low" "medium" "high" "xhigh"
34
+ }
35
+ }
25
36
  }
26
37
  class "openai" {
27
38
  thinking-mode "effort"
@@ -10,6 +10,9 @@ provider "cerebras" {
10
10
  // Replaces the Cerebras provider branches in the completions baseline.
11
11
  supports-usage-in-streaming #false
12
12
  tool-strict-mode "all_strict"
13
+ // Prompt caching carries no discount: cached input tokens bill at the
14
+ // standard input rate (https://inference-docs.cerebras.ai/capabilities/prompt-caching).
15
+ cache-read-at-input-rate #true
13
16
  // Cerebras serves Gemma 4 with vision enabled; its /v1/models rows carry
14
17
  // no modality metadata.
15
18
  models "gemma-4-31b" {