@oh-my-pi/pi-agent-core 14.6.2 → 14.6.4

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-agent-core",
4
- "version": "14.6.2",
4
+ "version": "14.6.4",
5
5
  "description": "General-purpose agent with transport abstraction, state management, and attachment support",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Boluk",
@@ -35,9 +35,9 @@
35
35
  "fmt": "biome format --write ."
36
36
  },
37
37
  "dependencies": {
38
- "@oh-my-pi/pi-ai": "14.6.2",
39
- "@oh-my-pi/pi-natives": "14.6.2",
40
- "@oh-my-pi/pi-utils": "14.6.2"
38
+ "@oh-my-pi/pi-ai": "14.6.4",
39
+ "@oh-my-pi/pi-natives": "14.6.4",
40
+ "@oh-my-pi/pi-utils": "14.6.4"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@sinclair/typebox": "^0.34.49",
package/src/agent-loop.ts CHANGED
@@ -347,10 +347,12 @@ async function streamAssistantResponse(
347
347
  (config.getApiKey ? await config.getApiKey(config.model.provider) : undefined) || config.apiKey;
348
348
 
349
349
  const dynamicToolChoice = config.getToolChoice?.();
350
+ const dynamicReasoning = config.getReasoning?.();
350
351
  const response = await streamFunction(config.model, llmContext, {
351
352
  ...config,
352
353
  apiKey: resolvedApiKey,
353
354
  toolChoice: dynamicToolChoice ?? config.toolChoice,
355
+ reasoning: dynamicReasoning ?? config.reasoning,
354
356
  signal,
355
357
  });
356
358
 
package/src/agent.ts CHANGED
@@ -784,6 +784,7 @@ export class Agent {
784
784
  intentTracing: this.#intentTracing,
785
785
  onAssistantMessageEvent: this.#onAssistantMessageEvent,
786
786
  getToolChoice,
787
+ getReasoning: () => this.#state.thinkingLevel,
787
788
  getSteeringMessages: async () => {
788
789
  if (skipInitialSteeringPoll) {
789
790
  skipInitialSteeringPoll = false;
package/src/types.ts CHANGED
@@ -145,6 +145,14 @@ export interface AgentLoopConfig extends SimpleStreamOptions {
145
145
  * When set and returns a value, overrides the static `toolChoice`.
146
146
  */
147
147
  getToolChoice?: () => ToolChoice | undefined;
148
+
149
+ /**
150
+ * Dynamic reasoning effort override, resolved per LLM call.
151
+ * When set and returns a value, overrides the static `reasoning` captured
152
+ * at run-loop start. Use this so mid-run thinking-level changes apply on
153
+ * the next model call instead of waiting for the next prompt.
154
+ */
155
+ getReasoning?: () => Effort | undefined;
148
156
  }
149
157
 
150
158
  export interface ToolCallContext {