@gajae-code/agent-core 0.16.4 → 0.16.6

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,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.16.6] - 2026-09-07
6
+
7
+ ## [0.16.5] - 2026-09-07
8
+
9
+ - Compaction summary, turn-prefix summary, and handoff generation now clamp their reasoning effort to the model they are about to call instead of hard-coding `high`. A reasoning-capable model on a transport without reasoning control (the registry strips `thinking` when `openai-codex` or `anthropic` is routed through a non-audited proxy `baseUrl`) rejected the raw effort inside the provider mapper with "Model <provider>/<id> does not support thinking"; since the compaction fallback chain then reaches for the same-provider largest-context model, every candidate died on that throw and auto-compaction reported only the last one. The agent turn already clamps through `clampThinkingLevelForModel`; the maintenance calls were the one path still sending an unclamped effort.
10
+
5
11
  ## [0.16.4] - 2026-09-05
6
12
 
7
13
  - Provider calls now carry the agent-owned opaque provider conversation identity separately from generic session/cache affinity, including compaction, handoff, turn-prefix summary, and branch-summary maintenance calls. This lets provider-specific conversation headers remain stable without treating prompt-derived gateway cache keys as conversation authority (#5295).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/agent-core",
4
- "version": "0.16.4",
4
+ "version": "0.16.6",
5
5
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
6
6
  "homepage": "https://gajae-code.com",
7
7
  "author": "Yeachan-Heo and Gajae Code Contributors",
@@ -32,9 +32,9 @@
32
32
  "fmt": "biome format --write ."
33
33
  },
34
34
  "dependencies": {
35
- "@gajae-code/ai": "0.16.4",
36
- "@gajae-code/natives": "0.16.4",
37
- "@gajae-code/utils": "0.16.4",
35
+ "@gajae-code/ai": "0.16.6",
36
+ "@gajae-code/natives": "0.16.6",
37
+ "@gajae-code/utils": "0.16.6",
38
38
  "@opentelemetry/api": "^1.9.0"
39
39
  },
40
40
  "devDependencies": {
@@ -8,6 +8,7 @@
8
8
  import * as os from "node:os";
9
9
  import {
10
10
  type AssistantMessage,
11
+ clampThinkingLevelForModel,
11
12
  Effort,
12
13
  type Message,
13
14
  type MessageAttribution,
@@ -1023,7 +1024,7 @@ export async function generateSummary(
1023
1024
  maxTokens,
1024
1025
  signal,
1025
1026
  apiKey,
1026
- reasoning: Effort.High,
1027
+ reasoning: maintenanceReasoning(model),
1027
1028
  initiatorOverride: options?.initiatorOverride,
1028
1029
  metadata: options?.metadata,
1029
1030
  sessionId: options?.sessionId,
@@ -1120,7 +1121,7 @@ export async function generateHandoff(
1120
1121
  {
1121
1122
  apiKey,
1122
1123
  signal,
1123
- reasoning: Effort.High,
1124
+ reasoning: maintenanceReasoning(model),
1124
1125
  toolChoice: "none",
1125
1126
  initiatorOverride: options.initiatorOverride,
1126
1127
  metadata: options.metadata,
@@ -1346,6 +1347,22 @@ export function prepareCompaction(
1346
1347
 
1347
1348
  const TURN_PREFIX_SUMMARIZATION_PROMPT = prompt.render(compactionTurnPrefixPrompt);
1348
1349
 
1350
+ /**
1351
+ * Reasoning effort for a maintenance one-shot call (summary, turn-prefix
1352
+ * summary, handoff), sized against the model that will actually run it.
1353
+ *
1354
+ * These calls want `high`, but they must never *demand* it: the fallback
1355
+ * chain hands them whatever same-provider model has the most context, and a
1356
+ * reasoning-capable model on a transport without reasoning control (the
1357
+ * registry strips `thinking` for a proxied `openai-codex` baseUrl) rejects any
1358
+ * explicit effort inside the provider mapper. The agent turn already clamps
1359
+ * through this helper; the maintenance calls must not be the one path that
1360
+ * still sends a raw effort.
1361
+ */
1362
+ function maintenanceReasoning(model: Model): Effort | undefined {
1363
+ return clampThinkingLevelForModel(model, Effort.High);
1364
+ }
1365
+
1349
1366
  /**
1350
1367
  * Generate summaries for compaction using prepared data.
1351
1368
  * Returns CompactionResult - SessionManager adds id/parentId when saving.
@@ -1555,7 +1572,7 @@ async function generateTurnPrefixSummary(
1555
1572
  maxTokens,
1556
1573
  signal,
1557
1574
  apiKey,
1558
- reasoning: Effort.High,
1575
+ reasoning: maintenanceReasoning(model),
1559
1576
  initiatorOverride: options?.initiatorOverride,
1560
1577
  metadata: options?.metadata,
1561
1578
  sessionId: options?.sessionId,