@oh-my-pi/pi-catalog 17.2.2 → 17.2.4
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 +19 -0
- package/dist/types/provider-models/descriptors.d.ts +9 -0
- package/dist/types/provider-models/ollama.d.ts +13 -0
- package/dist/types/provider-models/openai-compat.d.ts +17 -0
- package/dist/types/types.d.ts +16 -1
- package/package.json +3 -3
- package/src/compat/anthropic.ts +1 -0
- package/src/model-thinking.ts +11 -6
- package/src/models.json +780 -203
- package/src/provider-models/descriptors.ts +9 -0
- package/src/provider-models/ollama.ts +37 -6
- package/src/provider-models/openai-compat.ts +189 -0
- package/src/types.ts +16 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [17.2.4] - 2026-08-01
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `AnthropicCompat.streamIdleTimeoutMs` and propagated it through `buildAnthropicCompat` so direct Anthropic provider streams can configure their inter-event idle watchdog.
|
|
10
|
+
- Fixed Ollama Cloud DeepSeek V4 Pro/Flash models (including dated tag variants such as `deepseek-v4-flash:0731`) reporting an incorrect max-output-tokens figure by pinning it to the deployment's enforced 65536-token output ceiling ([#7266](https://github.com/can1357/oh-my-pi/issues/7266)).
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Fixed `gen:models` Codex discovery to union models across every stored OAuth account and fail closed on partial resolution, matching runtime discovery ([#6265](https://github.com/can1357/oh-my-pi/issues/6265)); restored the bundled `gpt-5.4`, `gpt-5.6-sol`, and `gpt-5.3-codex-spark` entries a single-account regen had dropped.
|
|
15
|
+
- Fixed `google-antigravity` models always reporting $0 cost: Antigravity discovery carries no pricing, so the generator now back-fills each model with its Google list price (Gemini ids from the `google` provider, including `-preview` id aliases; Claude ids from `google-vertex`, falling back to `anthropic`).
|
|
16
|
+
- Fixed OpenRouter `deepseek/deepseek-v4-flash-0731` exposing only `high` thinking effort by consuming the live `reasoning.supported_efforts` and `default_effort` metadata and bundling its `low`/`high`/`max` ladder. ([#7307](https://github.com/can1357/oh-my-pi/issues/7307))
|
|
17
|
+
|
|
18
|
+
## [17.2.3] - 2026-08-01
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
- Added support for the ai& provider (`aiand`), an OpenAI-compatible inference API with dynamic model discovery (context windows, capabilities, reasoning efforts, and USD pricing from `/v1/models`) and API-key authentication via the `AIAND_API_KEY` environment variable.
|
|
23
|
+
|
|
5
24
|
## [17.2.2] - 2026-07-31
|
|
6
25
|
|
|
7
26
|
### Added
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { ModelManagerConfig, ProviderCatalogEntry, ProviderDescriptor } from "./descriptor-types.js";
|
|
9
9
|
export declare const CATALOG_PROVIDERS: readonly [{
|
|
10
|
+
readonly id: "aiand";
|
|
11
|
+
readonly defaultModel: "moonshotai/kimi-k2.7-code";
|
|
12
|
+
readonly envVars: readonly ["AIAND_API_KEY"];
|
|
13
|
+
readonly createModelManagerOptions: (config: ModelManagerConfig) => import("../index.js").ModelManagerOptions<"openai-completions", unknown>;
|
|
14
|
+
readonly dynamicModelsAuthoritative: true;
|
|
15
|
+
readonly catalogDiscovery: {
|
|
16
|
+
readonly label: "ai&";
|
|
17
|
+
};
|
|
18
|
+
}, {
|
|
10
19
|
readonly id: "aimlapi";
|
|
11
20
|
readonly defaultModel: "gpt-5.5-2026-04-23";
|
|
12
21
|
readonly envVars: readonly ["AIMLAPI_API_KEY"];
|
|
@@ -5,5 +5,18 @@ export interface OllamaCloudModelManagerConfig {
|
|
|
5
5
|
baseUrl?: string;
|
|
6
6
|
fetch?: FetchImpl;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Output-token ceiling that Ollama Cloud enforces for the DeepSeek V4 Pro/Flash
|
|
10
|
+
* deployments: `/api/chat` rejects `num_predict` above it with HTTP 400
|
|
11
|
+
* (`max_tokens (...) exceeds model's maximum output tokens (65536)`) even though
|
|
12
|
+
* the model pages advertise a 1M context / 384K output. Ollama's `/api/show`
|
|
13
|
+
* never reports this cap, so the catalog pins it for the affected models
|
|
14
|
+
* (ollama/ollama#16890, #7266). The wire layer clamps `num_predict` to the same
|
|
15
|
+
* value (`OLLAMA_CLOUD_NUM_PREDICT_CAP` in `packages/ai/src/providers/ollama.ts`,
|
|
16
|
+
* #3392/#3394).
|
|
17
|
+
*/
|
|
18
|
+
export declare const OLLAMA_CLOUD_MAX_OUTPUT_TOKENS = 65536;
|
|
19
|
+
/** Whether an Ollama Cloud model id (tagged or not) enforces the 65536 output cap. */
|
|
20
|
+
export declare function isOllamaCloudOutputCapped(id: string): boolean;
|
|
8
21
|
export declare function normalizeOllamaCloudBaseUrl(baseUrl?: string): string;
|
|
9
22
|
export declare function ollamaCloudModelManagerOptions(config?: OllamaCloudModelManagerConfig): ModelManagerOptions<"ollama-chat">;
|
|
@@ -443,6 +443,23 @@ export interface SakanaModelManagerConfig {
|
|
|
443
443
|
fetch?: FetchImpl;
|
|
444
444
|
}
|
|
445
445
|
export declare function sakanaModelManagerOptions(config?: SakanaModelManagerConfig): ModelManagerOptions<"openai-responses">;
|
|
446
|
+
/**
|
|
447
|
+
* Documented ai& catalog (docs.aiand.com/models/catalog, 2026-08) bundled so
|
|
448
|
+
* the provider is usable when generation and first boot have no live key.
|
|
449
|
+
* The org-scoped `/v1/models` response is authoritative once discovery runs.
|
|
450
|
+
*/
|
|
451
|
+
export declare const AIAND_STATIC_MODELS: readonly ModelSpec<"openai-completions">[];
|
|
452
|
+
export interface AiandModelManagerConfig {
|
|
453
|
+
apiKey?: string;
|
|
454
|
+
baseUrl?: string;
|
|
455
|
+
fetch?: FetchImpl;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* ai& (aiand.com) model manager: OpenAI-compatible chat completions with an
|
|
459
|
+
* org-scoped `/v1/models` catalog carrying context, capability, effort, and
|
|
460
|
+
* pricing metadata, so discovery is authoritative over the bundled seed.
|
|
461
|
+
*/
|
|
462
|
+
export declare function aiandModelManagerOptions(config?: AiandModelManagerConfig): ModelManagerOptions<"openai-completions">;
|
|
446
463
|
export interface QwenPortalModelManagerConfig {
|
|
447
464
|
apiKey?: string;
|
|
448
465
|
baseUrl?: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -362,6 +362,15 @@ export interface OpenAICompat {
|
|
|
362
362
|
* that proxy gateways (Vertex AI, AWS Bedrock-style fronts, etc.) reject.
|
|
363
363
|
*/
|
|
364
364
|
export interface AnthropicCompat {
|
|
365
|
+
/**
|
|
366
|
+
* Stream-watchdog idle-timeout fallback in ms for slow reasoning hosts.
|
|
367
|
+
* Set to 0 to disable the inter-event idle watchdog entirely, matching
|
|
368
|
+
* `OpenAICompat.streamIdleTimeoutMs`.
|
|
369
|
+
*
|
|
370
|
+
* When unset, direct Anthropic streams use `PI_STREAM_IDLE_TIMEOUT_MS`,
|
|
371
|
+
* then the legacy `PI_OPENAI_STREAM_IDLE_TIMEOUT_MS` alias, then 300s.
|
|
372
|
+
*/
|
|
373
|
+
streamIdleTimeoutMs?: number;
|
|
365
374
|
/**
|
|
366
375
|
* Drop the top-level `strict: true` field on tool definitions. Vertex AI's
|
|
367
376
|
* Anthropic-compatible endpoint rejects unknown tool fields with
|
|
@@ -605,7 +614,13 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
|
|
|
605
614
|
*/
|
|
606
615
|
export type ResolvedOpenRouterCompat = ResolvedOpenAICompat & ResolvedOpenAIResponsesCompat;
|
|
607
616
|
/** Fully-resolved anthropic-messages compat view (same contract as `ResolvedOpenAICompat`). */
|
|
608
|
-
export type ResolvedAnthropicCompat = Required<AnthropicCompat
|
|
617
|
+
export type ResolvedAnthropicCompat = Required<Omit<AnthropicCompat, "streamIdleTimeoutMs">> & {
|
|
618
|
+
/**
|
|
619
|
+
* Stream-watchdog idle-timeout fallback in ms for slow reasoning hosts; 0 disables the idle watchdog.
|
|
620
|
+
* Undefined defers to `PI_STREAM_IDLE_TIMEOUT_MS`, then the legacy
|
|
621
|
+
* `PI_OPENAI_STREAM_IDLE_TIMEOUT_MS` alias, then 300s.
|
|
622
|
+
*/
|
|
623
|
+
streamIdleTimeoutMs?: number;
|
|
609
624
|
/**
|
|
610
625
|
* The configured endpoint is the official first-party Anthropic API
|
|
611
626
|
* (https + exact `api.anthropic.com` host; a missing baseUrl counts as
|
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.2.
|
|
4
|
+
"version": "17.2.4",
|
|
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": "Can Boluk",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@bufbuild/protobuf": "^2.12.1",
|
|
38
|
-
"@oh-my-pi/pi-utils": "17.2.
|
|
38
|
+
"@oh-my-pi/pi-utils": "17.2.4",
|
|
39
39
|
"arktype": "2.2.3",
|
|
40
40
|
"zod": "^4"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@oh-my-pi/pi-ai": "17.2.
|
|
43
|
+
"@oh-my-pi/pi-ai": "17.2.4",
|
|
44
44
|
"@types/bun": "^1.3.14"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
package/src/compat/anthropic.ts
CHANGED
|
@@ -172,6 +172,7 @@ export function buildAnthropicCompat(spec: ModelSpec<"anthropic-messages">): Res
|
|
|
172
172
|
// id or baseUrl marker.
|
|
173
173
|
replayUnsignedThinking: !signingEndpoint && (Boolean(spec.reasoning) || modelMatchesHost(spec, "deepseekFamily")),
|
|
174
174
|
escapeBuiltinToolNames: modelMatchesHost(spec, "umans"),
|
|
175
|
+
streamIdleTimeoutMs: spec.compat?.streamIdleTimeoutMs,
|
|
175
176
|
};
|
|
176
177
|
applyCompatOverrides(compat, spec.compat);
|
|
177
178
|
return compat;
|
package/src/model-thinking.ts
CHANGED
|
@@ -62,8 +62,8 @@ const GEMINI_3_FLASH_EFFORTS: readonly Effort[] = [Effort.Minimal, Effort.Low, E
|
|
|
62
62
|
const GPT_5_2_PLUS_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High, Effort.XHigh];
|
|
63
63
|
const GPT_5_1_CODEX_MINI_EFFORTS: readonly Effort[] = [Effort.Medium, Effort.High];
|
|
64
64
|
const LOW_MEDIUM_HIGH_REASONING_EFFORTS: readonly Effort[] = [Effort.Low, Effort.Medium, Effort.High];
|
|
65
|
-
/** Kimi K3
|
|
66
|
-
const
|
|
65
|
+
/** Wire-exact `low`/`high`/`max` scale used by Kimi K3 and OpenRouter DeepSeek V4 Flash 0731. */
|
|
66
|
+
const LOW_HIGH_MAX_REASONING_EFFORTS: readonly Effort[] = [Effort.Low, Effort.High, Effort.Max];
|
|
67
67
|
/** Wire-exact two-tier scale (`high`/`max`): GLM-5.2 on Z.ai/Umans/Ollama Cloud/Baseten, Sakana Fugu, DeepSeek. */
|
|
68
68
|
const HIGH_MAX_REASONING_EFFORTS: readonly Effort[] = [Effort.High, Effort.Max];
|
|
69
69
|
/** OpenRouter's DeepSeek route accepts only `high`. */
|
|
@@ -339,7 +339,7 @@ function getModelDefinedEfforts<TApi extends Api>(
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
if (isKimiK3ModelId(spec.id)) {
|
|
342
|
-
return
|
|
342
|
+
return LOW_HIGH_MAX_REASONING_EFFORTS;
|
|
343
343
|
}
|
|
344
344
|
if (isSakanaFuguReasoningModel(spec)) {
|
|
345
345
|
return HIGH_MAX_REASONING_EFFORTS;
|
|
@@ -366,9 +366,14 @@ function getModelDefinedEfforts<TApi extends Api>(
|
|
|
366
366
|
return OLLAMA_REASONING_EFFORTS;
|
|
367
367
|
}
|
|
368
368
|
if (isOpenAICompatReasoningApi(spec.api) && isDeepseekReasoningModel(spec)) {
|
|
369
|
-
//
|
|
370
|
-
//
|
|
371
|
-
|
|
369
|
+
// OpenRouter generally exposes only high for DeepSeek, but V4 Flash 0731
|
|
370
|
+
// advertises and accepts the wire-exact low/high/max ladder.
|
|
371
|
+
if (isOpenRouterThinkingFormat(compat)) {
|
|
372
|
+
return bareModelId(spec.id) === "deepseek-v4-flash-0731"
|
|
373
|
+
? LOW_HIGH_MAX_REASONING_EFFORTS
|
|
374
|
+
: HIGH_ONLY_REASONING_EFFORTS;
|
|
375
|
+
}
|
|
376
|
+
return HIGH_MAX_REASONING_EFFORTS;
|
|
372
377
|
}
|
|
373
378
|
if (spec.provider === "baseten" && isOpenAIGptOssModelId(spec.id)) {
|
|
374
379
|
// Baseten's gpt-oss router mirrors its GLM route: high/max only.
|