omk-ai 1.2.0 → 1.2.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 +24 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.generated.d.ts +1463 -362
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +1299 -411
- package/dist/models.generated.js.map +1 -1
- package/dist/models.js +4 -1
- package/dist/models.js.map +1 -1
- package/dist/provider-response-types.d.ts +15 -0
- package/dist/provider-response-types.d.ts.map +1 -0
- package/dist/provider-response-types.js +2 -0
- package/dist/provider-response-types.js.map +1 -0
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +2 -23
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/bedrock-thinking.d.ts.map +1 -1
- package/dist/providers/bedrock-thinking.js +2 -2
- package/dist/providers/bedrock-thinking.js.map +1 -1
- package/dist/providers/google-shared.d.ts.map +1 -1
- package/dist/providers/google-shared.js +13 -6
- package/dist/providers/google-shared.js.map +1 -1
- package/dist/providers/grok-thinking.d.ts.map +1 -1
- package/dist/providers/grok-thinking.js +10 -0
- package/dist/providers/grok-thinking.js.map +1 -1
- package/dist/providers/openai-completions.d.ts.map +1 -1
- package/dist/providers/openai-completions.js +15 -25
- package/dist/providers/openai-completions.js.map +1 -1
- package/dist/providers/openai-responses-shared.d.ts.map +1 -1
- package/dist/providers/openai-responses-shared.js +10 -23
- package/dist/providers/openai-responses-shared.js.map +1 -1
- package/dist/providers/provider-stop-reasons.d.ts +9 -0
- package/dist/providers/provider-stop-reasons.d.ts.map +1 -0
- package/dist/providers/provider-stop-reasons.js +63 -0
- package/dist/providers/provider-stop-reasons.js.map +1 -0
- package/dist/types.d.ts +4 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/claude-code-identity.d.ts +4 -4
- package/dist/utils/claude-code-identity.d.ts.map +1 -1
- package/dist/utils/claude-code-identity.js +1 -1
- package/dist/utils/claude-code-identity.js.map +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +9 -21
- package/dist/utils/validation.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.2] - 2026-09-23
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Lockstep version alignment with the OMK packages. This cycle's changes live in `open-multi-agent-kit`.
|
|
8
|
+
|
|
9
|
+
## [1.2.1] - 2026-09-23
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Claude Opus 5.5 and GPT-6 Sol/Luna join the generated catalog. Each route declares which thinking levels its wire payload really carries, so a selector whose effort would be collapsed silently is rejected at plan time instead of clamped after the fact.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Claude Code CLI identity refreshed to `2.1.280` — the value Anthropic gates newer models on — including the `custom-provider-anthropic` example, which carries the same canonical string. Refresh with `npm view @anthropic-ai/claude-code version`.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Google history keeps signed empty text/thinking blocks, so a signature-bearing empty part replays instead of failing the request (#7362).
|
|
22
|
+
- Switching the model mid-session no longer emits a `tool_call_id` protocol error (#6854).
|
|
23
|
+
- Anthropic one-hour cache writes are priced at 2x input, matching the published cache-write rate (#5738).
|
|
24
|
+
- Empty OpenAI Responses thinking blocks are omitted on replay, and the Antigravity context override block is restored.
|
|
25
|
+
- Kimi K2.7 normalizes to the canonical coding model id.
|
|
26
|
+
|
|
3
27
|
## [1.2.0] - 2026-09-20
|
|
4
28
|
|
|
5
29
|
### Added
|
package/dist/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings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AAkB,CAgBpB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,SAAS,GAAG,EAC9C,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,EACjC,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAC/B,OAAO,CAGT","sourcesContent":["import { MODELS } from \"./models.generated.ts\";\nimport { supportsAdaptiveThinking } from \"./providers/bedrock-thinking.ts\";\nimport { applyGrokThinking } from \"./providers/grok-thinking.ts\";\nimport type { Api, KnownProvider, Model, ModelThinkingLevel, Usage } from \"./types.ts\";\n\nconst modelRegistry: Map<string, Map<string, Model<Api>>> = new Map();\n\n// Initialize registry from MODELS on module load\nfor (const [provider, models] of Object.entries(MODELS)) {\n\tconst providerModels = new Map<string, Model<Api>>();\n\tfor (const [id, model] of Object.entries(models)) {\n\t\tconst generated = model as Model<Api>;\n\t\tconst registered = generated.id.toLowerCase().includes(\"gpt-5.6\")\n\t\t\t? { ...generated, contextWindow: 1_000_000 }\n\t\t\t: generated;\n\t\tproviderModels.set(id, provider === \"xai\" ? applyGrokThinking(registered) : registered);\n\t}\n\tmodelRegistry.set(provider, providerModels);\n}\n\ntype ModelApi<\n\tTProvider extends KnownProvider,\n\tTModelId extends keyof (typeof MODELS)[TProvider],\n> = (typeof MODELS)[TProvider][TModelId] extends { api: infer TApi } ? (TApi extends Api ? TApi : never) : never;\n\nexport function getModel<TProvider extends KnownProvider, TModelId extends keyof (typeof MODELS)[TProvider]>(\n\tprovider: TProvider,\n\tmodelId: TModelId,\n): Model<ModelApi<TProvider, TModelId>> {\n\tconst providerModels = modelRegistry.get(provider);\n\treturn providerModels?.get(modelId as string) as Model<ModelApi<TProvider, TModelId>>;\n}\n\nexport function getProviders(): KnownProvider[] {\n\treturn Array.from(modelRegistry.keys()) as KnownProvider[];\n}\n\nexport function getModels<TProvider extends KnownProvider>(\n\tprovider: TProvider,\n): Model<ModelApi<TProvider, keyof (typeof MODELS)[TProvider]>>[] {\n\tconst models = modelRegistry.get(provider);\n\treturn models ? (Array.from(models.values()) as Model<ModelApi<TProvider, keyof (typeof MODELS)[TProvider]>>[]) : [];\n}\n\nexport function calculateCost<TApi extends Api>(model: Model<TApi>, usage: Usage): Usage[\"cost\"] {\n\t// Anthropic charges 2x base input for 1h cache writes.\n\tconst longWrite = usage.cacheWrite1h ?? 0;\n\tconst shortWrite = usage.cacheWrite - longWrite;\n\tusage.cost.input = (model.cost.input / 1000000) * usage.input;\n\tusage.cost.output = (model.cost.output / 1000000) * usage.output;\n\tusage.cost.cacheRead = (model.cost.cacheRead / 1000000) * usage.cacheRead;\n\tusage.cost.cacheWrite = (model.cost.cacheWrite * shortWrite + model.cost.input * 2 * longWrite) / 1000000;\n\tusage.cost.total = usage.cost.input + usage.cost.output + usage.cost.cacheRead + usage.cost.cacheWrite;\n\treturn usage.cost;\n}\n\nconst EXTENDED_THINKING_LEVELS: ModelThinkingLevel[] = [\n\t\"off\",\n\t\"minimal\",\n\t\"low\",\n\t\"medium\",\n\t\"high\",\n\t\"xhigh\",\n\t\"max\",\n\t\"ultra\",\n];\n\n/**\n * Whether this model's reasoning transport silently collapses every top-tier\n * level (xhigh/max/ultra) onto the \"high\" wire value. When true, offering\n * those levels would show a label that changes nothing — they must be hidden.\n *\n * Only apis whose own adapters perform the collapse are listed; effort-\n * forwarding apis pass the mapped value verbatim, so the level is real there.\n */\nfunction collapsesTopTierThinkingLevels<TApi extends Api>(model: Model<TApi>): boolean {\n\tif (model.api === \"anthropic-messages\") {\n\t\tconst compat = model.compat as { forceAdaptiveThinking?: boolean } | undefined;\n\t\treturn compat?.forceAdaptiveThinking !== true;\n\t}\n\tif (model.api === \"bedrock-converse-stream\") {\n\t\tconst id = model.id.toLowerCase();\n\t\tconst name = model.name?.toLowerCase() ?? \"\";\n\t\tconst isClaude =\n\t\t\tid.includes(\"anthropic.claude\") ||\n\t\t\tid.includes(\"anthropic/claude\") ||\n\t\t\tname.includes(\"anthropic.claude\") ||\n\t\t\tname.includes(\"anthropic/claude\") ||\n\t\t\tname.includes(\"claude\");\n\t\treturn isClaude && !supportsAdaptiveThinking(model.id, model.name);\n\t}\n\treturn model.api === \"google-generative-ai\" || model.api === \"google-vertex\";\n}\n\nexport function getSupportedThinkingLevels<TApi extends Api>(model: Model<TApi>): ModelThinkingLevel[] {\n\tif (!model.reasoning) return [\"off\"];\n\n\tconst collapsesTopTier = collapsesTopTierThinkingLevels(model);\n\n\treturn EXTENDED_THINKING_LEVELS.filter((level) => {\n\t\tconst mapped = model.thinkingLevelMap?.[level];\n\t\tif (mapped === null) return false;\n\t\t// xhigh, max, and ultra are top-tier levels only exposed when a model explicitly maps them.\n\t\tif (level === \"xhigh\" || level === \"max\" || level === \"ultra\") {\n\t\t\t// Hide levels whose wire payload is identical to \"high\" (budget-path\n\t\t\t// collapse) — the picker must not promise effort that never ships.\n\t\t\tif (collapsesTopTier) return false;\n\t\t\treturn mapped !== undefined;\n\t\t}\n\t\treturn true;\n\t});\n}\n\nexport function clampThinkingLevel<TApi extends Api>(\n\tmodel: Model<TApi>,\n\tlevel: ModelThinkingLevel,\n): ModelThinkingLevel {\n\tconst availableLevels = getSupportedThinkingLevels(model);\n\tif (availableLevels.includes(level)) return level;\n\n\tconst requestedIndex = EXTENDED_THINKING_LEVELS.indexOf(level);\n\tif (requestedIndex === -1) return availableLevels[0] ?? \"off\";\n\n\tfor (let i = requestedIndex; i < EXTENDED_THINKING_LEVELS.length; i++) {\n\t\tconst candidate = EXTENDED_THINKING_LEVELS[i];\n\t\tif (availableLevels.includes(candidate)) return candidate;\n\t}\n\tfor (let i = requestedIndex - 1; i >= 0; i--) {\n\t\tconst candidate = EXTENDED_THINKING_LEVELS[i];\n\t\tif (availableLevels.includes(candidate)) return candidate;\n\t}\n\treturn availableLevels[0] ?? \"off\";\n}\n\n/**\n * Check if two models are equal by comparing both their id and provider.\n * Returns false if either model is null or undefined.\n */\nexport function modelsAreEqual<TApi extends Api>(\n\ta: Model<TApi> | null | undefined,\n\tb: Model<TApi> | null | undefined,\n): boolean {\n\tif (!a || !b) return false;\n\treturn a.id === b.id && a.provider === b.provider;\n}\n"]}
|