@linxiraos/pi-catalog 1.1.8 → 1.1.10

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 CHANGED
@@ -2,10 +2,13 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
- ## [1.1.8] - 2026-09-04
5
+ ## [1.1.10] - 2026-09-07
6
6
 
7
- - OMP sync v18.1.2–v18.1.5: declarative KDL auth contract compiler (`@bgotink/kdl` now a devDependency), provider auth definitions, and model-policy rule updates.
8
- - Restored the biome toolchain for catalog scripts after the v18.1.5 merge briefly adopted the upstream oxlint/oxfmt configuration.
7
+ - OMP v18.1.11 sync baseline (`e3106be68f`); no package-specific user-visible changes.
8
+
9
+ ## [1.1.9] - 2026-09-05
10
+
11
+ - v18.1.10 sync baseline; retired pi-hashline catalog entry removed from the version-line catalogs.
9
12
 
10
13
  ## [1.1.6] - 2026-08-30
11
14
 
@@ -36,6 +36,14 @@ export interface AxisDef {
36
36
  }
37
37
  /** Effort tiers accepted by taxonomy collapse/override vocabulary (`Effort` ∪ `"off"`). */
38
38
  export declare const EFFORT_TIERS: readonly string[];
39
+ /**
40
+ * How hard agent prompts push subagent delegation for a model lineage
41
+ * (`delegation-bias` axis). `eager` is the unassigned default: the prompt
42
+ * actively pushes fan-out. `restrained` keeps fan-out for genuinely parallel
43
+ * slices but forbids reflexive scouts and single-agent babysitting. `gated`
44
+ * forbids subagents unless the user or a skill asks.
45
+ */
46
+ export declare const DELEGATION_BIASES: readonly ["eager", "restrained", "gated"];
39
47
  /** Narrow a KDL string to an effort tier (`Effort` ∪ `"off"`). */
40
48
  export declare function isEffortTier(value: string): value is Effort | "off";
41
49
  /** Narrow a KDL string to a thinking control mode. */
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Delegation bias: how hard the coding agent's prompts push subagent
3
+ * delegation for a model lineage. Authored on the `delegation-bias` catalog
4
+ * axis in `rules/classes/*.kdl` so appetite corrections live beside the other
5
+ * lineage truths instead of as revision compares in TypeScript.
6
+ *
7
+ * Resolved through the cascade at prompt-build time (session start, model
8
+ * switch) rather than baked onto `Model`: bundled rows are frozen by the
9
+ * generator, and the bias is read once per prompt rebuild, not per request.
10
+ */
11
+ import type { Model } from "../types.js";
12
+ import { DELEGATION_BIASES } from "./axes.js";
13
+ /** One of `DELEGATION_BIASES`; see that constant for the semantics of each tier. */
14
+ export type DelegationBias = (typeof DELEGATION_BIASES)[number];
15
+ /**
16
+ * Delegation bias for a built model; `eager` when no rule assigns one.
17
+ * Callers: system-prompt and tool-description rendering in the coding agent.
18
+ */
19
+ export declare function resolveDelegationBias(model: Model): DelegationBias;
@@ -407,7 +407,7 @@ export interface CompiledOAuthRequest {
407
407
  headers: Record<string, string>;
408
408
  timeoutMs?: number;
409
409
  }
