@vincemakes/kiso-runtime 0.31.0 → 0.31.1

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.
@@ -24,8 +24,15 @@ export interface ModelCapabilities {
24
24
  readonly maxOutputTokens: number | null;
25
25
  /** "automatic" — the provider caches without request markup (DeepSeek,
26
26
  * OpenAI); "explicit" — the request must place cache_control
27
- * breakpoints (Anthropic); "none" — no caching; null = unknown. */
28
- readonly promptCaching: "none" | "automatic" | "explicit" | null;
27
+ * breakpoints (Anthropic); "none" — no caching; "unobservable" — the
28
+ * endpoint answers a cache figure that carries no information (OR-10,
29
+ * owner 2026-09-09: the ChatGPT backend reports `cached_tokens` 0 to
30
+ * a third-party client on every request — three identical 1,922-token
31
+ * requests, one prompt_cache_key, 0 at every attribution level — so
32
+ * its 0 and "not reported" are one value; a display shows no cache
33
+ * meter for such a row, while the record keeps what the backend
34
+ * said); null = unknown. */
35
+ readonly promptCaching: "none" | "automatic" | "explicit" | "unobservable" | null;
29
36
  /** XP-1: the reasoning capability matrix — supersedes the pre-XP-1
30
37
  * boolean IN PLACE (zero consumers existed, verified). null = unknown:
31
38
  * no mode list, no effort levels, nothing downstream may guess. */
@@ -43,8 +50,10 @@ export interface ModelCapabilities {
43
50
  * some model/effort combinations forbid thinking-disabled. */
44
51
  export type ThinkingMode = "default" | "adaptive" | "enabled" | "disabled";
45
52
  /** `none` is the OpenAI Responses dialect's zero-reasoning level — a NATIVE
46
- * value a request carries, distinct from "default" (no field sent). */
47
- export type ReasoningEffort = "default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
53
+ * value a request carries, distinct from "default" (no field sent).
54
+ * `ultra` (OR-6) is the vendor CLI presets' top rung for the ChatGPT
55
+ * backend — native THERE only; the first-party model pages stop at `max`. */
56
+ export type ReasoningEffort = "default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
48
57
  export interface ReasoningSetting {
49
58
  readonly thinking: ThinkingMode;
50
59
  readonly effort: ReasoningEffort;
@@ -102,42 +102,45 @@ const OPENAI_MODELS_ASOF = "2026-09-08";
102
102
  * subscription; a first-party model page says nothing about that backend). */
103
103
  const CHATGPT_PRESETS_SOURCE = "https://github.com/openai/codex/blob/37f4bb94c9f4e180535a12e3f2c2f93f4a773df0/codex-rs/models-manager/models.json";
104
104
  const RESPONSES_WIRE = "reasoning.effort";
105
- /** A first-party Responses row: the model page is the source for the
106
- * levels, the window, the output cap and the price alike (read the same
107
- * day). The adapter asks for no reasoning summaries (encrypted items
108
- * only), so no thinking stream is emitted. */
109
- const openaiRow = (model, effortDefault, rate, page) => ({
105
+ const openaiRow = (model, effortDefault, rate, page, opts = {}) => ({
110
106
  model,
111
107
  providerId: "openai",
112
108
  endpoint: "https://api.openai.com",
113
109
  capabilities: { contextWindow: 1_050_000, maxOutputTokens: 128_000, promptCaching: "automatic", reasoning: {
114
110
  emitsThinkingStream: false,
115
111
  thinking: null,
116
- effort: { levels: ["none", "low", "medium", "high", "xhigh"], default: effortDefault, wire: RESPONSES_WIRE },
117
- asOf: OPENAI_MODELS_ASOF,
112
+ effort: { levels: opts.levels ?? ["none", "low", "medium", "high", "xhigh"], default: effortDefault, wire: RESPONSES_WIRE },
113
+ asOf: opts.asOf ?? OPENAI_MODELS_ASOF,
118
114
  source: page,
119
115
  }, inputModalities: null },
120
- capabilitiesAsOf: OPENAI_MODELS_ASOF,
116
+ capabilitiesAsOf: opts.asOf ?? OPENAI_MODELS_ASOF,
121
117
  capabilitiesSource: page,
122
- pricing: { ...rate, cacheWritePerM: 0, asOf: OPENAI_MODELS_ASOF, source: page },
118
+ pricing: { ...rate, cacheWritePerM: 0, asOf: opts.asOf ?? OPENAI_MODELS_ASOF, source: page },
123
119
  });
124
120
  /** The subscription backend's row for the same id: the presets' four
125
- * levels (no `none`), the presets' context window, no price. */
126
- const chatgptRow = (model) => ({
121
+ * levels (no `none`), the presets' context window, no price, and a cache
122
+ * figure no client can observe (OR-10 — see ModelCapabilities). */
123
+ const chatgptRow = (model, opts = {}) => ({
127
124
  model,
128
125
  providerId: "chatgpt",
129
126
  endpoint: "https://chatgpt.com",
130
- capabilities: { contextWindow: 272_000, maxOutputTokens: null, promptCaching: null, reasoning: {
127
+ capabilities: { contextWindow: 272_000, maxOutputTokens: null, promptCaching: "unobservable", reasoning: {
131
128
  emitsThinkingStream: false,
132
129
  thinking: null,
133
- effort: { levels: ["low", "medium", "high", "xhigh"], default: "medium", wire: RESPONSES_WIRE },
134
- asOf: OPENAI_MODELS_ASOF,
135
- source: CHATGPT_PRESETS_SOURCE,
130
+ effort: { levels: opts.levels ?? ["low", "medium", "high", "xhigh"], default: opts.default ?? "medium", wire: RESPONSES_WIRE },
131
+ asOf: opts.asOf ?? OPENAI_MODELS_ASOF,
132
+ source: opts.source ?? CHATGPT_PRESETS_SOURCE,
136
133
  }, inputModalities: null },
137
- capabilitiesAsOf: OPENAI_MODELS_ASOF,
138
- capabilitiesSource: CHATGPT_PRESETS_SOURCE,
134
+ capabilitiesAsOf: opts.asOf ?? OPENAI_MODELS_ASOF,
135
+ capabilitiesSource: opts.source ?? CHATGPT_PRESETS_SOURCE,
139
136
  pricing: null,
140
137
  });
138
+ /** OR-6 (2026-09-09): the newer line, read the same day — the model pages for
139
+ * the first-party rows, the presets pinned to a later commit for the
140
+ * subscription rows (both ids answered on the backend that day). */
141
+ const OPENAI_MODELS_ASOF_2 = "2026-09-09";
142
+ const CHATGPT_PRESETS_SOURCE_2 = "https://github.com/openai/codex/blob/634ebc1865c6ac840ed3ba118f040d527bf4b55d/codex-rs/models-manager/models.json";
143
+ const ULTRA_LADDER = ["low", "medium", "high", "xhigh", "max", "ultra"];
141
144
  /** The v1 table. Nulls outnumber numbers ON PURPOSE: only values with a
142
145
  * named source enter; everything else waits for one. */
143
146
  const ENTRIES = [
@@ -232,6 +235,17 @@ const ENTRIES = [
232
235
  openaiRow("gpt-5.4", "none", { inputPerM: 2.5, outputPerM: 15, cacheReadPerM: 0.25 }, "https://developers.openai.com/api/docs/models/gpt-5.4"),
233
236
  chatgptRow("gpt-5.5"),
234
237
  chatgptRow("gpt-5.4"),
238
+ // OR-6 (2026-09-09): gpt-6-astra and gpt-5.6-sol. The astra page names
239
+ // no default, so the first-party default stays null (unknown is null);
240
+ // the presets say `low` at the subscription. `ultra` exists only there.
241
+ // The ordering keeps the first-party row first for endpoint-less
242
+ // callers; the run-side resolver passes the endpoint (45a9df5), so the
243
+ // two rows need not be nested — astra's subscription row has a level
244
+ // (ultra) its first-party row lacks.
245
+ openaiRow("gpt-6-astra", null, { inputPerM: 10, outputPerM: 50, cacheReadPerM: 1 }, "https://developers.openai.com/api/docs/models/gpt-6-astra", { levels: ["low", "medium", "high", "xhigh", "max"], asOf: OPENAI_MODELS_ASOF_2 }),
246
+ openaiRow("gpt-5.6-sol", "medium", { inputPerM: 4, outputPerM: 20, cacheReadPerM: 0.4 }, "https://developers.openai.com/api/docs/models/gpt-5.6-sol", { levels: ["none", "low", "medium", "high", "xhigh", "max"], asOf: OPENAI_MODELS_ASOF_2 }),
247
+ chatgptRow("gpt-6-astra", { levels: ULTRA_LADDER, default: "low", source: CHATGPT_PRESETS_SOURCE_2, asOf: OPENAI_MODELS_ASOF_2 }),
248
+ chatgptRow("gpt-5.6-sol", { levels: ULTRA_LADDER, default: "low", source: CHATGPT_PRESETS_SOURCE_2, asOf: OPENAI_MODELS_ASOF_2 }),
235
249
  ];
236
250
  /**
237
251
  * Look a model up. `endpoint` narrows: an entry WITH an endpoint only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-runtime",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "kiso runtime — durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -25,12 +25,12 @@
25
25
  "test": "vitest run"
26
26
  },
27
27
  "dependencies": {
28
- "@vincemakes/kiso-core": "0.31.0"
28
+ "@vincemakes/kiso-core": "0.31.1"
29
29
  },
30
30
  "peerDependencies": {
31
- "@vincemakes/kiso-provider-anthropic": "0.31.0",
32
- "@vincemakes/kiso-provider-openai": "0.31.0",
33
- "@vincemakes/kiso-provider-openai-responses": "0.31.0"
31
+ "@vincemakes/kiso-provider-anthropic": "0.31.1",
32
+ "@vincemakes/kiso-provider-openai": "0.31.1",
33
+ "@vincemakes/kiso-provider-openai-responses": "0.31.1"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@vincemakes/kiso-provider-anthropic": {
@@ -44,7 +44,7 @@
44
44
  }
45
45
  },
46
46
  "devDependencies": {
47
- "@vincemakes/kiso-evals": "0.31.0",
47
+ "@vincemakes/kiso-evals": "0.31.1",
48
48
  "@types/node": "^26.1.2",
49
49
  "typescript": "^5.7.2",
50
50
  "vitest": "^3.0.0"