@oh-my-pi/pi-catalog 18.8.0 → 18.8.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 +13 -0
- package/dist/types/compat/request-size.d.ts +7 -0
- package/package.json +4 -4
- package/src/compat/axes.ts +1 -0
- package/src/compat/request-size.ts +25 -0
- package/src/compat/rules/README.md +2 -0
- package/src/compat/rules/providers/anthropic.kdl +7 -0
- package/src/compat/rules/providers/openai-codex.kdl +5 -9
- package/src/compat/rules.json +1 -1
- package/src/models.json +1 -1
- package/src/provider-models/openai-compat.ts +7 -7
|
@@ -6186,7 +6186,7 @@ function parseCopilotTokenPriceTier(value: unknown): CopilotTokenPriceTier | und
|
|
|
6186
6186
|
return undefined;
|
|
6187
6187
|
}
|
|
6188
6188
|
return {
|
|
6189
|
-
contextMax: toNumber(value.context_max),
|
|
6189
|
+
contextMax: toNumber(value.max_prompt_tokens) ?? toNumber(value.context_max),
|
|
6190
6190
|
inputPrice: toNumber(value.input_price),
|
|
6191
6191
|
outputPrice: toNumber(value.output_price),
|
|
6192
6192
|
cachePrice: toNumber(value.cache_price),
|
|
@@ -6372,12 +6372,12 @@ export function githubCopilotModelManagerOptions(config?: GithubCopilotModelMana
|
|
|
6372
6372
|
? ["text"]
|
|
6373
6373
|
: (reference?.input ?? defaults.input);
|
|
6374
6374
|
// With COPILOT_API_HEADERS the served window is the long-context
|
|
6375
|
-
// ceiling; the default tier
|
|
6376
|
-
//
|
|
6377
|
-
//
|
|
6378
|
-
//
|
|
6379
|
-
//
|
|
6380
|
-
//
|
|
6375
|
+
// ceiling; the default tier reports its prompt boundary in
|
|
6376
|
+
// token_prices.default.max_prompt_tokens (or legacy context_max).
|
|
6377
|
+
// Cap the base entry to the default tier — the long tier is
|
|
6378
|
+
// the opt-in `-1m` sibling below. On tiered legacy rows the
|
|
6379
|
+
// model-wide max_prompt_tokens may be tighter than the billed
|
|
6380
|
+
// default ceiling (#13912), so use the smaller bound.
|
|
6381
6381
|
const tokenPrices = extractCopilotTokenPrices(entry);
|
|
6382
6382
|
const billedDefaultMax = tokenPrices.defaultTier?.contextMax;
|
|
6383
6383
|
const tieredPromptBudget =
|