@oh-my-pi/pi-catalog 18.1.17 → 18.1.18
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 +13 -0
- package/dist/types/types.d.ts +24 -1
- package/package.json +4 -4
- package/src/build.ts +8 -2
- package/src/compat/axes.ts +7 -0
- package/src/compat/resolve.ts +2 -0
- package/src/compat/rules/classes/anthropic.kdl +24 -0
- package/src/compat/rules/providers/amazon-bedrock.kdl +7 -0
- package/src/compat/rules/providers/anthropic.kdl +8 -0
- package/src/compat/rules/providers/deepseek.kdl +1 -0
- package/src/compat/rules/providers/opencode-go.kdl +10 -0
- package/src/compat/rules/providers/openrouter.kdl +4 -0
- package/src/compat/rules.json +193 -79
- package/src/model-manager.ts +21 -12
- package/src/models.json +1223 -63
- package/src/types.ts +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.1.18] - 2026-09-11
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `supports-server-compaction` compat axis (`compat.supportsServerCompaction`): whether a model line accepts Anthropic server-side compaction (`compact-2026-01-12`). Class rules enable it for Opus 4.6+, Sonnet 4.6+, and Fable/Mythos 5 on every Anthropic-messages host; the default is `false`.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- OpenCode Go's DeepSeek Flash lanes (`deepseek-flash`, `deepseek-v4.1-flash`) now declare image input. The gateway serves them with vision despite the IDs carrying no vision suffix, so the class-wide `strip-image-input` rule was dropping attachments the endpoint reads; the modality is declared too, since live discovery seeds these lanes text-only ([#11774](https://github.com/can1357/oh-my-pi/pull/11774) by [@STRML](https://github.com/STRML)).
|
|
14
|
+
- Amazon Bedrock OpenAI models, plus unclassified profiles such as opaque application-inference-profile ARNs, now carry the compatibility policy required to preserve image-bearing tool results ([#11681](https://github.com/can1357/oh-my-pi/issues/11681)).
|
|
15
|
+
- DeepSeek V4.1 Flash requests now honor the documented 384K output maximum instead of being capped at 64K ([#11769](https://github.com/can1357/oh-my-pi/issues/11769)).
|
|
16
|
+
|
|
5
17
|
## [18.1.17] - 2026-09-10
|
|
6
18
|
|
|
7
19
|
### Added
|
|
8
20
|
|
|
21
|
+
- Added DeepSeek V4.1 Flash on OpenRouter with image input and low/high/max reasoning levels ([#11592](https://github.com/can1357/oh-my-pi/pull/11592) by [@mazzanfar](https://github.com/mazzanfar)).
|
|
9
22
|
- Added DeepSeek cost estimates that follow published peak/off-peak rates.
|
|
10
23
|
- Added dated, announced price changes to the catalog, so rates switch on their effective date (e.g. DeepSeek Pro moving to Flash rates).
|
|
11
24
|
- Added Command Code as a built-in provider with API-key login, live model discovery, per-model pricing, native OpenAI/Anthropic-compatible routing, cache-aware token usage, and TTFT metrics ([#11391](https://github.com/can1357/oh-my-pi/pull/11391) by [@CherkaSSH](https://github.com/CherkaSSH)).
|
package/dist/types/types.d.ts
CHANGED
|
@@ -409,6 +409,20 @@ export interface OpenAICompat {
|
|
|
409
409
|
export interface AnthropicCompat {
|
|
410
410
|
/** Whether thinking requests may include `context_management` and its beta header. Default: true. */
|
|
411
411
|
supportsContextManagement?: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Whether the model lineage supports Anthropic server-side compaction
|
|
414
|
+
* (`compact-2026-01-12`: the `compact_20260112` edit and replayed
|
|
415
|
+
* `compaction` blocks). Rule-owned per model line; the beta covers the
|
|
416
|
+
* adaptive-thinking generation onward and rejects older lines. Default: false.
|
|
417
|
+
*/
|
|
418
|
+
supportsServerCompaction?: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* Whether the model is served by the first-party Anthropic provider (its
|
|
421
|
+
* default route is the official API). Rule-owned on the provider; the
|
|
422
|
+
* compaction transport pairs it with a per-request effective-URL check
|
|
423
|
+
* because reroutes leave it stale-true. Default: false.
|
|
424
|
+
*/
|
|
425
|
+
firstPartyProvider?: boolean;
|
|
412
426
|
/**
|
|
413
427
|
* Whether requests may carry `output_config.effort` (and its effort beta
|
|
414
428
|
* header). Vertex AI rejects the field/header. Default: true.
|
|
@@ -756,6 +770,13 @@ export type ResolvedAnthropicCompat = Required<Omit<AnthropicCompat, "streamIdle
|
|
|
756
770
|
* env headers, and cache-TTL shaping without per-request URL parsing.
|
|
757
771
|
*/
|
|
758
772
|
officialEndpoint: boolean;
|
|
773
|
+
/**
|
|
774
|
+
* The model is served by the first-party Anthropic provider. Unlike
|
|
775
|
+
* `officialEndpoint` (URL-derived per deployment), this is provider
|
|
776
|
+
* identity for compaction gating, always paired with a per-request
|
|
777
|
+
* effective-URL check.
|
|
778
|
+
*/
|
|
779
|
+
firstPartyProvider: boolean;
|
|
759
780
|
};
|
|
760
781
|
/**
|
|
761
782
|
* Compatibility settings for the devin-agent (Codeium Cascade) API. Cascade
|
|
@@ -910,6 +931,8 @@ export interface Model<TApi extends Api = Api> {
|
|
|
910
931
|
requiresGlyphTokenization?: boolean;
|
|
911
932
|
/** Whether this model requires Cursor's tool-schema combiner projection. */
|
|
912
933
|
requiresCursorToolSchemaProjection?: boolean;
|
|
934
|
+
/** Whether this model requires tool-result images hoisted into sibling user content blocks. */
|
|
935
|
+
requiresToolResultImageHoisting?: boolean;
|
|
913
936
|
/**
|
|
914
937
|
* Model id to send on the wire when it differs from `id`. Used by catalog
|
|
915
938
|
* variants that present one upstream model under several local entries —
|
|
@@ -1083,7 +1106,7 @@ export interface Model<TApi extends Api = Api> {
|
|
|
1083
1106
|
* vocabulary of `buildModel`. Identical to `Model` except `compat` carries the
|
|
1084
1107
|
* sparse override shape and nothing is resolved yet.
|
|
1085
1108
|
*/
|
|
1086
|
-
export interface ModelSpec<TApi extends Api = Api> extends Omit<Model<TApi>, "compat" | "identity" | "compatConfig" | "requiresGlyphTokenization" | "requiresCursorToolSchemaProjection" | "supportsComputerUseConfig"> {
|
|
1109
|
+
export interface ModelSpec<TApi extends Api = Api> extends Omit<Model<TApi>, "compat" | "identity" | "compatConfig" | "requiresGlyphTokenization" | "requiresCursorToolSchemaProjection" | "requiresToolResultImageHoisting" | "supportsComputerUseConfig"> {
|
|
1087
1110
|
/** Sparse compatibility overrides; resolved into `Model.compat` by `buildModel`. */
|
|
1088
1111
|
compat?: CompatConfigOf<TApi>;
|
|
1089
1112
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-catalog",
|
|
4
|
-
"version": "18.1.
|
|
4
|
+
"version": "18.1.18",
|
|
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.",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"gen:proto": "bun scripts/generate-protocols.ts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@oh-my-pi/omptype": "18.1.
|
|
39
|
-
"@oh-my-pi/pi-utils": "18.1.
|
|
38
|
+
"@oh-my-pi/omptype": "18.1.18",
|
|
39
|
+
"@oh-my-pi/pi-utils": "18.1.18"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@bgotink/kdl": "0.4.0",
|
|
43
|
-
"@oh-my-pi/pi-ai": "18.1.
|
|
43
|
+
"@oh-my-pi/pi-ai": "18.1.18",
|
|
44
44
|
"@types/bun": "^1.3.14"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
package/src/build.ts
CHANGED
|
@@ -34,8 +34,8 @@ function isInputModalities(value: unknown): value is ("text" | "image")[] {
|
|
|
34
34
|
* corrections (`cost-patch`, `limits-patch`, `long-context-cost`,
|
|
35
35
|
* `context-window-floor`) overwrite upstream values; selection metadata
|
|
36
36
|
* (`priority`, `apply-patch-tool-type`, `service-tier-cost`,
|
|
37
|
-
* `requires-cursor-tool-schema-projection`)
|
|
38
|
-
* `context-promotion-target` fills only when the spec left it unset.
|
|
37
|
+
* `requires-cursor-tool-schema-projection`, `requires-tool-result-image-hoisting`)
|
|
38
|
+
* is rule-owned; `context-promotion-target` fills only when the spec left it unset.
|
|
39
39
|
*/
|
|
40
40
|
function applyCatalogAssignments<TApi extends Api>(model: Model<TApi>, catalog: Record<string, unknown>): void {
|
|
41
41
|
const serviceTierCost = objectPayload(catalog.serviceTierCost);
|
|
@@ -63,6 +63,12 @@ function applyCatalogAssignments<TApi extends Api>(model: Model<TApi>, catalog:
|
|
|
63
63
|
} else {
|
|
64
64
|
delete model.requiresCursorToolSchemaProjection;
|
|
65
65
|
}
|
|
66
|
+
const requiresToolResultImageHoisting = catalog.requiresToolResultImageHoisting;
|
|
67
|
+
if (requiresToolResultImageHoisting === true) {
|
|
68
|
+
model.requiresToolResultImageHoisting = true;
|
|
69
|
+
} else {
|
|
70
|
+
delete model.requiresToolResultImageHoisting;
|
|
71
|
+
}
|
|
66
72
|
const contextPromotionTarget = catalog.contextPromotionTarget;
|
|
67
73
|
if (typeof contextPromotionTarget === "string" && model.contextPromotionTarget === undefined) {
|
|
68
74
|
model.contextPromotionTarget = contextPromotionTarget;
|
package/src/compat/axes.ts
CHANGED
|
@@ -192,6 +192,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
192
192
|
"disable-adaptive-thinking": wire("disableAdaptiveThinking", ["anthropic"]),
|
|
193
193
|
"disable-strict-tools": wire("disableStrictTools", ["anthropic"]),
|
|
194
194
|
"escape-builtin-tool-names": wire("escapeBuiltinToolNames", ["anthropic"]),
|
|
195
|
+
"first-party-provider": wire("firstPartyProvider", ["anthropic"]),
|
|
195
196
|
"inject-claude-code-instruction": wire("injectClaudeCodeInstruction", ["anthropic"]),
|
|
196
197
|
"official-endpoint": wire("officialEndpoint", ["anthropic", "openai-responses"]),
|
|
197
198
|
"replay-unsigned-thinking": wire("replayUnsignedThinking", ["anthropic"]),
|
|
@@ -205,6 +206,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
205
206
|
"supports-mid-conversation-system": wire("supportsMidConversationSystem", ["anthropic"]),
|
|
206
207
|
"supports-mid-conversation-tool-changes": wire("supportsMidConversationToolChanges", ["anthropic"]),
|
|
207
208
|
"supports-per-message-effort": wire("supportsPerMessageEffort", ["anthropic"]),
|
|
209
|
+
"supports-server-compaction": wire("supportsServerCompaction", ["anthropic"]),
|
|
208
210
|
"supports-thinking-binding-controls": wire("supportsThinkingBindingControls", ["anthropic"]),
|
|
209
211
|
"supports-turn-scoped-system": wire("supportsTurnScopedSystem", ["anthropic"]),
|
|
210
212
|
|
|
@@ -285,6 +287,11 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
285
287
|
set: "catalog",
|
|
286
288
|
shape: "scalar",
|
|
287
289
|
},
|
|
290
|
+
"requires-tool-result-image-hoisting": {
|
|
291
|
+
key: "requiresToolResultImageHoisting",
|
|
292
|
+
set: "catalog",
|
|
293
|
+
shape: "scalar",
|
|
294
|
+
},
|
|
288
295
|
priority: { key: "priority", set: "catalog", shape: "scalar" },
|
|
289
296
|
"service-tier-cost": { key: "serviceTierCost", set: "catalog", shape: "object" },
|
|
290
297
|
"time-based-cost": { key: "timeBased", set: "catalog", shape: "object" },
|
package/src/compat/resolve.ts
CHANGED
|
@@ -843,6 +843,8 @@ function resolveAnthropicPolicy(
|
|
|
843
843
|
officialEndpoint: official,
|
|
844
844
|
signingEndpoint,
|
|
845
845
|
supportsContextManagement: true,
|
|
846
|
+
supportsServerCompaction: false,
|
|
847
|
+
firstPartyProvider: false,
|
|
846
848
|
supportsOutputEffort: true,
|
|
847
849
|
disableStrictTools: isAzure,
|
|
848
850
|
disableAdaptiveThinking: false,
|
|
@@ -7,6 +7,30 @@ class "anthropic" {
|
|
|
7
7
|
thinking-prefix-binding #true
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
+
// Server-side compaction (compact-2026-01-12) is a lineage capability: the
|
|
11
|
+
// documented model list is the adaptive-thinking generation onward (Opus
|
|
12
|
+
// 4.6+, Sonnet 4.6+, Fable/Mythos 5+). Whether a host delivers the beta is
|
|
13
|
+
// decided at request time from the effective endpoint, not here.
|
|
14
|
+
family "fable" {
|
|
15
|
+
revision ">=5" {
|
|
16
|
+
supports-server-compaction #true
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
family "mythos" {
|
|
20
|
+
revision ">=5" {
|
|
21
|
+
supports-server-compaction #true
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
family "opus" {
|
|
25
|
+
revision ">=4.6" {
|
|
26
|
+
supports-server-compaction #true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
family "sonnet" {
|
|
30
|
+
revision ">=4.6" {
|
|
31
|
+
supports-server-compaction #true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
10
34
|
on "anthropic" "cloudflare-ai-gateway" "google-vertex" {
|
|
11
35
|
family "fable" {
|
|
12
36
|
revision ">=5" {
|
|
@@ -15,6 +15,8 @@ provider "amazon-bedrock" {
|
|
|
15
15
|
}
|
|
16
16
|
class "openai" {
|
|
17
17
|
thinking-mode "effort"
|
|
18
|
+
// OpenAI models reject Converse image blocks nested inside toolResult content.
|
|
19
|
+
requires-tool-result-image-hoisting #true
|
|
18
20
|
}
|
|
19
21
|
class "deepseek" {
|
|
20
22
|
requires-reasoning-content-for-all-assistant-turns #true
|
|
@@ -28,6 +30,11 @@ provider "amazon-bedrock" {
|
|
|
28
30
|
class "unknown" {
|
|
29
31
|
thinking-efforts "minimal" "low" "medium" "high"
|
|
30
32
|
thinking-mode "budget"
|
|
33
|
+
// Opaque application-inference-profile ARNs carry no vendor signal, so an
|
|
34
|
+
// OpenAI-backed profile classifies here and would otherwise nest images in
|
|
35
|
+
// toolResult content and hit the same rejection. Hoisting is accepted by
|
|
36
|
+
// every Converse model measured, so it is the safe default for unknowns.
|
|
37
|
+
requires-tool-result-image-hoisting #true
|
|
31
38
|
}
|
|
32
39
|
// residue: taxonomy ranks and exact globs do not isolate these models.
|
|
33
40
|
models "moonshot.kimi-k2-thinking" {
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// Provider-wire compat for "anthropic"; regenerated from the frozen census using deployment contract selectors.
|
|
2
2
|
|
|
3
3
|
provider "anthropic" {
|
|
4
|
+
// First-party provider: models served through this provider reach the
|
|
5
|
+
// official API unless rerouted. A dedicated axis rather than
|
|
6
|
+
// `official-endpoint`, which stays URL-derived: a custom `baseUrl` on this
|
|
7
|
+
// provider must keep `officialEndpoint: false` (SDK `X-Api-Key`
|
|
8
|
+
// suppression and friends read that flag). The compaction transport
|
|
9
|
+
// combines this fact with a per-request effective-URL check, so it never
|
|
10
|
+
// authorizes a block on its own.
|
|
11
|
+
first-party-provider #true
|
|
4
12
|
class "anthropic" {
|
|
5
13
|
revision ">=3.7 <4.6" {
|
|
6
14
|
thinking-efforts "minimal" "low" "medium" "high" "xhigh"
|
|
@@ -16,6 +16,7 @@ provider "deepseek" {
|
|
|
16
16
|
// bare alias carries no family, and the retired `v4-flash`/`-vision-exp` ids
|
|
17
17
|
// are still accepted and billed at the Flash card.
|
|
18
18
|
models "deepseek-flash" "deepseek-v4-flash" "deepseek-v4-flash-vision-exp" {
|
|
19
|
+
clamp-output-to-model-max #true
|
|
19
20
|
time-based-cost {
|
|
20
21
|
off-peak-multiplier 0.5
|
|
21
22
|
peak-windows {
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
// Provider-wire compat for "opencode-go"; regenerated from the frozen census using deployment contract selectors.
|
|
2
2
|
|
|
3
3
|
provider "opencode-go" {
|
|
4
|
+
// The Flash lanes accept images despite their IDs lacking a vision suffix;
|
|
5
|
+
// verified against the gateway (unguessable pixel-rendered text read back
|
|
6
|
+
// verbatim). Mirrors the OpenRouter carve-out for deepseek-v4.1-flash.
|
|
7
|
+
// The modality is declared here as well: live gateway discovery seeds
|
|
8
|
+
// `input: ["text"]`, and the wire guard requires the declared modality, so
|
|
9
|
+
// clearing `strip-image-input` alone would leave the lane text-only.
|
|
10
|
+
models "deepseek-flash" "deepseek-v4.1-flash" {
|
|
11
|
+
input-modalities "text" "image"
|
|
12
|
+
strip-image-input #false
|
|
13
|
+
}
|
|
4
14
|
// Replaces the OpenCode reasoning-model whenThinking fallback object.
|
|
5
15
|
when-thinking {
|
|
6
16
|
requires-reasoning-content-for-tool-calls #true
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
// Provider-wire compat for "openrouter"; regenerated from the frozen census using deployment contract selectors.
|
|
2
2
|
|
|
3
3
|
provider "openrouter" {
|
|
4
|
+
// V4.1 Flash accepts images despite its ID lacking a vision suffix.
|
|
5
|
+
models "deepseek/deepseek-v4.1-flash" {
|
|
6
|
+
strip-image-input #false
|
|
7
|
+
}
|
|
4
8
|
// Replaces the OpenRouter provider wire-model-id dispatch branch.
|
|
5
9
|
wire-model-id-mode "openrouter"
|
|
6
10
|
// Replaces the strict-mode provider whitelist entry.
|