@oh-my-pi/pi-catalog 18.12.6 → 18.13.0
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 +45 -0
- package/dist/types/compat/anthropic.d.ts +20 -0
- package/dist/types/compat/behavior.d.ts +2 -0
- package/dist/types/compat/catalog-policy.d.ts +2 -2
- package/dist/types/compat/collapse.d.ts +10 -0
- package/dist/types/compat/factory-droid.d.ts +2 -0
- package/dist/types/compat/resolve.d.ts +2 -2
- package/dist/types/compat/types.d.ts +2 -0
- package/dist/types/discovery/antigravity.d.ts +7 -2
- package/dist/types/discovery/devin.d.ts +1 -1
- package/dist/types/provider-models/google.d.ts +2 -0
- package/dist/types/provider-models/openai-compat.d.ts +5 -0
- package/dist/types/types.d.ts +58 -3
- package/dist/types/wire/devin.d.ts +2 -2
- package/dist/types/wire/gemini-headers.d.ts +41 -22
- package/dist/types/wire/xiaomi-token-plan.d.ts +2 -0
- package/package.json +4 -4
- package/src/build.ts +47 -1
- package/src/compat/anthropic.ts +47 -0
- package/src/compat/axes.ts +10 -3
- package/src/compat/behavior.ts +5 -0
- package/src/compat/catalog-policy.ts +10 -8
- package/src/compat/collapse.ts +63 -2
- package/src/compat/factory-droid.ts +3 -0
- package/src/compat/resolve.ts +7 -5
- package/src/compat/rules/README.md +13 -5
- package/src/compat/rules/auth/google-antigravity.kdl +2 -1
- package/src/compat/rules/auth/llama.cpp.kdl +1 -1
- package/src/compat/rules/auth/xiaomi-token-plan-ams.kdl +1 -1
- package/src/compat/rules/auth/xiaomi-token-plan-cn.kdl +1 -1
- package/src/compat/rules/auth/xiaomi-token-plan-sgp.kdl +1 -1
- package/src/compat/rules/classes/anthropic.kdl +6 -1
- package/src/compat/rules/classes/minimax.kdl +10 -0
- package/src/compat/rules/providers/anthropic.kdl +15 -1
- package/src/compat/rules/providers/deepseek.kdl +13 -10
- package/src/compat/rules/providers/factory-droid.kdl +48 -0
- package/src/compat/rules/providers/google-antigravity.kdl +7 -0
- package/src/compat/rules/providers/kimi-code.kdl +4 -0
- package/src/compat/rules/providers/muse-code.kdl +1 -1
- package/src/compat/rules/providers/openai-codex.kdl +4 -4
- package/src/compat/rules/providers/openai.kdl +22 -2
- package/src/compat/rules/providers/opencode-go.kdl +38 -3
- package/src/compat/rules/providers/opencode-zen.kdl +7 -0
- package/src/compat/rules/providers/xiaomi-token-plan-ams.kdl +1 -1
- package/src/compat/rules/providers/xiaomi-token-plan-cn.kdl +1 -1
- package/src/compat/rules/providers/xiaomi-token-plan-sgp.kdl +1 -1
- package/src/compat/rules/providers/xiaomi.kdl +1 -1
- package/src/compat/rules/runtime/behavior.kdl +20 -10
- package/src/compat/rules.json +1 -1
- package/src/compat/types.ts +2 -0
- package/src/discovery/antigravity.ts +41 -6
- package/src/discovery/cursor.ts +0 -6
- package/src/discovery/devin.ts +9 -3
- package/src/discovery/factory-droid.ts +38 -6
- package/src/model-cache.ts +4 -2
- package/src/models.json +1 -1
- package/src/provider-models/cache-provider-id.ts +5 -2
- package/src/provider-models/google.ts +13 -1
- package/src/provider-models/openai-compat.ts +40 -10
- package/src/types.ts +63 -1
- package/src/wire/devin.ts +2 -2
- package/src/wire/gemini-headers.ts +68 -24
- package/src/wire/xiaomi-token-plan.ts +4 -0
package/src/compat/axes.ts
CHANGED
|
@@ -248,6 +248,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
248
248
|
]),
|
|
249
249
|
"effort-beta": wire("effortBeta", ["anthropic"]),
|
|
250
250
|
"escape-builtin-tool-names": wire("escapeBuiltinToolNames", ["anthropic"]),
|
|
251
|
+
"extended-cache-ttl-beta": wire("extendedCacheTtlBeta", ["anthropic"]),
|
|
251
252
|
"fast-mode": wire("fastMode", ["anthropic"]),
|
|
252
253
|
"first-party-provider": wire("firstPartyProvider", ["anthropic"]),
|
|
253
254
|
"honors-claude-code-beta-kill-switch": wire("honorsClaudeCodeBetaKillSwitch", ["anthropic"]),
|
|
@@ -257,6 +258,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
257
258
|
"official-endpoint": wire("officialEndpoint", ["anthropic", "openai-responses"]),
|
|
258
259
|
"replay-unsigned-thinking": wire("replayUnsignedThinking", ["anthropic"]),
|
|
259
260
|
"requires-thinking-enabled": wire("requiresThinkingEnabled", ["anthropic"]),
|
|
261
|
+
"requires-thinking-presence": wire("requiresThinkingPresence", ["anthropic"]),
|
|
260
262
|
"requires-tool-result-id": wire("requiresToolResultId", ["anthropic"]),
|
|
261
263
|
"signing-endpoint": wire("signingEndpoint", ["anthropic"]),
|
|
262
264
|
"strip-thinking-history": wire("stripThinkingHistory", ["openai", "anthropic", "ollama"]),
|
|
@@ -544,12 +546,17 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
|
|
|
544
546
|
"limits-patch": { key: "limitsPatch", set: "catalog", shape: "object" },
|
|
545
547
|
/** Seeds `maxTokens` only when the row reports none; applied after `limits-patch`. */
|
|
546
548
|
"max-tokens-fallback": { key: "maxTokensFallback", set: "catalog", shape: "scalar" },
|
|
547
|
-
/** Most output tokens the host serves: a larger reported `maxTokens` is lowered to it; an unknown one stays unknown. */
|
|
549
|
+
/** Most output tokens the host serves: a larger reported `maxTokens` (and Antigravity per-SKU `maxOutputTokens`) is lowered to it; an unknown one stays unknown. */
|
|
548
550
|
"max-tokens-ceiling": { key: "maxTokensCeiling", set: "catalog", shape: "scalar" },
|
|
549
551
|
"long-context-cost": { key: "longContext", set: "catalog", shape: "object" },
|
|
550
552
|
"prompt-cache": { key: "promptCache", set: "catalog", shape: "object" },
|
|
551
|
-
|
|
552
|
-
|
|
553
|
+
/**
|
|
554
|
+
* The lane rewards routing related requests — Task siblings, forks, explicit
|
|
555
|
+
* `--prompt-cache-key` callers — under one shared prompt-cache key instead of
|
|
556
|
+
* each conversation's own identity. Unassigned: per-conversation routing.
|
|
557
|
+
*/
|
|
558
|
+
"shared-prompt-cache": {
|
|
559
|
+
key: "sharedPromptCache",
|
|
553
560
|
set: "catalog",
|
|
554
561
|
shape: "scalar",
|
|
555
562
|
values: [true, false],
|
package/src/compat/behavior.ts
CHANGED
|
@@ -204,6 +204,11 @@ export function isBareIdReferenceProvider(provider: string): boolean {
|
|
|
204
204
|
return !behavior.referenceIsolatedProviders.includes(provider);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
/** Whether a host's prefix cache should use append-only conversation context by default. */
|
|
208
|
+
export function prefersAppendOnlyContext(provider: string): boolean {
|
|
209
|
+
return behavior.appendOnlyContextProviders.includes(provider);
|
|
210
|
+
}
|
|
211
|
+
|
|
207
212
|
/** The declared subscription tier required to use a provider model id, if any. */
|
|
208
213
|
export function planRequirementFor(provider: string, model: string): string | undefined {
|
|
209
214
|
const rule = behavior.planRequirements.find(candidate => candidate.provider === provider);
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
1
|
+
import { withoutUnverifiedThinking } from "../model-thinking";
|
|
2
|
+
import type { CatalogPolicyInputs } from "../types";
|
|
3
3
|
import { resolveCatalogAxes } from "./resolve";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Rule-owned catalog-axis policy by model. Resolve once per process rather
|
|
7
7
|
* than walking the static policy cascade on every accessor call. The key
|
|
8
|
-
* mirrors the cascade target inputs — `providerType ?? provider`, api,
|
|
9
|
-
* id
|
|
10
|
-
*
|
|
8
|
+
* mirrors the cascade target inputs — `providerType ?? provider`, api, the
|
|
9
|
+
* logical id plus `requestModelId` (the wire id `policyModelId` resolves
|
|
10
|
+
* unknown logical ids under), and the reasoning flag; identity-derived
|
|
11
|
+
* class/family/revision facts are a pure function of provider + id. Bounded:
|
|
12
|
+
* one entry per distinct model.
|
|
11
13
|
*/
|
|
12
14
|
const catalogPolicyCache = new Map<string, Readonly<Record<string, unknown>>>();
|
|
13
15
|
const CATALOG_POLICY_CACHE_MAX = 8192;
|
|
@@ -17,11 +19,11 @@ const CATALOG_POLICY_CACHE_MAX = 8192;
|
|
|
17
19
|
* memoized per distinct model. Frozen: the bag is shared across callers, so it
|
|
18
20
|
* must stay read-only — extract the value you need rather than handing it on.
|
|
19
21
|
*/
|
|
20
|
-
export function resolveCatalogPolicy(model:
|
|
21
|
-
const key = `${model.provider}\u0000${model.providerType ?? ""}\u0000${model.api}\u0000${model.id}\u0000${model.reasoning ? 1 : 0}`;
|
|
22
|
+
export function resolveCatalogPolicy(model: CatalogPolicyInputs): Readonly<Record<string, unknown>> {
|
|
23
|
+
const key = `${model.provider}\u0000${model.providerType ?? ""}\u0000${model.api}\u0000${model.id}\u0000${model.requestModelId ?? ""}\u0000${model.reasoning ? 1 : 0}`;
|
|
22
24
|
const cached = catalogPolicyCache.get(key);
|
|
23
25
|
if (cached !== undefined) return cached;
|
|
24
|
-
const policy = Object.freeze({ ...resolveCatalogAxes(
|
|
26
|
+
const policy = Object.freeze({ ...resolveCatalogAxes(withoutUnverifiedThinking(model)) });
|
|
25
27
|
if (catalogPolicyCache.size >= CATALOG_POLICY_CACHE_MAX) catalogPolicyCache.clear();
|
|
26
28
|
catalogPolicyCache.set(key, policy);
|
|
27
29
|
return policy;
|
package/src/compat/collapse.ts
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import { buildModel } from "../build";
|
|
38
38
|
import { Effort, THINKING_EFFORTS } from "../effort";
|
|
39
|
-
import type { Api, Model, ModelSpec, Provider, ThinkingConfig } from "../types";
|
|
39
|
+
import type { AntigravityModelWireProfile, Api, Model, ModelSpec, Provider, ThinkingConfig } from "../types";
|
|
40
40
|
import { resolveModelPolicy } from "./resolve";
|
|
41
41
|
import { parseRevision, parseRevisionConstraint, type RevisionTerm, revisionSatisfies } from "./revision";
|
|
42
42
|
import { collapseVariantId, collapseVocabulary, stripThinkingVariantSuffix } from "./taxonomy";
|
|
@@ -757,6 +757,31 @@ export function isCursorMaxModeWireId(wireModelId: string): boolean {
|
|
|
757
757
|
return effort === Effort.XHigh || effort === Effort.Max;
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
+
/**
|
|
761
|
+
* Whether `wireModelId` is one tier of a reviewed `provider` family that serves
|
|
762
|
+
* different efforts from distinct sibling SKUs (`-low`/`-medium`/`-high`), so
|
|
763
|
+
* the SKU, not the effort, fixes the thinking strength. Decided from the
|
|
764
|
+
* declared family routes, not a collapsed row's routing: an account roster
|
|
765
|
+
* listing one tier collapses to a row routing every effort to it, yet that SKU
|
|
766
|
+
* still advertises its own fixed thinking. Families routing every effort to
|
|
767
|
+
* one `-thinking` SKU keep the effort's own budget or level.
|
|
768
|
+
*/
|
|
769
|
+
export function isReviewedTierVariantWireId(provider: string, wireModelId: string): boolean {
|
|
770
|
+
const table = reviewedCollapseTable(provider);
|
|
771
|
+
if (table === undefined) return false;
|
|
772
|
+
const id = wireModelId.trim();
|
|
773
|
+
const family =
|
|
774
|
+
table.families.find(candidate => candidate.members.includes(id)) ??
|
|
775
|
+
(table.templates === undefined ? undefined : templateFamilyFor(table.templates, id));
|
|
776
|
+
if (family === undefined) return false;
|
|
777
|
+
const tiers = new Set<string>();
|
|
778
|
+
for (const key of VARIANT_ROUTING_KEYS) {
|
|
779
|
+
const target = family.routing[key];
|
|
780
|
+
if (key !== "off" && target !== undefined) tiers.add(target);
|
|
781
|
+
}
|
|
782
|
+
return tiers.size > 1 && tiers.has(id);
|
|
783
|
+
}
|
|
784
|
+
|
|
760
785
|
/**
|
|
761
786
|
* Recover Cursor's max-mode marker for a bundled collapsed row. The bundled
|
|
762
787
|
* snapshot may contain only the logical row, but its effort routing still
|
|
@@ -819,6 +844,37 @@ function reconcileCursorMaxMode<TSpec extends VariantSpecLike>(spec: TSpec, memb
|
|
|
819
844
|
};
|
|
820
845
|
}
|
|
821
846
|
|
|
847
|
+
/**
|
|
848
|
+
* Union the members' discovered Antigravity wire profiles, keyed by each
|
|
849
|
+
* member's own wire id, so the collapsed row keeps the request constants of
|
|
850
|
+
* every SKU it routes to (`...firstMember` alone keeps only the first tier's).
|
|
851
|
+
* Returns `undefined` when no member carries a profile.
|
|
852
|
+
*/
|
|
853
|
+
function antigravityWireProfilesOf<TSpec extends VariantSpecLike>(
|
|
854
|
+
memberSpecs: readonly TSpec[],
|
|
855
|
+
): Record<string, AntigravityModelWireProfile> | undefined {
|
|
856
|
+
let profiles: Record<string, AntigravityModelWireProfile> | undefined;
|
|
857
|
+
for (const member of memberSpecs) {
|
|
858
|
+
if (member.antigravityWireProfiles === undefined) continue;
|
|
859
|
+
profiles = { ...profiles, ...member.antigravityWireProfiles };
|
|
860
|
+
}
|
|
861
|
+
return profiles;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Merge live members' wire profiles over an already-collapsed snapshot, which
|
|
866
|
+
* froze them (or none) when it was written. Returns `spec` by reference when no
|
|
867
|
+
* member carries a profile.
|
|
868
|
+
*/
|
|
869
|
+
function reconcileAntigravityWireProfiles<TSpec extends VariantSpecLike>(
|
|
870
|
+
spec: TSpec,
|
|
871
|
+
memberSpecs: readonly TSpec[],
|
|
872
|
+
): TSpec {
|
|
873
|
+
const profiles = antigravityWireProfilesOf(memberSpecs);
|
|
874
|
+
if (profiles === undefined) return spec;
|
|
875
|
+
return { ...spec, antigravityWireProfiles: { ...spec.antigravityWireProfiles, ...profiles } };
|
|
876
|
+
}
|
|
877
|
+
|
|
822
878
|
/**
|
|
823
879
|
* Collapse every family in `table` found in `specs`. Non-member specs pass
|
|
824
880
|
* through verbatim (by reference), order preserved; the collapsed spec
|
|
@@ -890,7 +946,10 @@ function collapseWithTable<TSpec extends VariantSpecLike>(
|
|
|
890
946
|
// lowest tier.
|
|
891
947
|
replacement.set(
|
|
892
948
|
family.id,
|
|
893
|
-
|
|
949
|
+
reconcileAntigravityWireProfiles(
|
|
950
|
+
reconcileCursorMaxMode(reconcileDefaultMember(reconciled, family, new Set(rawPresent)), memberSpecs),
|
|
951
|
+
memberSpecs,
|
|
952
|
+
),
|
|
894
953
|
);
|
|
895
954
|
continue;
|
|
896
955
|
}
|
|
@@ -937,6 +996,7 @@ function collapseWithTable<TSpec extends VariantSpecLike>(
|
|
|
937
996
|
// which tier needed it, so the members' own markers are kept per wire id.
|
|
938
997
|
const cursorMaxMode = memberSpecs.some(spec => spec.cursorMaxMode === true) ? true : undefined;
|
|
939
998
|
const cursorMaxModeRoutes = cursorMaxModeRoutesOf(firstMember.provider, memberSpecs);
|
|
999
|
+
const antigravityWireProfiles = antigravityWireProfilesOf(memberSpecs);
|
|
940
1000
|
const collapsed: TSpec = {
|
|
941
1001
|
...firstMember,
|
|
942
1002
|
id: family.id,
|
|
@@ -947,6 +1007,7 @@ function collapseWithTable<TSpec extends VariantSpecLike>(
|
|
|
947
1007
|
maxTokens: maxOrNull(memberSpecs.map(spec => spec.maxTokens)),
|
|
948
1008
|
...(cursorMaxMode === undefined ? {} : { cursorMaxMode }),
|
|
949
1009
|
...(cursorMaxModeRoutes === undefined ? {} : { cursorMaxModeRoutes }),
|
|
1010
|
+
...(antigravityWireProfiles === undefined ? {} : { antigravityWireProfiles }),
|
|
950
1011
|
};
|
|
951
1012
|
if (memberSpecs.some(spec => spec.isProviderDefault === true)) {
|
|
952
1013
|
collapsed.isProviderDefault = true;
|
|
@@ -59,6 +59,8 @@ export interface FactoryDroidModelPolicy {
|
|
|
59
59
|
entitlement: FactoryDroidEntitlement;
|
|
60
60
|
/** Native default with no caller effort is thinking off. */
|
|
61
61
|
defaultReasoningOff: boolean;
|
|
62
|
+
/** A `generate_image` model: gated by the org's image-generation settings, served through Factory's image routes. */
|
|
63
|
+
image: boolean;
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
/** One registry model: its roster row and resolved policy. */
|
|
@@ -128,6 +130,7 @@ function readPolicy(spec: ModelSpec<"factory-droid-agent">): FactoryDroidModelPo
|
|
|
128
130
|
...(baseVariant !== undefined && { baseVariant }),
|
|
129
131
|
},
|
|
130
132
|
defaultReasoningOff: catalog.defaultReasoningOff === true,
|
|
133
|
+
image: catalog.kind === "image",
|
|
131
134
|
};
|
|
132
135
|
}
|
|
133
136
|
|
package/src/compat/resolve.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { hostMatchesUrl, modelMatchesHost } from "../hosts";
|
|
|
20
20
|
import { withoutUnverifiedThinking } from "../model-thinking";
|
|
21
21
|
import type {
|
|
22
22
|
Api,
|
|
23
|
+
CatalogPolicyInputs,
|
|
23
24
|
CompatOf,
|
|
24
25
|
ModelSpec,
|
|
25
26
|
OpenAICompat,
|
|
@@ -126,14 +127,14 @@ class IdentityFacts {
|
|
|
126
127
|
* pairing runs only its lead, so the lead's reviewed rules (cache-write rate,
|
|
127
128
|
* long-context tier) apply to it at build time.
|
|
128
129
|
*/
|
|
129
|
-
function policyModelId
|
|
130
|
+
function policyModelId(spec: CatalogPolicyInputs): string {
|
|
130
131
|
const wireId = spec.requestModelId;
|
|
131
132
|
if (wireId === undefined || wireId === spec.id) return spec.id;
|
|
132
133
|
if (classifyModel(spec.provider, spec.id).class !== "unknown") return spec.id;
|
|
133
134
|
return classifyModel(spec.provider, wireId).class === "unknown" ? spec.id : wireId;
|
|
134
135
|
}
|
|
135
136
|
|
|
136
|
-
function resolveIdentity
|
|
137
|
+
function resolveIdentity(spec: CatalogPolicyInputs): ModelIdentity {
|
|
137
138
|
// Strict on purpose: ambiguous identity is a rule-authoring defect surfaced
|
|
138
139
|
// at build/CI time, never silently degraded to `unknown`. Discovery
|
|
139
140
|
// normalization opts into leniency through `classifyModel` directly.
|
|
@@ -924,6 +925,7 @@ function resolveAnthropicPolicy(
|
|
|
924
925
|
supportsSamplingParams: true,
|
|
925
926
|
requiresToolResultId: false,
|
|
926
927
|
requiresThinkingEnabled,
|
|
928
|
+
requiresThinkingPresence: false,
|
|
927
929
|
replayUnsignedThinking:
|
|
928
930
|
!signingEndpoint && (compatReasoning(spec, axes) || modelMatchesHost(spec, "deepseekFamily")),
|
|
929
931
|
escapeBuiltinToolNames: false,
|
|
@@ -1305,8 +1307,8 @@ function fillExplicitThinking<TApi extends Api>(
|
|
|
1305
1307
|
// Entry
|
|
1306
1308
|
// ---------------------------------------------------------------------------
|
|
1307
1309
|
|
|
1308
|
-
function buildResolveTarget
|
|
1309
|
-
spec:
|
|
1310
|
+
function buildResolveTarget(
|
|
1311
|
+
spec: CatalogPolicyInputs,
|
|
1310
1312
|
identity: ModelIdentity,
|
|
1311
1313
|
providerType = spec.providerType ?? spec.provider,
|
|
1312
1314
|
): ResolveTarget {
|
|
@@ -1338,7 +1340,7 @@ export function resolveDiscoveryApi(spec: ModelSpec<Api>, providerType: string):
|
|
|
1338
1340
|
* {@link resolveModelPolicy} without resolving the compat and thinking
|
|
1339
1341
|
* policies, which dominate its cost on catalog-wide scans.
|
|
1340
1342
|
*/
|
|
1341
|
-
export function resolveCatalogAxes(spec:
|
|
1343
|
+
export function resolveCatalogAxes(spec: CatalogPolicyInputs): Record<string, unknown> {
|
|
1342
1344
|
return resolveCascade(buildResolveTarget(spec, resolveIdentity(spec))).catalog;
|
|
1343
1345
|
}
|
|
1344
1346
|
|
|
@@ -223,15 +223,15 @@ One object axis carries a computed form: `long-context-cost` accepts either the
|
|
|
223
223
|
|
|
224
224
|
`long-context-window-uncapped #true` keeps a model's `long-context-cost` tier from capping its runtime context window while extended context is off: the coding agent normally lowers the window to the tier's input threshold so compaction fires before a request crosses into premium pricing. Use it where the tier is an API-equivalent estimate on a subscription host (`xai-oauth`) or where the model is served at its full window regardless (GPT-5.4, except on GitHub Copilot). `buildModel` materializes it as `Model.longContextWindowUncapped`; explicit user context overrides still apply.
|
|
225
225
|
|
|
226
|
-
`max-tokens-fallback` seeds `maxTokens` only when the row reports none, and `max-tokens-ceiling` lowers a larger reported `maxTokens` to the host's output cap (an unknown budget stays unknown unless a fallback seeded it). Both apply in `buildModel` after `limits-patch`, so discovery mappers pass upstream output budgets through verbatim. See the Kimi rules in [`providers/fireworks.kdl`](providers/fireworks.kdl).
|
|
226
|
+
`max-tokens-fallback` seeds `maxTokens` only when the row reports none, and `max-tokens-ceiling` lowers a larger reported `maxTokens` to the host's output cap (an unknown budget stays unknown unless a fallback seeded it); the ceiling also lowers discovered Antigravity per-SKU `maxOutputTokens` (`antigravityWireProfiles`, row and per-account), which the transport sends verbatim. Both apply in `buildModel` after `limits-patch`, so discovery mappers pass upstream output budgets through verbatim. See the Kimi rules in [`providers/fireworks.kdl`](providers/fireworks.kdl).
|
|
227
227
|
|
|
228
|
-
`inline-image-byte-budget` caps retained base64 image characters for a deployment's request body. It leaves room for tool schemas and text beneath the provider's body-size limit; the coding agent reads it through `resolveInlineImageByteBudget` before sending live history, and snapcompact gives its archive frames half of it (`frameDataBytesBudget`). The budget applies only while the request reaches the host the rules describe (the Anthropic API, first-party OpenAI, the Codex backend at its default URL, or Factory Droid's own global or EU API host), which callers decide with pi-ai's `reachesBudgetedHost`: `compat.officialEndpoint` for the configured `baseUrl`, for first-party Anthropic models also the `ANTHROPIC_BASE_URL` or Foundry `FOUNDRY_BASE_URL` reroute applied at request time, and for Factory Droid models the `baseUrl` origin. A custom or rerouted endpoint imposes its own body limit.
|
|
228
|
+
`inline-image-byte-budget` caps retained base64 image characters for a deployment's request body. It leaves room for tool schemas and text beneath the provider's body-size limit; the coding agent reads it through `resolveInlineImageByteBudget` before sending live history, and snapcompact gives its archive frames half of it (`frameDataBytesBudget`). The budget applies only while the request reaches the host the rules describe (the Anthropic API, first-party OpenAI, the Codex backend at its default URL, DeepSeek's API, or Factory Droid's own global or EU API host), which callers decide with pi-ai's `reachesBudgetedHost`: `compat.officialEndpoint` for the configured `baseUrl`, for first-party Anthropic models also the `ANTHROPIC_BASE_URL` or Foundry `FOUNDRY_BASE_URL` reroute applied at request time, and for Factory Droid models the `baseUrl` origin. A custom or rerouted endpoint imposes its own body limit.
|
|
229
229
|
|
|
230
230
|
`request-body-byte-limit` is the largest request body the host accepts (Factory Droid's hosted routes: 4,500,000 bytes), under the same gate. Where it is set, the byte clamp keeps the inline images of the newest user message and then of the newest image-bearing tool result even past `inline-image-byte-budget`, each only while the kept images fit the limit less the request's other serialized bytes, and evicts older images instead; read through `resolveRequestBodyByteLimit`.
|
|
231
231
|
|
|
232
|
-
`catalog-endpoint-budgets #true` makes these host budgets apply whenever a request reaches the provider's own catalog endpoint (an unset `baseUrl`, or an `endpoint-hosts` host; see `isCatalogEndpointUrl`), for a hosted gateway such as Factory Droid whose compat names no official endpoint
|
|
232
|
+
`catalog-endpoint-budgets #true` makes these host budgets apply whenever a request reaches the provider's own catalog endpoint (an unset `baseUrl`, or an `endpoint-hosts` host; see `isCatalogEndpointUrl`), for a hosted gateway such as Factory Droid whose compat names no official endpoint, or a first-party provider such as DeepSeek whose `openai-completions` compat resolves no `officialEndpoint`. Unassigned, they apply only on the official endpoint.
|
|
233
233
|
|
|
234
|
-
`image-count-budget` is the most images one request may carry, archive frames, screenshots and imaged tool results combined. The coding agent reads it through `resolveImageCountBudget`, drops the oldest images past it, and caps snapcompact frames at it; unassigned hosts get a floor of 5. `official-image-count-budget` replaces it while the request reaches the host the rules describe (same gate as `inline-image-byte-budget`), for limits established on the host's own endpoint (Anthropic: 600, 100 on 200k-window models; Codex: 2,000); a custom or rerouted endpoint keeps `image-count-budget` (Anthropic 90, Codex 200).
|
|
234
|
+
`image-count-budget` is the most images one request may carry, archive frames, screenshots and imaged tool results combined. The coding agent reads it through `resolveImageCountBudget`, drops the oldest images past it, and caps snapcompact frames at it; unassigned hosts get a floor of 5. `official-image-count-budget` replaces it while the request reaches the host the rules describe (same gate as `inline-image-byte-budget`), for limits established on the host's own endpoint (Anthropic: 600, 100 on 200k-window models; Codex: 2,000; DeepSeek: 600); a custom or rerouted endpoint keeps `image-count-budget` (Anthropic 90, Codex 200, DeepSeek 5).
|
|
235
235
|
|
|
236
236
|
`endpoint-hosts` lists the HTTPS hostnames a provider serves besides its bundled base URL's host, such as Copilot's per-plan `api.<plan>.githubcopilot.com` hosts. That host plus these define the provider's own endpoint (`isCatalogEndpointUrl`), which separates first-party traffic from a custom model or provider override that keeps a catalog provider id but points `baseUrl` at a gateway, proxy, or local server. Connection prewarming and request compression act only on the provider's own endpoint.
|
|
237
237
|
|
|
@@ -245,7 +245,12 @@ One object axis carries a computed form: `long-context-cost` accepts either the
|
|
|
245
245
|
|
|
246
246
|
`prompt-cache-persistent #true` marks a provider whose own endpoint keeps prompt-cache entries indefinitely (logged-in Codex accounts). The coding agent reads it through `isPromptCachePersistent` and skips idle compaction, which would only discard a prefix that stays warm; a custom `baseUrl` reusing the provider id does not qualify. Unassigned means entries expire.
|
|
247
247
|
|
|
248
|
-
`
|
|
248
|
+
`shared-prompt-cache #true` marks a lane that rewards routing related requests under one shared prompt-cache key instead of each conversation's own identity. Missing or `#false` keeps per-conversation routing. Two consumers read it against the model each request actually sends (primary turns, handoff, side requests, and remote compaction under its `remoteCompaction.api`/`model` override):
|
|
249
|
+
|
|
250
|
+
- The coding agent gives a Task child the derived sibling key `<parent cache key>:<agent>` only on opted-in models; an explicit key (`--prompt-cache-key`, an SDK key, or a full fork's inherited key) always wins. The candidate is persisted on the session header at its first eligible request and survives full forks, `/tan`, and reopening; new and partial sessions discard it.
|
|
251
|
+
- OpenCode Go (`providerType ?? provider` is `opencode-go`) sends any explicit prompt-cache key as `x-opencode-session`, so siblings, forks, and their parent share one gateway cache. Without an explicit key the header keeps the conversation id. Credentials and response state stay per conversation.
|
|
252
|
+
|
|
253
|
+
Opted in: Muse Code `muse-spark-1.3`, `muse-spark-1.3-contributor`, and the four Wonder variants over `openai-responses` (Meta documents shared-prefix `prompt_cache_key` routing; sibling reuse measured on Spark 1.3 Contributor). OpenCode Go `muse-spark-1.3-contributor`, `muse-spark-1.2-contributor`, `gpt-5.6-luna`, `gpt-6-luna`, and `grok-4.6` over `openai-responses`, and `deepseek-v4-pro` and `omen-alpha` over `openai-completions`. A Go lane qualifies only when a cold / different-family / same-family probe warms on the repeated key and stays cold under the different key; [`providers/opencode-go.kdl`](providers/opencode-go.kdl) records the per-lane tallies and the lanes that warmed under any key (and so gain nothing). The standard Go `muse-spark-1.3`/`1.2` ids stay off: the gateway answers "Model is unavailable". Custom providers opt in only by declaring a matching `providerType`.
|
|
249
254
|
|
|
250
255
|
`image-max-edge` is the longest image edge, in pixels, a host passes to the model; it downscales larger images to fit first (Cursor: 1024 for Claude and GPT). Snapcompact reads it through `resolveImageMaxEdge` and renders frames no wider, so their glyphs reach the model at the size they were drawn; unassigned means the host keeps the image's size.
|
|
251
256
|
|
|
@@ -322,6 +327,7 @@ behavior {
|
|
|
322
327
|
exclude-substring "embedding"
|
|
323
328
|
}
|
|
324
329
|
model-operations provider="openai" { exact "o3"; prefix "gpt-"; operation "generate_image" }
|
|
330
|
+
append-only-context-providers "deepseek" "ollama" "google-antigravity" "google" "google-vertex"
|
|
325
331
|
cursor-effort family-marker="gpt-" { tier "minimal" "low" "medium" "high" "xhigh" "max" }
|
|
326
332
|
cursor-model-parameter model="composer-2.5" id="fast" value="false"
|
|
327
333
|
quota-tiers provider="openai-codex" {
|
|
@@ -350,6 +356,8 @@ behavior {
|
|
|
350
356
|
|
|
351
357
|
`exclude-discovery-modes` takes one or more exact, case-sensitive upstream mode strings plus `provider=`; discovery mappers preserve missing, malformed, and unknown modes unless the provider policy explicitly lists them. Matcher properties on `route` / `exclude-models` / `tier` nodes are `exact=` / `prefix=` / `substring=` / `glob=`, repeatable. `strip-prefix=#true` on a prefix route strips the matched prefix off the wire id. Values are copied verbatim from the TS constants they replaced; runtime accessors live in `src/compat/behavior.ts`.
|
|
352
358
|
|
|
359
|
+
`append-only-context-providers` names hosts whose prefix caches benefit from append-only message history. The coding agent uses this list for `provider.appendOnlyContext: auto`; user `on`/`off` always takes precedence, and URL/explicit stored-request signals remain separate.
|
|
360
|
+
|
|
353
361
|
`role-defaults "<role>"` declares one agent role's built-in default model selector chain, one `model "<selector>"` child per entry, most preferred first. Selectors are copied verbatim (`provider/id`, bare ids, fuzzy fragments such as `-mini`, and `@role` references); duplicates within a role and repeated roles are compile errors. `roleDefaultModels()` returns every chain keyed by role in declaration order.
|
|
354
362
|
|
|
355
363
|
## Auth grammar
|
|
@@ -7,7 +7,8 @@ auth "google-antigravity" {
|
|
|
7
7
|
authorize-url "https://accounts.google.com/o/oauth2/v2/auth"
|
|
8
8
|
scopes "https://www.googleapis.com/auth/cloud-platform" "https://www.googleapis.com/auth/userinfo.email" \
|
|
9
9
|
"https://www.googleapis.com/auth/userinfo.profile" "https://www.googleapis.com/auth/cclog" \
|
|
10
|
-
"https://www.googleapis.com/auth/experimentsandconfigs"
|
|
10
|
+
"https://www.googleapis.com/auth/experimentsandconfigs" "https://www.googleapis.com/auth/aicode"
|
|
11
|
+
pkce #true
|
|
11
12
|
authorize-params { access_type "offline"; prompt "consent" }
|
|
12
13
|
instructions "Complete the sign-in in your browser."
|
|
13
14
|
callback port=51121 path="/oauth-callback" hostname="127.0.0.1"
|
|
@@ -3,7 +3,7 @@ auth "llama.cpp" {
|
|
|
3
3
|
env "LLAMA_CPP_API_KEY"
|
|
4
4
|
login "api-key" {
|
|
5
5
|
auth-url "https://github.com/ggml-org/llama.cpp#quick-start"
|
|
6
|
-
instructions "Paste your llama.cpp API key if your server requires auth. Leave empty for local no-auth mode (default base
|
|
6
|
+
instructions "Paste your llama.cpp API key if your server requires auth. Leave empty for local no-auth mode (default base URLs: http://127.0.0.1:8080, then http://127.0.0.1:9931; set LLAMA_CPP_BASE_URL to customize)."
|
|
7
7
|
prompt "Paste your llama.cpp API key (optional for local no-auth)" placeholder="llama-cpp-local"
|
|
8
8
|
empty-fallback "llama-cpp-local"
|
|
9
9
|
}
|
|
@@ -4,6 +4,6 @@ auth "xiaomi-token-plan-ams" {
|
|
|
4
4
|
auth-url "https://platform.xiaomimimo.com/console/plan-manage"
|
|
5
5
|
instructions "Copy your token-plan API key for the Europe region"
|
|
6
6
|
prompt "Paste your Xiaomi Token Plan Europe API key (tp-...)" placeholder="tp-..."
|
|
7
|
-
validate "chat-completions" label="xiaomi" base-url="https://token-plan-ams.xiaomimimo.com/v1" model="mimo-v2.
|
|
7
|
+
validate "chat-completions" label="xiaomi" base-url="https://token-plan-ams.xiaomimimo.com/v1" model="mimo-v2.6-flash"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -4,6 +4,6 @@ auth "xiaomi-token-plan-cn" {
|
|
|
4
4
|
auth-url "https://platform.xiaomimimo.com/console/plan-manage"
|
|
5
5
|
instructions "Copy your token-plan API key for the China region"
|
|
6
6
|
prompt "Paste your Xiaomi Token Plan China API key (tp-...)" placeholder="tp-..."
|
|
7
|
-
validate "chat-completions" label="xiaomi" base-url="https://token-plan-cn.xiaomimimo.com/v1" model="mimo-v2.
|
|
7
|
+
validate "chat-completions" label="xiaomi" base-url="https://token-plan-cn.xiaomimimo.com/v1" model="mimo-v2.6-flash"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -4,6 +4,6 @@ auth "xiaomi-token-plan-sgp" {
|
|
|
4
4
|
auth-url "https://platform.xiaomimimo.com/console/plan-manage"
|
|
5
5
|
instructions "Copy your token-plan API key for the Singapore region"
|
|
6
6
|
prompt "Paste your Xiaomi Token Plan Singapore API key (tp-...)" placeholder="tp-..."
|
|
7
|
-
validate "chat-completions" label="xiaomi" base-url="https://token-plan-sgp.xiaomimimo.com/v1" model="mimo-v2.
|
|
7
|
+
validate "chat-completions" label="xiaomi" base-url="https://token-plan-sgp.xiaomimimo.com/v1" model="mimo-v2.6-flash"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -742,9 +742,14 @@ class "anthropic" {
|
|
|
742
742
|
}
|
|
743
743
|
on "google-antigravity" {
|
|
744
744
|
drop-unsigned-thinking #true
|
|
745
|
-
claude-thinking-beta-header #true
|
|
746
745
|
antigravity-claude-tool-mode #true
|
|
747
746
|
antigravity-usage-label "true"
|
|
747
|
+
// The interleaved-thinking beta gated Claude 4.x thinking here. The
|
|
748
|
+
// native 2.26.0 client sends no beta for Claude 5.5, whose thinking
|
|
749
|
+
// streams without it.
|
|
750
|
+
revision "<5" {
|
|
751
|
+
claude-thinking-beta-header #true
|
|
752
|
+
}
|
|
748
753
|
}
|
|
749
754
|
}
|
|
750
755
|
|
|
@@ -48,6 +48,16 @@ class "minimax" {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
// MiniMax's standard API doubles every rate above 512K input tokens;
|
|
52
|
+
// subscription hosts retain the same rates only as usage estimates.
|
|
53
|
+
on "minimax" "minimax-cn" "minimax-code" "minimax-code-cn" {
|
|
54
|
+
models "MiniMax-M3" {
|
|
55
|
+
long-context-cost {
|
|
56
|
+
input-threshold 512000
|
|
57
|
+
multiplier 2.0
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
51
61
|
on "alibaba-coding-plan" "minimax-code" "minimax-code-cn" "wafer-serverless" {
|
|
52
62
|
supports-developer-role #false
|
|
53
63
|
}
|
|
@@ -116,13 +116,27 @@ provider "anthropic" {
|
|
|
116
116
|
family "fable" {
|
|
117
117
|
server-side-fallback-models "claude-opus-5"
|
|
118
118
|
// Fallback-credit redemption targets: the refused model's permitted
|
|
119
|
-
// fallback targets
|
|
119
|
+
// fallback targets
|
|
120
120
|
// (https://platform.claude.com/docs/en/build-with-claude/fallback-credit).
|
|
121
|
+
// Fable 5 and 5.1 → Opus 4.8 and Opus 5.
|
|
121
122
|
fallback-credit-targets "claude-opus-4-8" "claude-opus-5"
|
|
122
123
|
}
|
|
123
124
|
family "mythos" {
|
|
124
125
|
server-side-fallback-models "claude-opus-5"
|
|
125
126
|
}
|
|
127
|
+
family "opus" {
|
|
128
|
+
revision "=5.5" {
|
|
129
|
+
fallback-credit-targets "claude-opus-4-8" "claude-opus-5"
|
|
130
|
+
}
|
|
131
|
+
revision "=5" {
|
|
132
|
+
fallback-credit-targets "claude-opus-4-8"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
family "sonnet" {
|
|
136
|
+
revision "=5.5" {
|
|
137
|
+
fallback-credit-targets "claude-sonnet-5"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
126
140
|
}
|
|
127
141
|
// residue: taxonomy ranks and exact globs do not isolate these models.
|
|
128
142
|
models "*20240229" "claude-3-7-sonnet-20250219" {
|
|
@@ -5,6 +5,18 @@ provider "deepseek" {
|
|
|
5
5
|
env "DEEPSEEK_API_KEY"
|
|
6
6
|
discovery label="DeepSeek"
|
|
7
7
|
|
|
8
|
+
// DeepSeek's vision guide documents 600 images per request and a 48 MiB
|
|
9
|
+
// request body. OMP reserves 8 MiB for text, tools, and the JSON envelope
|
|
10
|
+
// (48 MiB - 8 MiB = 40 MiB); Anthropic's 24,000,000-byte image budget under
|
|
11
|
+
// its 32 MB body uses an 8 MB reserve. DeepSeek documents MiB, so this uses
|
|
12
|
+
// an 8 MiB reserve. The split is OMP's conservative margin, not a
|
|
13
|
+
// DeepSeek-documented figure. A custom baseUrl keeps the conservative
|
|
14
|
+
// catalog floor because the gateway's own limits are unknown.
|
|
15
|
+
// Source: https://api-docs.deepseek.com/guides/vision#limits
|
|
16
|
+
catalog-endpoint-budgets #true
|
|
17
|
+
official-image-count-budget 600
|
|
18
|
+
inline-image-byte-budget 41943040
|
|
19
|
+
|
|
8
20
|
extra-body {
|
|
9
21
|
thinking {
|
|
10
22
|
type "enabled"
|
|
@@ -52,7 +64,7 @@ provider "deepseek" {
|
|
|
52
64
|
max-tokens 384000
|
|
53
65
|
}
|
|
54
66
|
}
|
|
55
|
-
//
|
|
67
|
+
// DeepSeek kept Pro billing unchanged after September 14 (2026-09-10 change log).
|
|
56
68
|
models "deepseek-v4-pro" {
|
|
57
69
|
cost-patch {
|
|
58
70
|
input 1.32
|
|
@@ -74,15 +86,6 @@ provider "deepseek" {
|
|
|
74
86
|
end-minute 600
|
|
75
87
|
}
|
|
76
88
|
}
|
|
77
|
-
effective-rates {
|
|
78
|
-
flash-pricing {
|
|
79
|
-
effective-from "2026-09-14T04:00:00Z"
|
|
80
|
-
input 0.30
|
|
81
|
-
output 1.20
|
|
82
|
-
cache-read 0.006
|
|
83
|
-
cache-write 0
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
89
|
}
|
|
87
90
|
}
|
|
88
91
|
// residue: taxonomy ranks and exact globs do not isolate these models.
|
|
@@ -405,6 +405,26 @@ provider "factory-droid" {
|
|
|
405
405
|
cost input=0 output=0 cache-read=0 cache-write=0
|
|
406
406
|
limits context=196600 max-tokens=64000
|
|
407
407
|
}
|
|
408
|
+
// `generate_image` models, in the CLI's tool preference order. GPT Image 2
|
|
409
|
+
// is retired from the CLI's selectable chain and is not listed.
|
|
410
|
+
model "gpt-image-2.5-sunburst" name="GPT Image 2.5" {
|
|
411
|
+
reasoning #false
|
|
412
|
+
input "text" "image"
|
|
413
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
414
|
+
limits
|
|
415
|
+
}
|
|
416
|
+
model "gpt-image-2.5-flare" name="GPT Image 2.5 Flare" {
|
|
417
|
+
reasoning #false
|
|
418
|
+
input "text" "image"
|
|
419
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
420
|
+
limits
|
|
421
|
+
}
|
|
422
|
+
model "gemini-3-pro-image-preview" name="Gemini 3 Pro Image" {
|
|
423
|
+
reasoning #false
|
|
424
|
+
input "text" "image"
|
|
425
|
+
cost input=0 output=0 cache-read=0 cache-write=0
|
|
426
|
+
limits
|
|
427
|
+
}
|
|
408
428
|
}
|
|
409
429
|
|
|
410
430
|
// Upstream serving regions (the CLI's upstream region table). A model's own
|
|
@@ -836,6 +856,23 @@ provider "factory-droid" {
|
|
|
836
856
|
thinking-requires-effort #true
|
|
837
857
|
thinking-default-level "high"
|
|
838
858
|
}
|
|
859
|
+
// Image models: the org's `imageGenerationEnabled` and
|
|
860
|
+
// `imageGenerationAllowedModelIds` managed settings gate them
|
|
861
|
+
// (discovery/factory-droid.ts), not feature flags. Credits follow the CLI's
|
|
862
|
+
// image registry: OpenAI output is image tokens at 6x input, Gemini's 60x.
|
|
863
|
+
models "gpt-image-2.5-sunburst" "gpt-image-2.5-flare" {
|
|
864
|
+
kind "image"
|
|
865
|
+
routing-family "openai"
|
|
866
|
+
upstream-rotation "openai"
|
|
867
|
+
credit-rates { input 2.0; output 6 }
|
|
868
|
+
}
|
|
869
|
+
models "gemini-3-pro-image-preview" {
|
|
870
|
+
kind "image"
|
|
871
|
+
routing-family "google"
|
|
872
|
+
upstream-rotation "google"
|
|
873
|
+
region-upstreams-us
|
|
874
|
+
credit-rates { input 0.8; output 60 }
|
|
875
|
+
}
|
|
839
876
|
models "inkling" {
|
|
840
877
|
routing-family "factory"
|
|
841
878
|
upstream-rotation "fireworks"
|
|
@@ -1130,6 +1167,12 @@ provider "factory-droid" {
|
|
|
1130
1167
|
on-upstream "snowflake" {
|
|
1131
1168
|
disabled-thinking "disabled"
|
|
1132
1169
|
}
|
|
1170
|
+
// Factory's proxy honors `ttl: "1h"` without the extended-cache-ttl beta
|
|
1171
|
+
// and the Anthropic and Bedrock upstreams reject the beta.
|
|
1172
|
+
extended-cache-ttl-beta #false
|
|
1173
|
+
on-upstream "anthropic" "vertex_anthropic" "bedrock_anthropic" "azure_anthropic" {
|
|
1174
|
+
supports-long-cache-retention #true
|
|
1175
|
+
}
|
|
1133
1176
|
}
|
|
1134
1177
|
// Adaptive models the registry marks `supportsDisabledThinking` send the
|
|
1135
1178
|
// explicit disabled form at Off on every upstream.
|
|
@@ -1137,8 +1180,13 @@ provider "factory-droid" {
|
|
|
1137
1180
|
"claude-opus-4-8-fast" "claude-opus-5" "claude-opus-5-fast" "claude-haiku-5-5" {
|
|
1138
1181
|
disabled-thinking "disabled"
|
|
1139
1182
|
}
|
|
1183
|
+
// Cache entry lifetimes per retention tier, in seconds, for the cache warmer.
|
|
1140
1184
|
models "claude-*" "atlas-07-21" "aster-07-15" {
|
|
1141
1185
|
anthropic-thinking "adaptive-summarized"
|
|
1186
|
+
prompt-cache {
|
|
1187
|
+
short 300
|
|
1188
|
+
long 3600
|
|
1189
|
+
}
|
|
1142
1190
|
}
|
|
1143
1191
|
models "claude-opus-4-6" "claude-sonnet-4-6" {
|
|
1144
1192
|
anthropic-thinking "adaptive"
|
|
@@ -52,6 +52,13 @@ provider "google-antigravity" {
|
|
|
52
52
|
prompt-cache {
|
|
53
53
|
short 300
|
|
54
54
|
}
|
|
55
|
+
// Cloud Code Assist rejects Claude 4.x requests over 64,000 output
|
|
56
|
+
// tokens with a 400 (`Request contains an invalid argument`) even when
|
|
57
|
+
// the roster advertises 65,536 (#3067). The ceiling also lowers the
|
|
58
|
+
// discovered per-SKU wire caps the transport sends verbatim.
|
|
59
|
+
revision "<5" {
|
|
60
|
+
max-tokens-ceiling 64000
|
|
61
|
+
}
|
|
55
62
|
family "opus" {
|
|
56
63
|
thinking-mode "budget"
|
|
57
64
|
}
|
|
@@ -44,11 +44,15 @@ provider "kimi-code" {
|
|
|
44
44
|
// Moonshot list price only when discovery reports $0, so a future priced
|
|
45
45
|
// envelope keeps its real rates. `kimi-for-coding` is K2.8 Preview — no
|
|
46
46
|
// public API SKU exists yet, so it uses the K2.7 Code line rate.
|
|
47
|
+
// K3 bills cache writes at the default 5m TTL rate (omp never requests
|
|
48
|
+
// 1h); K2.x SKUs have no cache-write charge.
|
|
49
|
+
// https://platform.kimi.ai/docs/guide/context-caching
|
|
47
50
|
models "k3" "k3-256k" {
|
|
48
51
|
cost-fallback {
|
|
49
52
|
input 3.0
|
|
50
53
|
output 15.0
|
|
51
54
|
cache-read 0.3
|
|
55
|
+
cache-write 3.0
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
models "kimi-for-coding" {
|
|
@@ -71,7 +71,7 @@ provider "muse-code" {
|
|
|
71
71
|
// Spark 1.3 Contributor warmed siblings hit 10/10 vs 0/10 with per-child keys (2026-10-12).
|
|
72
72
|
// Meta documents shared-prefix prompt_cache_key routing; keep the opt-in on these exact Muse Code IDs.
|
|
73
73
|
models "muse-spark-1.3" "muse-spark-1.3-contributor" "muse-wonder-1.0" "muse-wonder-1.0-contributor" "muse-wonder-full-1.0" "muse-wonder-full-1.0-contributor" {
|
|
74
|
-
|
|
74
|
+
shared-prompt-cache #true
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
// Same capability-less `/v1/models` as Meta: unknown ids are opt-in.
|
|
@@ -209,10 +209,10 @@ provider "openai-codex" {
|
|
|
209
209
|
models "gpt-5.6-sol*" "gpt-5.6" {
|
|
210
210
|
long-context-cost {
|
|
211
211
|
input-threshold 272000
|
|
212
|
-
input
|
|
213
|
-
output
|
|
214
|
-
cache-read
|
|
215
|
-
cache-write
|
|
212
|
+
input 8.0
|
|
213
|
+
output 30.0
|
|
214
|
+
cache-read 0.8
|
|
215
|
+
cache-write 10.0
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
models "gpt-5.6-terra*" {
|