@linxiraos/pi-catalog 1.0.4 → 1.0.6
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 +33 -3
- package/dist/types/build.d.ts +14 -0
- package/dist/types/compat/anthropic.d.ts +18 -0
- package/dist/types/compat/apply.d.ts +7 -0
- package/dist/types/compat/bedrock.d.ts +3 -0
- package/dist/types/compat/devin.d.ts +9 -0
- package/dist/types/compat/openai.d.ts +28 -0
- package/dist/types/discovery/antigravity.d.ts +70 -0
- package/dist/types/discovery/codex.d.ts +36 -0
- package/dist/types/discovery/cursor-gen/agent_pb.d.ts +16769 -0
- package/dist/types/discovery/cursor.d.ts +23 -0
- package/dist/types/discovery/devin-gen/buf/validate/validate_pb.d.ts +1715 -0
- package/dist/types/discovery/devin-gen/exa/analytics_pb/analytics_pb.d.ts +693 -0
- package/dist/types/discovery/devin-gen/exa/api_server_pb/api_server_pb.d.ts +9158 -0
- package/dist/types/discovery/devin-gen/exa/auth_pb/auth_pb.d.ts +52 -0
- package/dist/types/discovery/devin-gen/exa/auto_cascade_common_pb/auto_cascade_common_pb.d.ts +276 -0
- package/dist/types/discovery/devin-gen/exa/bug_checker_pb/bug_checker_pb.d.ts +78 -0
- package/dist/types/discovery/devin-gen/exa/cascade_plugins_pb/cascade_plugins_pb.d.ts +999 -0
- package/dist/types/discovery/devin-gen/exa/chat_pb/chat_pb.d.ts +1704 -0
- package/dist/types/discovery/devin-gen/exa/code_edit/code_edit_pb/code_edit_pb.d.ts +656 -0
- package/dist/types/discovery/devin-gen/exa/codeium_common_pb/codeium_common_pb.d.ts +15014 -0
- package/dist/types/discovery/devin-gen/exa/context_module_pb/context_module_pb.d.ts +607 -0
- package/dist/types/discovery/devin-gen/exa/cortex_pb/cortex_pb.d.ts +11830 -0
- package/dist/types/discovery/devin-gen/exa/diff_action_pb/diff_action_pb.d.ts +248 -0
- package/dist/types/discovery/devin-gen/exa/index_pb/index_pb.d.ts +1747 -0
- package/dist/types/discovery/devin-gen/exa/knowledge_base_pb/knowledge_base_pb.d.ts +509 -0
- package/dist/types/discovery/devin-gen/exa/language_server_pb/language_server_pb.d.ts +9048 -0
- package/dist/types/discovery/devin-gen/exa/opensearch_clients_pb/opensearch_clients_pb.d.ts +1760 -0
- package/dist/types/discovery/devin-gen/exa/prompt_pb/prompt_pb.d.ts +286 -0
- package/dist/types/discovery/devin-gen/exa/reactive_component_pb/reactive_component_pb.d.ts +405 -0
- package/dist/types/discovery/devin-gen/exa/trust_pb/trust_pb.d.ts +582 -0
- package/dist/types/discovery/devin.d.ts +24 -0
- package/dist/types/discovery/gemini.d.ts +25 -0
- package/dist/types/discovery/gitlab-duo-workflow.d.ts +30 -0
- package/dist/types/discovery/index.d.ts +5 -0
- package/dist/types/discovery/openai-compatible.d.ts +89 -0
- package/dist/types/effort.d.ts +10 -0
- package/dist/types/fireworks-model-id.d.ts +23 -0
- package/dist/types/hosts.d.ts +164 -0
- package/dist/types/identity/bundled.d.ts +3 -0
- package/dist/types/identity/classify.d.ts +69 -0
- package/dist/types/identity/dialect.d.ts +3 -0
- package/dist/types/identity/family.d.ts +210 -0
- package/dist/types/identity/id.d.ts +12 -0
- package/dist/types/identity/index.d.ts +8 -0
- package/dist/types/identity/markers.d.ts +4 -0
- package/dist/types/identity/priority.d.ts +1 -0
- package/dist/types/identity/reference.d.ts +29 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/model-cache.d.ts +23 -0
- package/dist/types/model-manager.d.ts +77 -0
- package/dist/types/model-thinking.d.ts +66 -0
- package/dist/types/models.d.ts +14 -0
- package/dist/types/openai-pricing.d.ts +17 -0
- package/dist/types/provider-models/bundled-references.d.ts +13 -0
- package/dist/types/provider-models/cache-provider-id.d.ts +9 -0
- package/dist/types/provider-models/descriptor-types.d.ts +76 -0
- package/dist/types/provider-models/descriptors.d.ts +504 -0
- package/dist/types/provider-models/google.d.ts +27 -0
- package/dist/types/provider-models/index.d.ts +7 -0
- package/dist/types/provider-models/ollama.d.ts +22 -0
- package/dist/types/provider-models/openai-compat.d.ts +644 -0
- package/dist/types/provider-models/special.d.ts +53 -0
- package/dist/types/types.d.ts +830 -0
- package/dist/types/utils.d.ts +20 -0
- package/dist/types/variant-collapse.d.ts +133 -0
- package/dist/types/wire/alibaba-token-plan.d.ts +22 -0
- package/dist/types/wire/codex.d.ts +45 -0
- package/dist/types/wire/coreweave.d.ts +12 -0
- package/dist/types/wire/gemini-headers.d.ts +62 -0
- package/dist/types/wire/github-copilot.d.ts +47 -0
- package/package.json +101 -100
- package/src/compat/openai.ts +54 -11
- package/src/discovery/codex.ts +3 -1
- package/src/hosts.ts +1 -1
- package/src/identity/family.ts +47 -1
- package/src/model-thinking.ts +30 -5
- package/src/models.json +2834 -810
- package/src/openai-pricing.ts +29 -0
- package/src/provider-models/cache-provider-id.ts +14 -0
- package/src/provider-models/descriptors.ts +3 -3
- package/src/provider-models/openai-compat.ts +117 -53
- package/src/types.ts +15 -0
- package/src/wire/codex.ts +3 -0
- package/src/wire/github-copilot.ts +32 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
-
## [1.0.
|
|
5
|
+
## [1.0.6] - 2026-08-17
|
|
6
|
+
|
|
7
|
+
## [17.3.5] - 2026-08-16
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Added support for GLM-5.3 on the z.AI provider, featuring a unified low/high/max reasoning-effort ladder across all hosts, mandatory thinking mode, 1M context, and default-model status for the z.AI provider.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Switched the paid xAI provider (xai / XAI_API_KEY) from Chat Completions to the OpenAI Responses API, aligning it with SuperGrok (xai-oauth) for prompt-cache affinity, reasoning-effort handling, and encrypted-reasoning replay.
|
|
16
|
+
- Changed the paid xAI (XAI_API_KEY) default model to grok-4.5.
|
|
17
|
+
- Changed the SuperGrok (xai-oauth) default model to grok-4.5.
|
|
18
|
+
- Improved reasoning continuity for xAI models by requesting and replaying encrypted reasoning content across multi-turn Responses API calls.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Fixed Codex Daybreak Blue and Red model discovery reporting zero token prices, which incorrectly labeled the models as free in the model picker.
|
|
23
|
+
- Fixed Baseten's moonshotai/Kimi-K3 catalog metadata so its low/high/max thinking levels are available.
|
|
24
|
+
- Fixed opencode-go/deepseek-v4-flash Responses requests sending forced named tool_choice selectors that are rejected while thinking mode is active.
|
|
25
|
+
|
|
26
|
+
## [17.3.4] - 2026-08-14
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Added wire constants for Codex V2 remote-compaction feature negotiation.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Fixed raw `COPILOT_GITHUB_TOKEN` credentials skipping plan-specific endpoint discovery, which routed GitHub Copilot Business model requests to the personal endpoint and returned HTTP 403. The GitHub Copilot model cache is now scoped per credential, so switching the token no longer serves another account's stale endpoint for the cache TTL ([#8507](https://github.com/can1357/oh-my-pi/issues/8507)).
|
|
35
|
+
- Fixed the OpenRouter `deepseek/deepseek-v4-pro-0813` route silently clamping the reasoning effort to `high`: the dated SKU advertises (and accepts) the wire-exact `low`/`high`/`max` ladder, so its effort override no longer collapses to `high`-only. The undated `deepseek/deepseek-v4-pro` OpenRouter route stays `high`-only. ([#8517](https://github.com/can1357/oh-my-pi/issues/8517))
|
|
6
36
|
|
|
7
37
|
## [17.3.2] - 2026-08-13
|
|
8
38
|
|
|
@@ -1072,10 +1102,10 @@
|
|
|
1072
1102
|
|
|
1073
1103
|
## [1.0.1] - 2026-08-14
|
|
1074
1104
|
|
|
1075
|
-
- Reset the version to 1.0.0 and republished under the `@linxiraos/*` scope, breaking from the `@
|
|
1105
|
+
- Reset the version to 1.0.0 and republished under the `@linxiraos/*` scope, breaking from the `@linxiraos` version lineage.
|
|
1076
1106
|
|
|
1077
1107
|
## [1.0.0] - 2026-08-13
|
|
1078
1108
|
|
|
1079
1109
|
### Changed
|
|
1080
1110
|
|
|
1081
|
-
- Reset the version to 1.0.0 and republished under the `@linxiraos/*` scope, breaking from the `@
|
|
1111
|
+
- Reset the version to 1.0.0 and republished under the `@linxiraos/*` scope, breaking from the `@linxiraos` version lineage.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The single Model constructor. Resolution order is a dependency chain, each
|
|
3
|
+
* step materialized exactly once per spec:
|
|
4
|
+
*
|
|
5
|
+
* 1. compat — URL/provider/id detection resolved into a complete record;
|
|
6
|
+
* 2. thinking — derived from identity + resolved compat (or trusted verbatim
|
|
7
|
+
* when the spec carries explicit metadata);
|
|
8
|
+
*
|
|
9
|
+
* Request handlers read fields — they never detect, parse ids, or allocate
|
|
10
|
+
* compat per request.
|
|
11
|
+
*/
|
|
12
|
+
import type { Api, CompatOf, Model, ModelSpec } from "./types.js";
|
|
13
|
+
export declare function buildModel<TApi extends Api>(spec: ModelSpec<TApi>): Model<TApi>;
|
|
14
|
+
export declare function buildCompat(spec: ModelSpec<Api>): CompatOf<Api>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ModelSpec, ResolvedAnthropicCompat } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Official first-party Anthropic API. A missing baseUrl is official on purpose:
|
|
4
|
+
* request dispatch falls back to `https://api.anthropic.com`. This is the one
|
|
5
|
+
* auth-sensitive host check — OAuth credentials are attached based on it — so
|
|
6
|
+
* it requires the exact origin or a path boundary (`/`) after it; a bare
|
|
7
|
+
* prefix check would accept lookalikes like `https://api.anthropic.com.evil.com`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isOfficialAnthropicApiUrl(baseUrl?: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Known non-official URLs that enforce Anthropic thinking signatures on replay.
|
|
12
|
+
*
|
|
13
|
+
* Runtime routing calls this with the effective URL because a model's resolved
|
|
14
|
+
* compat can be stale after Foundry or a provider base-URL override reroutes it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isAnthropicSigningProxyUrl(baseUrl?: string): boolean;
|
|
17
|
+
/** Build the resolved anthropic-messages compat record for a model spec. */
|
|
18
|
+
export declare function buildAnthropicCompat(spec: ModelSpec<"anthropic-messages">): ResolvedAnthropicCompat;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Assign defined override values onto a freshly-built resolved compat record,
|
|
3
|
+
* in place. Keys the record doesn't declare are ignored (loosely-typed config
|
|
4
|
+
* may carry junk). `buildModel` is the only intended caller — the record being
|
|
5
|
+
* mutated is the single per-model allocation; nothing here runs per request.
|
|
6
|
+
*/
|
|
7
|
+
export declare function applyCompatOverrides(compat: object, overrides: object | undefined): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ModelSpec, ResolvedDevinCompat } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve devin-agent (Codeium Cascade) compat. Cascade has no wire
|
|
4
|
+
* reasoning/effort field — effort is selected by routing to a sibling model id
|
|
5
|
+
* (the `thinking.effortRouting` baked by variant-collapse). So the thinking
|
|
6
|
+
* deriver must never fabricate an effort ladder from identity for these models;
|
|
7
|
+
* only explicit routed metadata counts.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildDevinCompat(_spec: ModelSpec<"devin-agent">): ResolvedDevinCompat;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ModelSpec, OpenAICompat, ResolvedOpenAICompat, ResolvedOpenAIResponsesCompat, ResolvedOpenRouterCompat } from "../types.js";
|
|
2
|
+
/** Wire effort remap for first-party xAI Responses. */
|
|
3
|
+
export declare function xaiResponsesReasoningEffortMap(modelId: string): NonNullable<OpenAICompat["reasoningEffortMap"]>;
|
|
4
|
+
/**
|
|
5
|
+
* Build the resolved chat-completions compat record for a model spec.
|
|
6
|
+
* Provider takes precedence over URL-based detection since it's explicitly configured.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildOpenAICompat(spec: ModelSpec<"openai-completions">): ResolvedOpenAICompat;
|
|
9
|
+
interface OpenAIResponsesSpecLike {
|
|
10
|
+
id?: string;
|
|
11
|
+
provider: string;
|
|
12
|
+
name: string;
|
|
13
|
+
baseUrl: string;
|
|
14
|
+
reasoning?: boolean;
|
|
15
|
+
compat?: OpenAICompat;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Build the resolved Responses-API compat record. Most shared OpenAI-compatible
|
|
19
|
+
* capability defaults intentionally mirror chat-completions, while Responses-
|
|
20
|
+
* only behavior (developer role, prompt cache, pairing strictness, image detail)
|
|
21
|
+
* keeps endpoint-specific detection. Azure is detected by provider id as well
|
|
22
|
+
* as URL — bundled `azure` models carry no baseUrl (the deployment host is per-
|
|
23
|
+
* resource, resolved at runtime) — while OpenAI/Copilot developer-role and
|
|
24
|
+
* prompt-cache detection stay URL-keyed, as the historical call sites were.
|
|
25
|
+
*/
|
|
26
|
+
export declare function buildOpenAIResponsesCompat(spec: OpenAIResponsesSpecLike): ResolvedOpenAIResponsesCompat;
|
|
27
|
+
export declare function buildOpenRouterCompat(spec: ModelSpec<"openrouter">): ResolvedOpenRouterCompat;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ModelSpec } from "../types.js";
|
|
2
|
+
import { type VariantCollapseTable } from "../variant-collapse.js";
|
|
3
|
+
export declare const ANTIGRAVITY_PRIMARY_ENDPOINT = "https://daily-cloudcode-pa.googleapis.com";
|
|
4
|
+
export declare const ANTIGRAVITY_SANDBOX_ENDPOINT = "https://daily-cloudcode-pa.sandbox.googleapis.com";
|
|
5
|
+
/**
|
|
6
|
+
* Raw model metadata returned by Antigravity's `fetchAvailableModels` endpoint.
|
|
7
|
+
*/
|
|
8
|
+
export interface AntigravityDiscoveryApiModel {
|
|
9
|
+
displayName?: string;
|
|
10
|
+
supportsImages?: boolean;
|
|
11
|
+
supportsThinking?: boolean;
|
|
12
|
+
thinkingBudget?: number;
|
|
13
|
+
recommended?: boolean;
|
|
14
|
+
maxTokens?: number;
|
|
15
|
+
maxOutputTokens?: number;
|
|
16
|
+
model?: string;
|
|
17
|
+
apiProvider?: string;
|
|
18
|
+
modelProvider?: string;
|
|
19
|
+
isInternal?: boolean;
|
|
20
|
+
supportsVideo?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Grouping metadata used by Antigravity to surface recommended model ids.
|
|
24
|
+
*/
|
|
25
|
+
export interface AntigravityDiscoveryAgentModelGroup {
|
|
26
|
+
modelIds?: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sort/group metadata used by Antigravity to surface recommended model ids.
|
|
30
|
+
*/
|
|
31
|
+
export interface AntigravityDiscoveryAgentModelSort {
|
|
32
|
+
groups?: AntigravityDiscoveryAgentModelGroup[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Response payload returned by Antigravity's `fetchAvailableModels` endpoint.
|
|
36
|
+
*/
|
|
37
|
+
export interface AntigravityDiscoveryApiResponse {
|
|
38
|
+
models?: Record<string, AntigravityDiscoveryApiModel>;
|
|
39
|
+
agentModelSorts?: AntigravityDiscoveryAgentModelSort[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Options for fetching Antigravity discovery models.
|
|
43
|
+
*/
|
|
44
|
+
export interface FetchAntigravityDiscoveryModelsOptions {
|
|
45
|
+
/** OAuth access token used as `Authorization: Bearer <token>`. */
|
|
46
|
+
token: string;
|
|
47
|
+
/** Optional endpoint override. Defaults to Antigravity fallback endpoints. */
|
|
48
|
+
endpoint?: string;
|
|
49
|
+
/** Deprecated and ignored for antigravity discovery parity. */
|
|
50
|
+
project?: string;
|
|
51
|
+
/** Optional user agent override. */
|
|
52
|
+
userAgent?: string;
|
|
53
|
+
/** Optional abort signal for request cancellation. */
|
|
54
|
+
signal?: AbortSignal;
|
|
55
|
+
/** Optional fetch implementation override for tests. */
|
|
56
|
+
fetcher?: typeof fetch;
|
|
57
|
+
/**
|
|
58
|
+
* Hand collapse table to apply to the discovered list. Defaults to the
|
|
59
|
+
* Antigravity (budget-transport) table; `googleGeminiCli` passes the
|
|
60
|
+
* level-transport table so cloudcode-pa keeps `thinkingLevel`.
|
|
61
|
+
*/
|
|
62
|
+
collapseTable?: VariantCollapseTable;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Fetches discoverable Antigravity models and normalizes them into canonical model entries.
|
|
66
|
+
*
|
|
67
|
+
* Returns `null` on network/payload/auth failures.
|
|
68
|
+
* Returns `[]` only when the endpoint responds successfully with no usable models.
|
|
69
|
+
*/
|
|
70
|
+
export declare function fetchAntigravityDiscoveryModels(options: FetchAntigravityDiscoveryModelsOptions): Promise<ModelSpec<"google-gemini-cli">[] | null>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FetchImpl, ModelSpec } from "../types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Fetch options for OpenAI Codex model discovery.
|
|
4
|
+
*/
|
|
5
|
+
export interface CodexModelDiscoveryOptions {
|
|
6
|
+
/** OAuth access token used for `Authorization: Bearer ...`. */
|
|
7
|
+
accessToken: string;
|
|
8
|
+
/** ChatGPT account id value used for `chatgpt-account-id` header. */
|
|
9
|
+
accountId?: string;
|
|
10
|
+
/** Base URL for Codex backend. Defaults to `https://chatgpt.com/backend-api`. */
|
|
11
|
+
baseUrl?: string;
|
|
12
|
+
/** Optional client version attached as `client_version` query parameter. */
|
|
13
|
+
clientVersion?: string;
|
|
14
|
+
/** Optional endpoint path candidates. Defaults to `/codex/models`, then `/models`. */
|
|
15
|
+
paths?: readonly string[];
|
|
16
|
+
/** Additional headers merged on top of required Codex headers. */
|
|
17
|
+
headers?: Record<string, string>;
|
|
18
|
+
/** Abort signal for network request cancellation. */
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
/** Optional fetch implementation override for tests. */
|
|
21
|
+
fetchFn?: FetchImpl;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Normalized Codex discovery response.
|
|
25
|
+
*/
|
|
26
|
+
export interface CodexModelDiscoveryResult {
|
|
27
|
+
models: ModelSpec<"openai-codex-responses">[];
|
|
28
|
+
etag?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Fetches model metadata from Codex backend and normalizes it for pi model management.
|
|
32
|
+
*
|
|
33
|
+
* Returns `null` when no supported model-list route can be fetched/parsed.
|
|
34
|
+
* Returns `{ models: [] }` when a route succeeds but yields no usable models.
|
|
35
|
+
*/
|
|
36
|
+
export declare function fetchCodexModels(options: CodexModelDiscoveryOptions): Promise<CodexModelDiscoveryResult | null>;
|