@oh-my-pi/pi-catalog 18.8.1 → 18.8.3
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 +12 -0
- package/dist/types/compat/request-size.d.ts +7 -0
- package/package.json +4 -4
- package/src/compat/axes.ts +1 -0
- package/src/compat/request-size.ts +25 -0
- package/src/compat/resolve.ts +4 -2
- package/src/compat/rules/README.md +2 -0
- package/src/compat/rules/classes/anthropic.kdl +66 -1
- package/src/compat/rules/providers/anthropic.kdl +13 -0
- package/src/compat/rules/providers/moonshot.kdl +11 -0
- package/src/compat/rules.json +1 -1
- package/src/model-tokenizer.ts +3 -0
- package/src/models.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.8.3] - 2026-10-07
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added Claude Haiku 5.5 with adaptive thinking (low through max effort), image input, a 1M-token context window, 128K output, and its tiered pricing above 100K input tokens.
|
|
10
|
+
|
|
11
|
+
## [18.8.2] - 2026-10-07
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Fixed Anthropic requests carrying too many inline screenshot bytes by exposing a provider image-byte budget, applied only on the official endpoint ([#14453](https://github.com/can1357/oh-my-pi/issues/14453)).
|
|
16
|
+
|
|
5
17
|
## [18.8.1] - 2026-10-07
|
|
6
18
|
|
|
7
19
|
### Fixed
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Model } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Maximum encoded inline-image bytes retained per request for a deployment with a documented body-size limit.
|
|
4
|
+
* The axis is a host contract: a rerouted `baseUrl` (proxy, gateway) imposes its own limit, so the budget
|
|
5
|
+
* applies only while the model targets its official endpoint.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveInlineImageByteBudget(model: Model): number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-catalog",
|
|
3
|
-
"version": "18.8.
|
|
3
|
+
"version": "18.8.3",
|
|
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.8.
|
|
97
|
-
"@oh-my-pi/pi-utils": "18.8.
|
|
96
|
+
"@oh-my-pi/omptype": "18.8.3",
|
|
97
|
+
"@oh-my-pi/pi-utils": "18.8.3"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@bgotink/kdl": "0.4.0",
|
|
101
|
-
"@oh-my-pi/pi-ai": "18.8.
|
|
101
|
+
"@oh-my-pi/pi-ai": "18.8.3",
|
|
102
102
|
"@types/bun": "^1.3.14"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
package/src/compat/axes.ts
CHANGED
|
@@ -395,6 +395,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
395
395
|
/** How the model line bills an input image; shape and formulas in `./image-tokenization`. */
|
|
396
396
|
"image-tokenization": { key: "imageTokenization", set: "catalog", shape: "object" },
|
|
397
397
|
"image-model": { key: "imageModel", set: "catalog", shape: "scalar" },
|
|
398
|
+
"inline-image-byte-budget": { key: "inlineImageByteBudget", set: "catalog", shape: "scalar" },
|
|
398
399
|
"limits-patch": { key: "limitsPatch", set: "catalog", shape: "object" },
|
|
399
400
|
"long-context-cost": { key: "longContext", set: "catalog", shape: "object" },
|
|
400
401
|
"prompt-cache": { key: "promptCache", set: "catalog", shape: "object" },
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { toModelSpec } from "../provider-models/bundled-references";
|
|
2
|
+
import type { Model } from "../types";
|
|
3
|
+
import { resolveCatalogAxes } from "./resolve";
|
|
4
|
+
|
|
5
|
+
const imageBudgetCache = new Map<string, number | null>();
|
|
6
|
+
const IMAGE_BUDGET_CACHE_MAX = 8192;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Maximum encoded inline-image bytes retained per request for a deployment with a documented body-size limit.
|
|
10
|
+
* The axis is a host contract: a rerouted `baseUrl` (proxy, gateway) imposes its own limit, so the budget
|
|
11
|
+
* applies only while the model targets its official endpoint.
|
|
12
|
+
*/
|
|
13
|
+
export function resolveInlineImageByteBudget(model: Model): number | undefined {
|
|
14
|
+
const compat = model.compat;
|
|
15
|
+
if (!compat || !("officialEndpoint" in compat) || !compat.officialEndpoint) return undefined;
|
|
16
|
+
const key = `${model.provider} ${model.id} ${model.api}`;
|
|
17
|
+
let budget = imageBudgetCache.get(key);
|
|
18
|
+
if (budget === undefined) {
|
|
19
|
+
const value = resolveCatalogAxes(toModelSpec(model)).inlineImageByteBudget;
|
|
20
|
+
budget = typeof value === "number" && Number.isFinite(value) && value > 0 ? value : null;
|
|
21
|
+
if (imageBudgetCache.size >= IMAGE_BUDGET_CACHE_MAX) imageBudgetCache.clear();
|
|
22
|
+
imageBudgetCache.set(key, budget);
|
|
23
|
+
}
|
|
24
|
+
return budget ?? undefined;
|
|
25
|
+
}
|
package/src/compat/resolve.ts
CHANGED
|
@@ -107,11 +107,12 @@ class IdentityFacts {
|
|
|
107
107
|
return this.is("kimi") && this.family("k2.7-code", "k3");
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
/** Adaptive-thinking Claude generation floor (Opus ≥ min; Sonnet/Fable/Mythos ≥ 5). */
|
|
110
|
+
/** Adaptive-thinking Claude generation floor (Opus ≥ min; Sonnet/Fable/Mythos ≥ 5; Haiku ≥ 5.5). */
|
|
111
111
|
anthropicAdaptiveGenAtLeast(opusMin: string): boolean {
|
|
112
112
|
if (!this.is("anthropic")) return false;
|
|
113
113
|
if (this.family("opus")) return this.revGte(opusMin);
|
|
114
114
|
if (this.family("sonnet", "fable", "mythos")) return this.revGte("5");
|
|
115
|
+
if (this.family("haiku")) return this.revGte("5.5");
|
|
115
116
|
return false;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
@@ -1009,7 +1010,8 @@ function defaultThinkingMode<TApi extends Api>(spec: ModelSpec<TApi>, facts: Ide
|
|
|
1009
1010
|
return "anthropic-budget-effort";
|
|
1010
1011
|
}
|
|
1011
1012
|
if (facts.is("anthropic")) {
|
|
1012
|
-
|
|
1013
|
+
// Haiku stays on budget thinking until 5.5, its first adaptive generation.
|
|
1014
|
+
if (facts.revGte(facts.family("haiku") ? "5.5" : "4.6")) return "anthropic-adaptive";
|
|
1013
1015
|
if (facts.family("opus") && facts.revGte("4.5")) return "anthropic-budget-effort";
|
|
1014
1016
|
}
|
|
1015
1017
|
return "budget";
|
|
@@ -217,6 +217,8 @@ One object axis carries a computed form: `long-context-cost` accepts either the
|
|
|
217
217
|
|
|
218
218
|
`context-window-authoritative #true` preserves a host's supplied context window through runtime model selection instead of applying inferred expansion or reference-price-tier caps. Explicit user context overrides still apply afterward. It applies to rows materialized through `buildModel` (discovery and regenerated bundles). See [`providers/factory-droid.kdl`](providers/factory-droid.kdl).
|
|
219
219
|
|
|
220
|
+
`inline-image-byte-budget` caps retained base64 image characters for a deployment's request body. It leaves room for tool schemas and text beneath the provider's body-size limit; the coding agent reads it through `resolveInlineImageByteBudget` before sending live history. The budget applies only while `compat.officialEndpoint` holds: a custom `baseUrl` imposes its own body limit.
|
|
221
|
+
|
|
220
222
|
The routed-subscription registry axes (`upstream-rotation`, `region-upstreams-global|us|eu`, `region-limits-eu`, `credit-rates`, `list-price-from`, `routing-family`, `policy-aliases`, `entitlement`, `default-reasoning-off`) describe a gateway whose proxy fans one model out to several upstreams. They are read through `src/compat/factory-droid.ts` by Factory Droid discovery and its request provider, not materialized by `buildModel`. A provider-wide `region-upstreams-*` rule is the upstream serving table and a model rule replaces it for that region. `list-price-from "<provider>" ["<id>"]` shows a bundled row's list price beside the subscription's own billing; unlike seed values it is resolved at runtime and degrades to the seed's zero cost when the row is gone. See [`providers/factory-droid.kdl`](providers/factory-droid.kdl), whose wire and billing pool per model are `api-routes` and `quota-tiers` rules in `runtime/behavior.kdl`.
|
|
221
223
|
|
|
222
224
|
### Time-based pricing
|
|
@@ -72,7 +72,7 @@ class "anthropic" {
|
|
|
72
72
|
thinking-prefix-binding #true
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
// Adaptive Claude (Opus 4.7+, Sonnet/Fable/Mythos 5+) rejects explicit
|
|
75
|
+
// Adaptive Claude (Opus 4.7+, Sonnet/Fable/Mythos 5+, Haiku 5.5+) rejects explicit
|
|
76
76
|
// sampling params (`temperature`, `top_p`, `top_k`) with a 400 on every
|
|
77
77
|
// serving host. The `<10` bound keeps whole-number revisions such as
|
|
78
78
|
// `claude-opus-45` (Opus 4.5) out of the range.
|
|
@@ -96,6 +96,11 @@ class "anthropic" {
|
|
|
96
96
|
supports-sampling-params #false
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
+
family "haiku" {
|
|
100
|
+
revision ">=5.5 <10" {
|
|
101
|
+
supports-sampling-params #false
|
|
102
|
+
}
|
|
103
|
+
}
|
|
99
104
|
// On-demand compaction (compact-2026-09-04) works on the Claude API, Vertex,
|
|
100
105
|
// and Amazon Bedrock's `/anthropic` routes, not Bedrock Converse.
|
|
101
106
|
// Foundry / Claude Platform on AWS are first-party Anthropic routes whose
|
|
@@ -121,6 +126,11 @@ class "anthropic" {
|
|
|
121
126
|
supports-server-compaction #true
|
|
122
127
|
}
|
|
123
128
|
}
|
|
129
|
+
family "haiku" {
|
|
130
|
+
revision ">=5.5 <6" {
|
|
131
|
+
supports-server-compaction #true
|
|
132
|
+
}
|
|
133
|
+
}
|
|
124
134
|
models "claude-mythos-preview" {
|
|
125
135
|
supports-server-compaction #true
|
|
126
136
|
}
|
|
@@ -173,6 +183,15 @@ class "anthropic" {
|
|
|
173
183
|
thinking-prefix-binding #true
|
|
174
184
|
}
|
|
175
185
|
}
|
|
186
|
+
// Haiku 5.5 binds signed thinking to the exact preceding conversation like
|
|
187
|
+
// Sonnet 5.5. It accepts a forced `tool_choice` (the response just skips
|
|
188
|
+
// thinking), so it keeps forced tool selection.
|
|
189
|
+
// https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide
|
|
190
|
+
family "haiku" {
|
|
191
|
+
revision ">=5.5 <6" {
|
|
192
|
+
thinking-prefix-binding #true
|
|
193
|
+
}
|
|
194
|
+
}
|
|
176
195
|
on "anthropic" "cloudflare-ai-gateway" "google-vertex" {
|
|
177
196
|
family "fable" {
|
|
178
197
|
revision ">=5" {
|
|
@@ -200,6 +219,13 @@ class "anthropic" {
|
|
|
200
219
|
supports-turn-scoped-system #true
|
|
201
220
|
}
|
|
202
221
|
}
|
|
222
|
+
family "haiku" {
|
|
223
|
+
revision ">=5.5 <6" {
|
|
224
|
+
supports-mid-conversation-system #true
|
|
225
|
+
supports-mid-conversation-tool-changes #true
|
|
226
|
+
supports-turn-scoped-system #true
|
|
227
|
+
}
|
|
228
|
+
}
|
|
203
229
|
family "opus" {
|
|
204
230
|
revision ">=4.8" {
|
|
205
231
|
supports-mid-conversation-system #true
|
|
@@ -230,6 +256,13 @@ class "anthropic" {
|
|
|
230
256
|
supports-per-message-effort #true
|
|
231
257
|
}
|
|
232
258
|
}
|
|
259
|
+
// Haiku 5.5 mirrors Sonnet 5.5; Vertex stays off until verified.
|
|
260
|
+
family "haiku" {
|
|
261
|
+
revision ">=5.5 <6" {
|
|
262
|
+
supports-thinking-binding-controls #true
|
|
263
|
+
supports-per-message-effort #true
|
|
264
|
+
}
|
|
265
|
+
}
|
|
233
266
|
family "opus" {
|
|
234
267
|
revision ">=5" {
|
|
235
268
|
supports-per-message-effort #true
|
|
@@ -257,6 +290,10 @@ class "anthropic" {
|
|
|
257
290
|
"google-vertex" "opencode-zen" "snowflake" "vercel-ai-gateway" {
|
|
258
291
|
family "haiku" {
|
|
259
292
|
thinking-mode "budget"
|
|
293
|
+
// Haiku 5.5 is the first adaptive Haiku: `budget_tokens` is a 400.
|
|
294
|
+
revision ">=5.5 <6" {
|
|
295
|
+
thinking-mode "anthropic-adaptive"
|
|
296
|
+
}
|
|
260
297
|
}
|
|
261
298
|
}
|
|
262
299
|
on "amazon-bedrock" "anthropic" "cloudflare-ai-gateway" "github-copilot" "gitlab-duo" \
|
|
@@ -365,6 +402,34 @@ class "anthropic" {
|
|
|
365
402
|
max-tokens 128000
|
|
366
403
|
}
|
|
367
404
|
}
|
|
405
|
+
// /v1/models reports neither reasoning, vision, pricing nor limits for
|
|
406
|
+
// Haiku 5.5, so a discovered row would materialize as a text-only,
|
|
407
|
+
// unpriced, non-reasoning model; pin the model card. Prompts over 100K
|
|
408
|
+
// input tokens bill the whole request at the long-context rates.
|
|
409
|
+
// https://platform.claude.com/docs/en/models/haiku-5-5/overview
|
|
410
|
+
family "haiku" {
|
|
411
|
+
revision ">=5.5 <6" {
|
|
412
|
+
thinking-upgrade-neutral #true
|
|
413
|
+
input-modalities "text" "image"
|
|
414
|
+
cost-patch {
|
|
415
|
+
input 0.1
|
|
416
|
+
output 0.5
|
|
417
|
+
cache-read 0.01
|
|
418
|
+
cache-write 0.125
|
|
419
|
+
}
|
|
420
|
+
long-context-cost {
|
|
421
|
+
input-threshold 100000
|
|
422
|
+
input 0.5
|
|
423
|
+
output 2.5
|
|
424
|
+
cache-read 0.05
|
|
425
|
+
cache-write 0.625
|
|
426
|
+
}
|
|
427
|
+
limits-patch {
|
|
428
|
+
context-window 1000000
|
|
429
|
+
max-tokens 128000
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
368
433
|
family "mythos" {
|
|
369
434
|
cost-patch {
|
|
370
435
|
input 10.0
|
|
@@ -34,6 +34,12 @@ provider "anthropic" {
|
|
|
34
34
|
cost input=2 output=10 cache-read=0.2 cache-write=2.5
|
|
35
35
|
limits context=1000000 max-tokens=128000
|
|
36
36
|
}
|
|
37
|
+
model "claude-haiku-5-5" name="Claude Haiku 5.5" {
|
|
38
|
+
reasoning #true
|
|
39
|
+
input "text" "image"
|
|
40
|
+
cost input=0.1 output=0.5 cache-read=0.01 cache-write=0.125
|
|
41
|
+
limits context=1000000 max-tokens=128000
|
|
42
|
+
}
|
|
37
43
|
model "claude-fable-5" name="Claude Fable 5" {
|
|
38
44
|
reasoning #true
|
|
39
45
|
input "text" "image"
|
|
@@ -68,6 +74,13 @@ provider "anthropic" {
|
|
|
68
74
|
// combines this fact with a per-request effective-URL check, so it never
|
|
69
75
|
// authorizes a block on its own.
|
|
70
76
|
first-party-provider #true
|
|
77
|
+
// Messages requests cap at 32 MB. Reserve 8 MB for text, tools, and JSON
|
|
78
|
+
// framing when retaining inline base64 images in a long conversation.
|
|
79
|
+
// Applied only on the official endpoint; a custom baseUrl has its own limit.
|
|
80
|
+
// https://platform.claude.com/docs/en/api/overview#request-size-limits
|
|
81
|
+
on-api "anthropic-messages" {
|
|
82
|
+
inline-image-byte-budget 24000000
|
|
83
|
+
}
|
|
71
84
|
class "anthropic" {
|
|
72
85
|
revision ">=3.7 <4.6" {
|
|
73
86
|
thinking-efforts "minimal" "low" "medium" "high" "xhigh"
|
|
@@ -31,6 +31,17 @@ provider "moonshot" {
|
|
|
31
31
|
input-modalities "text" "image"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
// stencil.so reports a $3 K3 cache write; Moonshot bills only cache hits
|
|
35
|
+
// ($0.30) and misses (the $3 input rate), with no cache-write charge.
|
|
36
|
+
// https://platform.moonshot.ai/docs/pricing/chat-k3
|
|
37
|
+
models "kimi-k3" {
|
|
38
|
+
cost-patch {
|
|
39
|
+
input 3.0
|
|
40
|
+
output 15.0
|
|
41
|
+
cache-read 0.3
|
|
42
|
+
cache-write 0.0
|
|
43
|
+
}
|
|
44
|
+
}
|
|
34
45
|
// The /models roster carries no modality metadata for the named vision/vl
|
|
35
46
|
// SKUs; the bounded id token is the census signal.
|
|
36
47
|
models token="vision" {
|