@oh-my-pi/pi-catalog 18.1.11 → 18.1.13
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 +16 -0
- package/dist/types/compat/auth-ids.d.ts +2 -2
- package/dist/types/compat/context-window.d.ts +7 -0
- package/dist/types/compat/types.d.ts +1 -0
- package/dist/types/provider-models/descriptors.d.ts +5 -0
- package/dist/types/provider-models/openai-compat.d.ts +3 -0
- package/dist/types/types.d.ts +12 -1
- package/package.json +4 -4
- package/src/build.ts +4 -0
- package/src/compat/auth-ids.ts +2 -0
- package/src/compat/axes.ts +3 -1
- package/src/compat/context-window.ts +31 -0
- package/src/compat/resolve.ts +1 -0
- package/src/compat/rules/README.md +1 -1
- package/src/compat/rules/auth/_order.kdl +1 -1
- package/src/compat/rules/auth/muse-code.kdl +28 -0
- package/src/compat/rules/classes/meta.kdl +7 -1
- package/src/compat/rules/providers/meta.kdl +1 -0
- package/src/compat/rules/providers/muse-code.kdl +16 -0
- package/src/compat/rules/providers/openai-codex.kdl +27 -0
- package/src/compat/rules/runtime/behavior.kdl +2 -1
- package/src/compat/rules.json +177 -21
- package/src/compat/types.ts +1 -1
- package/src/discovery/codex.ts +6 -2
- package/src/models.json +504 -6
- package/src/provider-models/cache-provider-id.ts +9 -0
- package/src/provider-models/descriptors.ts +7 -0
- package/src/provider-models/openai-compat.ts +57 -3
- package/src/types.ts +12 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { USER_AGENT } from "@oh-my-pi/pi-utils";
|
|
1
|
+
import { USER_AGENT, getInstallId } from "@oh-my-pi/pi-utils";
|
|
2
2
|
import * as logger from "@oh-my-pi/pi-utils/logger";
|
|
3
3
|
import { toClinePassPublicModelId } from "../cline-pass-model-id";
|
|
4
4
|
import {
|
|
@@ -3056,6 +3056,11 @@ function openCodeModelManagerOptions(
|
|
|
3056
3056
|
provider: providerId,
|
|
3057
3057
|
baseUrl: discoveryBaseUrl,
|
|
3058
3058
|
apiKey,
|
|
3059
|
+
// Live discovery hits the OpenCode gateway outside any
|
|
3060
|
+
// conversation: attribute with the stable install id
|
|
3061
|
+
// (x-opencode-session required from 09/06) and omp's UA
|
|
3062
|
+
// instead of Bun's default.
|
|
3063
|
+
headers: { "User-Agent": USER_AGENT, "x-opencode-session": getInstallId() },
|
|
3059
3064
|
mapModel: (entry, defaults) => {
|
|
3060
3065
|
const reference = references.get(defaults.id);
|
|
3061
3066
|
const name = toModelName(entry.name, reference?.name ?? defaults.name);
|
|
@@ -4360,7 +4365,7 @@ export function coreWeaveModelManagerOptions(
|
|
|
4360
4365
|
// 15.75 Meta Model API
|
|
4361
4366
|
// ---------------------------------------------------------------------------
|
|
4362
4367
|
|
|
4363
|
-
const META_MODEL_API_BASE_URL = "
|
|
4368
|
+
const META_MODEL_API_BASE_URL = getDefaultModelDiscoveryBaseUrl("meta")!;
|
|
4364
4369
|
const META_MUSE_SPARK_COST = { input: 1.25, output: 4.25, cacheRead: 0.15, cacheWrite: 0 } as const;
|
|
4365
4370
|
// Contributor SKUs (`-contributor`): same model, discounted because prompts
|
|
4366
4371
|
// are used for training.
|
|
@@ -4369,6 +4374,12 @@ const META_MUSE_SPARK_THINKING: ThinkingConfig = {
|
|
|
4369
4374
|
mode: "effort",
|
|
4370
4375
|
efforts: [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High, Effort.XHigh],
|
|
4371
4376
|
};
|
|
4377
|
+
// Meta documents the `max` effort tier for Muse Spark 1.3 (standard) only;
|
|
4378
|
+
// contributor tiers and other revisions stay on the 5-tier ladder.
|
|
4379
|
+
const META_MUSE_SPARK_MAX_THINKING: ThinkingConfig = {
|
|
4380
|
+
mode: "effort",
|
|
4381
|
+
efforts: [Effort.Minimal, Effort.Low, Effort.Medium, Effort.High, Effort.XHigh, Effort.Max],
|
|
4382
|
+
};
|
|
4372
4383
|
|
|
4373
4384
|
function museSparkSpec(revision: string, tier: "standard" | "contributor"): ModelSpec<"openai-responses"> {
|
|
4374
4385
|
const contributor = tier === "contributor";
|
|
@@ -4383,7 +4394,7 @@ function museSparkSpec(revision: string, tier: "standard" | "contributor"): Mode
|
|
|
4383
4394
|
cost: contributor ? META_MUSE_SPARK_CONTRIBUTOR_COST : META_MUSE_SPARK_COST,
|
|
4384
4395
|
contextWindow: 1_048_576,
|
|
4385
4396
|
maxTokens: 131_072,
|
|
4386
|
-
thinking: META_MUSE_SPARK_THINKING,
|
|
4397
|
+
thinking: revision === "1.3" && tier === "standard" ? META_MUSE_SPARK_MAX_THINKING : META_MUSE_SPARK_THINKING,
|
|
4387
4398
|
compat: {
|
|
4388
4399
|
supportsReasoningEffort: true,
|
|
4389
4400
|
includeEncryptedReasoning: true,
|
|
@@ -4572,6 +4583,47 @@ export function metaModelManagerOptions(config?: MetaModelManagerConfig): ModelM
|
|
|
4572
4583
|
};
|
|
4573
4584
|
}
|
|
4574
4585
|
|
|
4586
|
+
/** Muse Code shares Meta Model API's model capabilities and equivalent token pricing. */
|
|
4587
|
+
export const MUSE_CODE_STATIC_MODELS: readonly ModelSpec<"openai-responses">[] = META_MUSE_STATIC_MODELS.map(model => ({
|
|
4588
|
+
...model,
|
|
4589
|
+
provider: "muse-code",
|
|
4590
|
+
}));
|
|
4591
|
+
|
|
4592
|
+
const MUSE_CODE_MODEL_BY_ID: Partial<Record<string, ModelSpec<"openai-responses">>> = Object.fromEntries(
|
|
4593
|
+
MUSE_CODE_STATIC_MODELS.map(model => [model.id, model]),
|
|
4594
|
+
);
|
|
4595
|
+
|
|
4596
|
+
function museCodeLineageSpec(id: string): ModelSpec<"openai-responses"> | undefined {
|
|
4597
|
+
const model = museSparkLineageSpec(id);
|
|
4598
|
+
return model ? { ...model, provider: "muse-code" } : undefined;
|
|
4599
|
+
}
|
|
4600
|
+
|
|
4601
|
+
export function museCodeModelManagerOptions(config?: MetaModelManagerConfig): ModelManagerOptions<"openai-responses"> {
|
|
4602
|
+
return {
|
|
4603
|
+
...createOpenAICompatibleModelManagerOptions({
|
|
4604
|
+
api: "openai-responses",
|
|
4605
|
+
providerId: "muse-code",
|
|
4606
|
+
defaultBaseUrl: META_MODEL_API_BASE_URL,
|
|
4607
|
+
config,
|
|
4608
|
+
headers: { "x-api-version": "1.0.0" },
|
|
4609
|
+
dynamicModelsAuthoritative: true,
|
|
4610
|
+
requireApiKey: true,
|
|
4611
|
+
filterModel: (_entry, model) => !isExcludedModel("muse-code", model.id),
|
|
4612
|
+
mapModel: (entry, defaults, reference) =>
|
|
4613
|
+
mapWithBundledReference(
|
|
4614
|
+
entry,
|
|
4615
|
+
defaults,
|
|
4616
|
+
reference ?? MUSE_CODE_MODEL_BY_ID[defaults.id] ?? museCodeLineageSpec(defaults.id),
|
|
4617
|
+
),
|
|
4618
|
+
}),
|
|
4619
|
+
cacheProviderId: resolveModelCacheProviderId("muse-code", {
|
|
4620
|
+
apiKey: config?.apiKey,
|
|
4621
|
+
baseUrl: config?.baseUrl ?? META_MODEL_API_BASE_URL,
|
|
4622
|
+
}),
|
|
4623
|
+
staticModels: MUSE_CODE_STATIC_MODELS,
|
|
4624
|
+
};
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4575
4627
|
// ---------------------------------------------------------------------------
|
|
4576
4628
|
// 16. Moonshot
|
|
4577
4629
|
// ---------------------------------------------------------------------------
|
|
@@ -6021,6 +6073,8 @@ export interface GithubCopilotModelManagerConfig {
|
|
|
6021
6073
|
}
|
|
6022
6074
|
|
|
6023
6075
|
const COPILOT_CACHE_INVALIDATED_MODEL_IDS = [
|
|
6076
|
+
"gpt-6-astra",
|
|
6077
|
+
"gpt-6-astra-1m",
|
|
6024
6078
|
"grok-4.5",
|
|
6025
6079
|
"grok-4.5-1m",
|
|
6026
6080
|
"grok-4.6",
|
package/src/types.ts
CHANGED
|
@@ -709,6 +709,8 @@ export interface ResolvedOpenAISharedCompat {
|
|
|
709
709
|
isOpenRouterHost: boolean;
|
|
710
710
|
/** Whether this endpoint needs a max-token field even when caller did not set one. */
|
|
711
711
|
alwaysSendMaxTokens: boolean;
|
|
712
|
+
/** Clamp a requested output-token count to the model's advertised ceiling. */
|
|
713
|
+
clampOutputToModelMax: boolean;
|
|
712
714
|
openRouterRouting?: OpenAICompat["openRouterRouting"];
|
|
713
715
|
/** Provider-specific wire model-id transform applied to the base id. */
|
|
714
716
|
wireModelIdMode: "raw" | "cline-pass" | "firepass" | "fireworks" | "openrouter";
|
|
@@ -777,6 +779,7 @@ export type ResolvedOpenAICompat = ResolvedOpenAISharedCompat &
|
|
|
777
779
|
| "supportsStrictMode"
|
|
778
780
|
| "supportsLongPromptCacheRetention"
|
|
779
781
|
| "alwaysSendMaxTokens"
|
|
782
|
+
| "clampOutputToModelMax"
|
|
780
783
|
| "wireModelIdMode"
|
|
781
784
|
| "vercelGatewayRouting"
|
|
782
785
|
| "extraBody"
|
|
@@ -1118,6 +1121,8 @@ export interface Model<TApi extends Api = Api> {
|
|
|
1118
1121
|
/** Premium Copilot requests charged per user-initiated request (defaults to 1). */
|
|
1119
1122
|
premiumMultiplier?: number;
|
|
1120
1123
|
contextWindow: number | null;
|
|
1124
|
+
/** Optional larger prompt window available when extended context is enabled. */
|
|
1125
|
+
maxContextWindow?: number;
|
|
1121
1126
|
maxTokens: number | null;
|
|
1122
1127
|
/**
|
|
1123
1128
|
* When `true`, providers MUST omit `max_output_tokens` (Responses) /
|
|
@@ -1199,6 +1204,13 @@ export interface Model<TApi extends Api = Api> {
|
|
|
1199
1204
|
* - `"function"` or undefined: JSON function-tool with `{input: string}` (spec §1.2).
|
|
1200
1205
|
*/
|
|
1201
1206
|
applyPatchToolType?: "freeform" | "function";
|
|
1207
|
+
/**
|
|
1208
|
+
* Edit-tool description density for this model. `"compact"` selects the
|
|
1209
|
+
* terse mode prompt (all operations and invariants preserved) for hosts
|
|
1210
|
+
* where per-request prompt bytes are the dominant cost. Generated catalog
|
|
1211
|
+
* policy sets it; the edit tool falls back to the full prompt when unset.
|
|
1212
|
+
*/
|
|
1213
|
+
editPromptVariant?: "full" | "compact";
|
|
1202
1214
|
/**
|
|
1203
1215
|
* Force OAuth-style request shaping for providers whose API key prefix doesn't
|
|
1204
1216
|
* match an OAuth token (e.g. routing Anthropic traffic through a proxy that
|