loopengine 0.1.43 → 0.1.45

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.
@@ -252,6 +252,12 @@ export type AgentModelConfig = {
252
252
  model: string;
253
253
  apiKey?: string;
254
254
  maxTokens?: number;
255
+ /** Omit unless the model actually needs it — see
256
+ * OpenAIModelCallOptions.reasoningEffort's own doc comment
257
+ * (core/model-calls/openai-model-call.ts) for why a reasoning-
258
+ * capable model (gpt-5.x) can require this be `'none'` just to use
259
+ * function tools at all. */
260
+ reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
255
261
  } | {
256
262
  provider: 'deepseek';
257
263
  model: string;
@@ -9,6 +9,16 @@ export interface OpenAIModelCallOptions {
9
9
  * one you actually want. */
10
10
  model: string;
11
11
  maxTokens?: number;
12
+ /** Omitted by default — a reasoning-capable model (the gpt-5.x family)
13
+ * otherwise gets whatever effort level OpenAI defaults it to, which
14
+ * some of these models refuse to combine with function tools on
15
+ * /v1/chat/completions at all ("Function tools with reasoning_effort
16
+ * are not supported ... set reasoning_effort to 'none'" — confirmed
17
+ * live against gpt-5.6-luna). Set this to `'none'` for a model that
18
+ * hits that error; every real loopengine call passes `tools` (even an
19
+ * empty array is still the `tools` field being present), so there's no
20
+ * tools-vs-no-tools branch here to get this wrong on. */
21
+ reasoningEffort?: OpenAI.Chat.Completions.ChatCompletionReasoningEffort;
12
22
  /** Inject a pre-configured client instead of building one from apiKey — e.g. to pass a custom `fetch` in tests. */
13
23
  client?: OpenAI;
14
24
  }
@@ -120,6 +120,7 @@ export function createOpenAIModelCall(options) {
120
120
  function: { name: t.name, description: t.description, parameters: t.input_schema },
121
121
  }))
122
122
  : undefined,
123
+ reasoning_effort: options.reasoningEffort,
123
124
  });
124
125
  return toModelResponse(response.choices[0]);
125
126
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",
@@ -1,25 +0,0 @@
1
- ---
2
- name: composio-large-outputs
3
- description: How to retrieve a gateway tool's real output when its result says storedInFile is true instead of returning the data inline.
4
- ---
5
-
6
- # Gateway tools with a large result
7
-
8
- Some gateway tools (Composio-sourced ones in particular) return a small
9
- pointer object instead of their real output when the actual result is
10
- too large to return inline:
11
-
12
- ```
13
- {
14
- "successful": true,
15
- "storedInFile": true,
16
- "tokenCount": 10234,
17
- "outputFilePath": "/tmp/.../SOME_TOOL_OUTPUT_xxxxx.json"
18
- }
19
- ```
20
-
21
- When you see `storedInFile: true` in a tool result, the real data is
22
- **not** in that object — it's in the file at `outputFilePath`. Call
23
- `system_read_file` with that exact path to retrieve the actual content
24
- before answering. Don't guess at an answer, summarize from the pointer
25
- alone, or claim you don't have the data — read the file first.