410
- /** Loopback callback configuration for authorization-code logins. */
410
+ /** Callback transport configuration for authorization-code logins. */
411
411
  export interface CompiledCallback {
412
412
  port: number;
413
413
  path: string;
@@ -415,8 +415,10 @@ export interface CompiledCallback {
415
415
  redirectUri?: CompiledAuthValue;
416
416
  portFallback: boolean;
417
417
  manualOnly: boolean;
418
+ /** Temporarily receive a custom-scheme redirect through the native OS handler. */
419
+ nativeScheme: boolean;
418
420
  }
419
- /** Authorization-code login through the loopback callback server. */
421
+ /** Authorization-code login through a loopback, native-scheme, or manual callback. */
420
422
  export interface CompiledOAuthCodeLogin {
421
423
  kind: "oauth-code";
422
424
  clientId?: CompiledAuthValue;
@@ -26,6 +26,13 @@ export interface CodexModelDiscoveryOptions {
26
26
  export interface CodexModelDiscoveryResult {
27
27
  models: ModelSpec<"openai-codex-responses">[];
28
28
  etag?: string;
29
+ /**
30
+ * Set when the backend rejected the credential itself (401/403, e.g.
31
+ * `token_revoked`); `models` is empty. A definitive per-account denial,
32
+ * unlike the `null` result for transport/parse failures, so multi-account
33
+ * discovery can skip the account instead of aborting.
34
+ */
35
+ rejectedStatus?: 401 | 403;
29
36
  }
30
37
  /**
31
38
  * Fetches model metadata from Codex backend and normalizes it for pi model management.
@@ -0,0 +1,28 @@
1
+ import type { Api, Model } from "../types.js";
2
+ /** Catalog-delivered intelligence score and output speed for one model. */
3
+ export interface CatalogMetrics {
4
+ int?: number;
5
+ tps?: number;
6
+ }
7
+ /** The catalog metrics a model carries, or undefined when it reports none. A zero speed is "unmeasured", not a score. */
8
+ export declare function catalogMetricsOf(model: Model<Api>): CatalogMetrics | undefined;
9
+ /**
10
+ * Index of catalog metrics over every scored model seen so far. Built once per
11
+ * discovery cycle by the model registry and per provider by the model manager;
12
+ * `add` accumulates across providers so a proxy id resolves against any host's
13
+ * scored row.
14
+ */
15
+ export declare class CatalogMetricsIndex {
16
+ #private;
17
+ constructor(models?: Iterable<Model<Api>>);
18
+ get isEmpty(): boolean;
19
+ /** Record the metrics of every scored model; later rows fill fields earlier rows left unset. */
20
+ add(models: Iterable<Model<Api>>): void;
21
+ /** Metrics for `model` by exact id, else by dialect-normalized id when the classified identities agree. */
22
+ resolve(model: Model<Api>): CatalogMetrics | undefined;
23
+ }
24
+ /**
25
+ * Fill each model's `int`/`tps` from `index`. Returns the input array when no
26
+ * model changed so callers can keep identity-based caches.
27
+ */
28
+ export declare function applyCatalogMetrics<TApi extends Api>(models: Model<TApi>[], index: CatalogMetricsIndex): Model<TApi>[];
@@ -9,6 +9,13 @@ export declare function isZeroCostXaiOAuthReference(candidate: Model<Api>): bool
9
9
  * Pure: callers are responsible for memoizing the result.
10
10
  */
11
11
  export declare function buildModelReferenceIndex(models: Iterable<Model<Api>>): ModelReferenceIndex;
12
+ /**
13
+ * Expand a proxied/affixed model id into the ids it may be catalogued under,
14
+ * least-stripped first: bracket affixes, model-like segments, `:cloud`,
15
+ * namespace prefix, `:`→`-`, lowercase, and declared trailing markers.
16
+ * Shared by reference recovery and catalog-metric matching (`./metrics`).
17
+ */
18
+ export declare function getReferenceCandidateIds(modelId: string): string[];
12
19
  /**
13
20
  * Inherit bundled reference thinking only for same-provider matches. Wire routing
14
21
  * (`effortRouting`) is provider-specific; cross-provider inheritance can rewrite
@@ -31,6 +31,8 @@ export interface ModelsDevModel {
31
31
  provider?: {
32
32
  npm?: string;
33
33
  };
34
+ int?: number;
35
+ tps?: number;
34
36
  }
35
37
  /**
36
38
  * Fetches the models.dev catalog via catalog.stencil.so, which serves a
@@ -700,6 +700,13 @@ export interface ResolvedOpenAIResponsesCompat extends ResolvedOpenAISharedCompa
700
700
  * transport; earlier ids reject the value.
701
701
  */
702
702
  supportsAllTurnsReasoningContext: boolean;
703
+ /**
704
+ * Whether a `configuration_update` input item may change `reasoning.effort`
705
+ * mid-conversation while the request-level effort stays byte-stable for
706
+ * prompt caching. Rule-owned: GPT-6 Astra only; every other model rejects
707
+ * the item type with 400.
708
+ */
709
+ supportsConfigurationUpdate: boolean;
703
710
  /** Inject the `# Juice: 0 !important` developer item when reasoning is forced off (gpt-5.6+). */
704
711
  requiresReasoningOffJuiceInstruction: boolean;
705
712
  /**
@@ -997,6 +1004,10 @@ export interface Model<TApi extends Api = Api> {
997
1004
  isRecommended?: boolean;
998
1005
  /** Canonical thinking capability metadata for this model. */
999
1006
  thinking?: ThinkingConfig;
1007
+ /** Intelligence score delivered by the model catalog. */
1008
+ int?: number | null;
1009
+ /** Catalog-estimated output speed in tokens per second. */
1010
+ tps?: number | null;
1000
1011
  /**
1001
1012
  * Fully-resolved compatibility record, materialized once by `buildModel`.
1002
1013
  * Protocol handlers read fields; they never detect, resolve, or allocate.
@@ -1031,6 +1042,12 @@ export interface Model<TApi extends Api = Api> {
1031
1042
  guardrailVersion?: string;
1032
1043
  /** Bedrock guardrail trace verbosity. */
1033
1044
  guardrailTrace?: "enabled" | "disabled" | "enabled_full";
1045
+ /**
1046
+ * Bedrock invocation-log tags attached to every Converse request for this
1047
+ * model. Set from `providers.<provider>.requestMetadata`; the Bedrock
1048
+ * transport reads it directly and validates it against AWS's limits.
1049
+ */
1050
+ requestMetadata?: Record<string, string>;
1034
1051
  }
1035
1052
  /**
1036
1053
  * A model as authored by configs, bundled catalogs, and discovery — the input
@@ -4,8 +4,12 @@
4
4
  export declare const CODEX_BASE_URL = "https://chatgpt.com/backend-api";
5
5
  /**
6
6
  * Pinned OpenAI Codex client version (corresponds to @openai/codex package version).
7
+ *
8
+ * The backend version-gates model availability against this value on both
9
+ * `/models?client_version=` and `/responses` (`gpt-6-astra` requires ≥ 0.153.0);
10
+ * an older pin silently hides newer SKUs from discovery.
7
11
  */
8
- export declare const CODEX_CLIENT_VERSION = "0.144.1";
12
+ export declare const CODEX_CLIENT_VERSION = "0.153.0";
9
13
  export declare const OPENAI_HEADERS: {
10
14
  readonly BETA: "OpenAI-Beta";
11
15
  /** Codex feature-negotiation header; values identify opt-in wire protocols. */
@@ -28,18 +32,32 @@ export declare const OPENAI_HEADERS: {
28
32
  readonly ATTESTATION: "x-oai-attestation";
29
33
  /** Client-declared data residency for region-pinned enterprise workspaces. */
30
34
  readonly RESIDENCY: "x-openai-internal-codex-residency";
35
+ /**
36
+ * Model routing hint (codex-rs `X_CODEX_ROUTING_HINT_HEADER`): `model=<slug>`
37
+ * or `model=<slug>;tier=<service_tier>`; sent on every ChatGPT-OAuth
38
+ * Responses, compaction, and WebSocket handshake request. Built by
39
+ * {@link codexRoutingHint}.
40
+ */
41
+ readonly ROUTING_HINT: "x-codex-routing-hint";
31
42
  };
32
43
  export declare const OPENAI_HEADER_VALUES: {
33
44
  readonly BETA_RESPONSES: "responses=experimental";
34
45
  readonly BETA_RESPONSES_WEBSOCKETS_V2: "responses_websockets=2026-02-06";
35
46
  readonly REMOTE_COMPACTION_V2: "remote_compaction_v2";
36
- readonly ORIGINATOR_CODEX: "pi";
47
+ readonly ORIGINATOR_CODEX: "omp";
37
48
  };
38
49
  export declare const URL_PATHS: {
39
50
  readonly RESPONSES: "/responses";
40
51
  readonly CODEX_RESPONSES: "/codex/responses";
41
52
  };
42
53
  export declare const JWT_CLAIM_PATH: "https://api.openai.com/auth";
54
+ /**
55
+ * Build the `x-codex-routing-hint` value for a request (codex-rs
56
+ * `build_routing_hint_header`): the requested model slug plus the explicit
57
+ * service tier when one is set. Callers set it only on ChatGPT-OAuth requests
58
+ * to the Codex backend; API-key OpenAI traffic never carries it.
59
+ */
60
+ export declare function codexRoutingHint(model: string, serviceTier: string | null | undefined): string;
43
61
  /**
44
62
  * Extract account ID from a Codex JWT access token.
45
63
  * Returns undefined if the token is not a valid Codex JWT.
package/package.json CHANGED
@@ -1,104 +1,101 @@
1
1
  {
2
- "type": "module",
3
- "name": "@linxiraos/pi-catalog",
4
- "version": "1.1.8",
5
- "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
6
- "homepage": "https://linxira-os.github.io/zeta/",
7
- "author": "Can Boluk",
8
- "license": "MIT",
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
12
- "directory": "packages/catalog"
13
- },
14
- "bugs": {
15
- "url": "https://github.com/Linxira-OS/linxira-zeta/issues"
16
- },
17
- "keywords": [
18
- "ai",
19
- "llm",
20
- "models",
21
- "catalog",
22
- "discovery"
23
- ],
24
- "main": "./src/index.ts",
25
- "types": "./dist/types/index.d.ts",
26
- "scripts": {
27
- "check": "biome check . && bun run check:types",
28
- "check:types": "tsgo -p tsconfig.json --noEmit",
29
- "lint": "biome lint .",
30
- "test": "bun test --parallel",
31
- "fix": "biome check --write --unsafe .",
32
- "fmt": "biome format --write .",
33
- "gen:models": "bun scripts/generate-models.ts",
34
- "gen:compat": "bun scripts/compile-compat.ts",
35
- "gen:proto": "bun scripts/generate-protocols.ts"
36
- },
37
- "dependencies": {
38
- "@linxiraos/pi-omptype": "1.1.8",
39
- "@linxiraos/pi-utils": "1.1.8"
40
- },
41
- "devDependencies": {
42
- "@bgotink/kdl": "0.4.0",
43
- "@linxiraos/pi-ai": "1.1.8",
44
- "@types/bun": "^1.3.14"
45
- },
46
- "engines": {
47
- "bun": ">=1.3.14"
48
- },
49
- "files": [
50
- "src",
51
- "README.md",
52
- "CHANGELOG.md",
53
- "LICENSE",
54
- "THIRD-PARTY-NOTICES.txt",
55
- "dist/types"
56
- ],
57
2
  "exports": {
58
- ".": {
59
- "types": "./dist/types/index.d.ts",
60
- "import": "./src/index.ts"
3
+ "./*.js": "./src/*.ts",
4
+ "./*": {
5
+ "import": "./src/*.ts",
6
+ "types": "./dist/types/*.d.ts"
61
7
  },
62
- "./models.json": {
63
- "types": "./dist/types/models.json.d.d.ts",
64
- "import": "./src/models.json"
8
+ "./compat/*": {
9
+ "import": "./src/compat/*.ts",
10
+ "types": "./dist/types/compat/*.d.ts"
65
11
  },
66
- "./provider-models": {
67
- "types": "./dist/types/provider-models/index.d.ts",
68
- "import": "./src/provider-models/index.ts"
12
+ "./wire/*": {
13
+ "import": "./src/wire/*.ts",
14
+ "types": "./dist/types/wire/*.d.ts"
69
15
  },
70
- "./provider-models/*": {
71
- "types": "./dist/types/provider-models/*.d.ts",
72
- "import": "./src/provider-models/*.ts"
16
+ "./identity/*": {
17
+ "import": "./src/identity/*.ts",
18
+ "types": "./dist/types/identity/*.d.ts"
73
19
  },
74
- "./discovery": {
75
- "types": "./dist/types/discovery/index.d.ts",
76
- "import": "./src/discovery/index.ts"
20
+ "./identity": {
21
+ "import": "./src/identity/index.ts",
22
+ "types": "./dist/types/identity/index.d.ts"
77
23
  },
78
24
  "./discovery/*": {
79
- "types": "./dist/types/discovery/*.d.ts",
80
- "import": "./src/discovery/*.ts"
81
- },
82
- "./identity": {
83
- "types": "./dist/types/identity/index.d.ts",
84
- "import": "./src/identity/index.ts"
25
+ "import": "./src/discovery/*.ts",
26
+ "types": "./dist/types/discovery/*.d.ts"
85
27
  },
86
- "./identity/*": {
87
- "types": "./dist/types/identity/*.d.ts",
88
- "import": "./src/identity/*.ts"
28
+ "./discovery": {
29
+ "import": "./src/discovery/index.ts",
30
+ "types": "./dist/types/discovery/index.d.ts"
89
31
  },
90
- "./wire/*": {
91
- "types": "./dist/types/wire/*.d.ts",
92
- "import": "./src/wire/*.ts"
32
+ "./provider-models/*": {
33
+ "import": "./src/provider-models/*.ts",
34
+ "types": "./dist/types/provider-models/*.d.ts"
93
35
  },
94
- "./compat/*": {
95
- "types": "./dist/types/compat/*.d.ts",
96
- "import": "./src/compat/*.ts"
36
+ "./provider-models": {
37
+ "import": "./src/provider-models/index.ts",
38
+ "types": "./dist/types/provider-models/index.d.ts"
97
39
  },
98
- "./*": {
99
- "types": "./dist/types/*.d.ts",
100
- "import": "./src/*.ts"
40
+ "./models.json": {
41
+ "import": "./src/models.json",
42
+ "types": "./dist/types/models.json.d.d.ts"
101
43
  },
102
- "./*.js": "./src/*.ts"
103
- }
44
+ ".": {
45
+ "import": "./src/index.ts",
46
+ "types": "./dist/types/index.d.ts"
47
+ }
48
+ },
49
+ "files": [
50
+ "src",
51
+ "README.md",
52
+ "CHANGELOG.md",
53
+ "LICENSE",
54
+ "THIRD-PARTY-NOTICES.txt",
55
+ "dist/types"
56
+ ],
57
+ "engines": {
58
+ "bun": ">=1.3.14"
59
+ },
60
+ "devDependencies": {
61
+ "@linxiraos/pi-ai": "1.1.10",
62
+ "@types/bun": "^1.3.14",
63
+ "@bgotink/kdl": "0.4.0"
64
+ },
65
+ "dependencies": {
66
+ "@linxiraos/pi-utils": "1.1.10",
67
+ "@linxiraos/pi-omptype": "1.1.10"
68
+ },
69
+ "scripts": {
70
+ "gen:proto": "bun scripts/generate-protocols.ts",
71
+ "gen:compat": "bun scripts/compile-compat.ts",
72
+ "gen:models": "bun scripts/generate-models.ts",
73
+ "test": "bun test --parallel",
74
+ "check:types": "tsgo -p tsconfig.json --noEmit",
75
+ "check": "tsgo -p tsconfig.json --noEmit"
76
+ },
77
+ "types": "./dist/types/index.d.ts",
78
+ "main": "./src/index.ts",
79
+ "keywords": [
80
+ "ai",
81
+ "llm",
82
+ "models",
83
+ "catalog",
84
+ "discovery"
85
+ ],
86
+ "bugs": {
87
+ "url": "https://github.com/Linxira-OS/linxira-zeta/issues"
88
+ },
89
+ "repository": {
90
+ "directory": "packages/catalog",
91
+ "url": "git+https://github.com/Linxira-OS/linxira-zeta.git",
92
+ "type": "git"
93
+ },
94
+ "license": "MIT",
95
+ "author": "Can Boluk",
96
+ "homepage": "https://linxira-os.github.io/zeta/",
97
+ "description": "Model catalog for omp: bundled model database, provider discovery descriptors, model identity, classification, and equivalence",
98
+ "version": "1.1.10",
99
+ "name": "@linxiraos/pi-catalog",
100
+ "type": "module"
104
101
  }
@@ -44,6 +44,15 @@ const EFFORTS = ["minimal", "low", "medium", "high", "xhigh", "max"] as const;
44
44
 
45
45
  /** Effort tiers accepted by taxonomy collapse/override vocabulary (`Effort` ∪ `"off"`). */
46
46
  export const EFFORT_TIERS: readonly string[] = [...EFFORTS, "off"];
47
+
48
+ /**
49
+ * How hard agent prompts push subagent delegation for a model lineage
50
+ * (`delegation-bias` axis). `eager` is the unassigned default: the prompt
51
+ * actively pushes fan-out. `restrained` keeps fan-out for genuinely parallel
52
+ * slices but forbids reflexive scouts and single-agent babysitting. `gated`
53
+ * forbids subagents unless the user or a skill asks.
54
+ */
55
+ export const DELEGATION_BIASES = ["eager", "restrained", "gated"] as const;
47
56
  const THINKING_MODES = [
48
57
  "effort",
49
58
  "budget",
@@ -128,6 +137,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
128
137
  "strict-responses-pairing": wire("strictResponsesPairing", ["openai-responses"]),
129
138
  "requires-reasoning-off-juice-instruction": wire("requiresReasoningOffJuiceInstruction", ["openai-responses"]),
130
139
  "supports-all-turns-reasoning-context": wire("supportsAllTurnsReasoningContext", ["openai-responses"]),
140
+ "supports-configuration-update": wire("supportsConfigurationUpdate", ["openai-responses"]),
131
141
  "strip-deepseek-special-tokens": wire("stripDeepseekSpecialTokens", OAI),
132
142
  "stream-markup-healing-pattern": wire("streamMarkupHealingPattern", OAI, "scalar", [
133
143
  "kimi",
@@ -260,6 +270,7 @@ export const AXES: Readonly<Record<string, AxisDef>> = {
260
270
  "context-promotion-target": { key: "contextPromotionTarget", set: "catalog", shape: "scalar" },
261
271
  "context-window-floor": { key: "contextWindowFloor", set: "catalog", shape: "scalar" },
262
272
  "cost-patch": { key: "costPatch", set: "catalog", shape: "object" },
273
+ "delegation-bias": { key: "delegationBias", set: "catalog", shape: "scalar", values: DELEGATION_BIASES },
263
274
  "edit-revision": { key: "editRevision", set: "catalog", shape: "scalar" },
264
275
  "input-modalities": { key: "inputModalities", set: "catalog", shape: "array", values: ["text", "image"] },
265
276
  "limits-patch": { key: "limitsPatch", set: "catalog", shape: "object" },
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Delegation bias: how hard the coding agent's prompts push subagent
3
+ * delegation for a model lineage. Authored on the `delegation-bias` catalog
4
+ * axis in `rules/classes/*.kdl` so appetite corrections live beside the other
5
+ * lineage truths instead of as revision compares in TypeScript.
6
+ *
7
+ * Resolved through the cascade at prompt-build time (session start, model
8
+ * switch) rather than baked onto `Model`: bundled rows are frozen by the
9
+ * generator, and the bias is read once per prompt rebuild, not per request.
10
+ */
11
+ import type { Model } from "../types";
12
+ import { DELEGATION_BIASES } from "./axes";
13
+ import { resolveCascade } from "./cascade";
14
+
15
+ /** One of `DELEGATION_BIASES`; see that constant for the semantics of each tier. */
16
+ export type DelegationBias = (typeof DELEGATION_BIASES)[number];
17
+
18
+ function isDelegationBias(value: unknown): value is DelegationBias {
19
+ return typeof value === "string" && (DELEGATION_BIASES as readonly string[]).includes(value);
20
+ }
21
+
22
+ /**
23
+ * Delegation bias for a built model; `eager` when no rule assigns one.
24
+ * Callers: system-prompt and tool-description rendering in the coding agent.
25
+ */
26
+ export function resolveDelegationBias(model: Model): DelegationBias {
27
+ const { identity } = model;
28
+ const bias = resolveCascade({
29
+ provider: model.provider,
30
+ class: identity.class,
31
+ model: model.id,
32
+ reasoning: Boolean(model.reasoning),
33
+ ...(identity.family !== undefined && { family: identity.family }),
34
+ ...(identity.revision !== undefined && { revision: identity.revision }),
35
+ }).catalog.delegationBias;
36
+ return isDelegationBias(bias) ? bias : "eager";
37
+ }
@@ -714,6 +714,7 @@ function resolveOpenAIResponsesPolicy(
714
714
  supportsImageDetailOriginal: !isXaiHost && !modelMatchesHost(hostModel, "githubCopilot"),
715
715
  supportsReasoningSummary: !isXaiHost,
716
716
  supportsAllTurnsReasoningContext: false,
717
+ supportsConfigurationUpdate: false,
717
718
  requiresReasoningOffJuiceInstruction: false,
718
719
  stripImageInput: false,
719
720
  thinkingLoopGuard: undefined,
@@ -815,6 +816,7 @@ function pickResponsesOnly(compat: ResolvedOpenAIResponsesCompat): ResponsesOnly
815
816
  supportsImageDetailOriginal: compat.supportsImageDetailOriginal,
816
817
  supportsObfuscationOptOut: compat.supportsObfuscationOptOut,
817
818
  supportsAllTurnsReasoningContext: compat.supportsAllTurnsReasoningContext,
819
+ supportsConfigurationUpdate: compat.supportsConfigurationUpdate,
818
820
  officialEndpoint: compat.officialEndpoint,
819
821
  harmonyLeakMitigation: compat.harmonyLeakMitigation,
820
822
  cacheControlFormat: compat.cacheControlFormat,
@@ -8,7 +8,7 @@ There are three ownership strata:
8
8
  - `classes/*.kdl` defines model-lineage truths: behavior inherent to a model line, optionally scoped to the providers where the census established it.
9
9
  - `providers/*.kdl` defines deployment contracts: behavior imposed by a host, plus documented per-model residue that taxonomy cannot express exactly.
10
10
  - `runtime/behavior.kdl` defines heuristics used before or outside exact model lookup: responses routing, API routes, quota tiers, plan requirements, model limits, roster exclusions, hosted defaults, pricing peers.
11
- - `auth/<provider>.kdl` defines the provider's auth contract: display name, env-var fallback, credential storage/format, and the declarative login / refresh flow that `@oh-my-pi/pi-ai`'s registry engines interpret (see [Auth grammar](#auth-grammar)).
11
+ - `auth/<provider>.kdl` defines the provider's auth contract: display name, env-var fallback, credential storage/format, and the declarative login / refresh flow that `@linxiraos/pi-ai`'s registry engines interpret (see [Auth grammar](#auth-grammar)).
12
12
 
13
13
  Do not move a statistically common provider behavior into a class file, or a lineage truth into a provider file. Absence is not evidence that a capability is stripped. Preserve comments that record census provenance, reviewed exceptions, and why a `models` residue remains.
14
14
 
@@ -257,7 +257,7 @@ Matcher properties on `route` / `exclude-models` / `tier` nodes are `exact=` / `
257
257
 
258
258
  ## Auth grammar
259
259
 
260
- Every provider has exactly one `auth "<id>" { … }` node under `auth/`; `auth/_order.kdl` holds a single `login-order "id" …` node pinning the `/login` roster order (every provider with a `login` and `show-in-login-list` unset/true must appear; providers without a login sort alphabetically after it). Runtime accessors live in `src/compat/auth.ts`; the id unions in the generated `src/compat/auth-ids.ts`. Every provider in `provider-models/descriptors.ts` needs an auth node (`@oh-my-pi/pi-ai` type-checks this).
260
+ Every provider has exactly one `auth "<id>" { … }` node under `auth/`; `auth/_order.kdl` holds a single `login-order "id" …` node pinning the `/login` roster order (every provider with a `login` and `show-in-login-list` unset/true must appear; providers without a login sort alphabetically after it). Runtime accessors live in `src/compat/auth.ts`; the id unions in the generated `src/compat/auth-ids.ts`. Every provider in `provider-models/descriptors.ts` needs an auth node (`@linxiraos/pi-ai` type-checks this).
261
261
 
262
262
  ```kdl
263
263
  auth "anthropic" {
@@ -271,7 +271,7 @@ auth "anthropic" {
271
271
  state "hex" // hex | uuid | none
272
272
  authorize-params { code "true" } // standard=#false drops client_id/response_type/redirect_uri/scope/PKCE/state
273
273
  instructions "Complete login in your browser…"
274
- callback port=54545 path="/callback" hostname="localhost" redirect-uri="…" redirect-uri-env="VAR" port-fallback=#true manual-only=#false
274
+ callback port=54545 path="/callback" hostname="localhost" redirect-uri="…" redirect-uri-env="VAR" port-fallback=#true manual-only=#false native-scheme=#false
275
275
  token url="https://api.anthropic.com/v1/oauth/token" body="json" { params { state "{state}" } headers { X "y" } }
276
276
  credential {
277
277
  access "access_token" // dot path; `claim="a|b"` reads JWT claims; `literal="…"` pins a value
@@ -306,9 +306,9 @@ Login kinds:
306
306
  - `login "api-key" { auth-url "…"; instructions "…"; prompt "…" placeholder="…"; empty-fallback "…"; normalize "strip-bearer"; validate … }` — `validate "chat-completions" base-url= model= tolerate-model-denied= max-tokens-field= max-tokens=`, `validate "anthropic-messages" base-url= model=`, or `validate "models-endpoint" url= base-url-env= headers-hook=`; all accept `label=` (error-message label, defaults to `name`) and `optional=#true` (only auth failures reject).
307
307
  - `login "oauth-code" { … }` as above; `token`/`refresh` `params` values may use `{code}`, `{state}`, `{redirect_uri}`, `{code_verifier}`, `{client_id}`, `{client_secret}`, `{refresh_token}`, `{scope}`; the standard grant parameters are sent unless `standard=#false`.
308
308
  - `login "device-code" { client-id …; base-url "…"; scopes …; headers-hook "…"; device url="{base}/…" body="form" { params {…} headers {…} }; token url="…" url-hook="…"; response user-code= device-code= verification-uri= verification-uri-complete= interval= expires-in=; instructions "Enter code: {user_code}"; credential {…}; userinfo …; after-exchange hook=… }`.
309
- - `login "custom" hook="name"` — the whole flow is a named `@oh-my-pi/pi-ai` hook (`src/registry/hooks/custom.ts`).
309
+ - `login "custom" hook="name"` — the whole flow is a named `@linxiraos/pi-ai` hook (`src/registry/hooks/custom.ts`).
310
310
 
311
- Hook names are validated against the hook tables in `@oh-my-pi/pi-ai/src/registry/hooks` by that package's `auth-hooks-registry` test. Values marked `encoding="base64"` are public OAuth client ids stored obfuscated to keep secret scanners quiet; they are decoded at runtime.
311
+ Hook names are validated against the hook tables in `@linxiraos/pi-ai/src/registry/hooks` by that package's `auth-hooks-registry` test. Values marked `encoding="base64"` are public OAuth client ids stored obfuscated to keep secret scanners quiet; they are decoded at runtime.
312
312
 
313
313
  ## Vendoring provenance
314
314
 
@@ -8,7 +8,7 @@ auth "openai-codex" {
8
8
  authorize-params {
9
9
  id_token_add_organizations "true"
10
10
  codex_cli_simplified_flow "true"
11
- originator "pi"
11
+ originator "omp"
12
12
  }
13
13
  instructions "A browser window should open. Complete login to finish."
14
14
  // OpenAI only allowlists this exact URI; a busy port must fail rather than fall back.
@@ -4,9 +4,13 @@ auth "zai-coding-plan" {
4
4
  client-id "client_P8X5CMWmlaRO9gyO-KSqtg" env="ZAI_OAUTH_CLIENT_ID"
5
5
  authorize-url "https://chat.z.ai/api/oauth/authorize" env="ZAI_OAUTH_AUTHORIZE_URL"
6
6
  // No PKCE: matches ZCode's authorize request verbatim.
7
- // ZCode registers this exact loopback URI; any other host/port is rejected (#10245).
8
- callback port=9999 path="/callback" hostname="127.0.0.1" redirect-uri="http://127.0.0.1:9999/callback" port-fallback=#false
9
- instructions "Complete Z.ai login in your browser. If the browser cannot reach this machine, paste the final redirect URL or authorization code when prompted."
7
+ // Z.AI's server-side allowlist now rejects every loopback redirect_uri for
8
+ // this client (#10745); only ZCode's desktop scheme still validates. On a
9
+ // supported local desktop, temporarily receive that scheme and restore its
10
+ // previous handler. Remote and unsupported sessions retain manual input.
11
+ // `redirect-uri-env` lets users adapt to further allowlist shifts without a release.
12
+ callback port=0 redirect-uri="zcode://zai-auth/callback" redirect-uri-env="ZAI_OAUTH_REDIRECT_URI" manual-only=#true native-scheme=#true
13
+ instructions "Complete Z.ai login in your browser. On supported local desktops, omp captures the zcode:// callback and restores its previous handler automatically. You can also paste the final redirect URL or authorization code when prompted."
10
14
  token url="https://zcode.z.ai/api/v1/oauth/token" url-env="ZAI_OAUTH_TOKEN_URL" body="json" standard=#false {
11
15
  params {
12
16
  provider "zai"
@@ -30,6 +30,22 @@ class "openai" {
30
30
  thinking-efforts "low" "medium" "high" "xhigh" "max"
31
31
  requires-reasoning-off-juice-instruction #true
32
32
  }
33
+ // Delegation appetite is a lineage trait. GPT-5.6 was trained on Codex's
34
+ // "no subagents unless asked" developer message; GPT-6 fans out on its own
35
+ // and over-delegates under Claude-calibrated prompts (reflexive scouts,
36
+ // single-agent babysitting), so it gets the restrained tier instead.
37
+ revision "=5.6" {
38
+ delegation-bias "gated"
39
+ }
40
+ revision ">=6" {
41
+ delegation-bias "restrained"
42
+ }
43
+ // GPT-6 Astra changes reasoning effort mid-conversation through a
44
+ // `configuration_update` input item so the request-level effort (and the
45
+ // cached prompt prefix) stays put; every other SKU 400s on the item type.
46
+ models "gpt-6-astra" {
47
+ supports-configuration-update #true
48
+ }
33
49
  // Codex SKUs: the advertised 400K figure includes the output budget; the
34
50
  // true prompt window is 272K. Spark budgets are its own family's.
35
51
  family "codex" {
@@ -69,9 +69,9 @@ provider "openai-codex" {
69
69
  }
70
70
  }
71
71
  }
72
- // First-party GPT-5 Responses SKUs support the freeform apply_patch
72
+ // First-party GPT-5/GPT-6 Responses SKUs support the freeform apply_patch
73
73
  // custom tool with a Lark grammar.
74
- revision ">=5 <6" {
74
+ revision ">=5 <7" {
75
75
  apply-patch-tool-type "freeform"
76
76
  }
77
77
  }
@@ -40,7 +40,7 @@ provider "openai" {
40
40
  reasoning-disable-mode "none-effort"
41
41
  }
42
42
  }
43
- revision ">=5 <6" {
43
+ revision ">=5 <7" {
44
44
  apply-patch-tool-type "freeform"
45
45
  }
46
46
  }