loopengine 0.1.44 → 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
|
};
|