@hiper2d/ai-agents 0.12.0 → 0.13.0
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/dist/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1394,6 +1394,15 @@ declare class Gpt5Agent extends AbstractAgent {
|
|
|
1394
1394
|
private readonly logTemplates;
|
|
1395
1395
|
private readonly errorMessages;
|
|
1396
1396
|
constructor(name: string, instruction: string, model: string, apiKey: string, temperature: number, enableThinking?: boolean, agentLoggingConfig?: AgentLoggingConfig);
|
|
1397
|
+
/**
|
|
1398
|
+
* `reasoning: {effort}`, sent only when the catalog names a level. Every current OpenAI
|
|
1399
|
+
* model defaults to "medium" when the field is omitted — verified 2026-09-22 by calling
|
|
1400
|
+
* astra/sol/terra/luna with no reasoning param and reading the effort the API echoes back,
|
|
1401
|
+
* since OpenAI documents the default for Sol, Luna and the 5.6 family but not for Astra.
|
|
1402
|
+
* The catalog pins all four to medium so the level is explicit in our request rather than
|
|
1403
|
+
* inherited from a default OpenAI can change under us.
|
|
1404
|
+
*/
|
|
1405
|
+
private reasoningParams;
|
|
1397
1406
|
/**
|
|
1398
1407
|
* Structured output method using Zod with OpenAI's Responses API
|
|
1399
1408
|
* This provides better schema handling and runtime validation
|
package/dist/index.d.ts
CHANGED
|
@@ -1394,6 +1394,15 @@ declare class Gpt5Agent extends AbstractAgent {
|
|
|
1394
1394
|
private readonly logTemplates;
|
|
1395
1395
|
private readonly errorMessages;
|
|
1396
1396
|
constructor(name: string, instruction: string, model: string, apiKey: string, temperature: number, enableThinking?: boolean, agentLoggingConfig?: AgentLoggingConfig);
|
|
1397
|
+
/**
|
|
1398
|
+
* `reasoning: {effort}`, sent only when the catalog names a level. Every current OpenAI
|
|
1399
|
+
* model defaults to "medium" when the field is omitted — verified 2026-09-22 by calling
|
|
1400
|
+
* astra/sol/terra/luna with no reasoning param and reading the effort the API echoes back,
|
|
1401
|
+
* since OpenAI documents the default for Sol, Luna and the 5.6 family but not for Astra.
|
|
1402
|
+
* The catalog pins all four to medium so the level is explicit in our request rather than
|
|
1403
|
+
* inherited from a default OpenAI can change under us.
|
|
1404
|
+
*/
|
|
1405
|
+
private reasoningParams;
|
|
1397
1406
|
/**
|
|
1398
1407
|
* Structured output method using Zod with OpenAI's Responses API
|
|
1399
1408
|
* This provides better schema handling and runtime validation
|
package/dist/index.js
CHANGED
|
@@ -1061,10 +1061,16 @@ var SupportedAiModels = {
|
|
|
1061
1061
|
// GPT-6 Astra (2026-09-03): OpenAI's frontier tier above Sol. No `none` reasoning effort;
|
|
1062
1062
|
// temperature/top_p are rejected — Gpt5Agent sends neither, so the same agent serves it.
|
|
1063
1063
|
// The catalog temperature is only carried for the agent constructor signature.
|
|
1064
|
+
// All four OpenAI entries carry reasoningEffort: 'medium' as of 2026-09-22. That is
|
|
1065
|
+
// OpenAI's own current default, established by MEASUREMENT rather than docs: each model was
|
|
1066
|
+
// called with no reasoning param and the effort it echoes back read off the response, since
|
|
1067
|
+
// OpenAI documents the default for Sol, Luna and the 5.6 family but never states Astra's.
|
|
1068
|
+
// Pinning it changes no behaviour today; it stops the default moving under us silently.
|
|
1064
1069
|
[LLM_CONSTANTS.GPT_ASTRA]: {
|
|
1065
1070
|
displayName: "GPT-6 Astra",
|
|
1066
1071
|
modelApiName: "gpt-6-astra",
|
|
1067
1072
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
1073
|
+
reasoningEffort: "medium",
|
|
1068
1074
|
hasThinking: true,
|
|
1069
1075
|
temperature: 1,
|
|
1070
1076
|
tags: ["expensive"]
|
|
@@ -1079,6 +1085,7 @@ var SupportedAiModels = {
|
|
|
1079
1085
|
displayName: "GPT-6 Sol",
|
|
1080
1086
|
modelApiName: "gpt-6-sol",
|
|
1081
1087
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
1088
|
+
reasoningEffort: "medium",
|
|
1082
1089
|
hasThinking: true,
|
|
1083
1090
|
temperature: 1,
|
|
1084
1091
|
tags: ["expensive"]
|
|
@@ -1087,6 +1094,7 @@ var SupportedAiModels = {
|
|
|
1087
1094
|
displayName: "GPT-5.6 Terra",
|
|
1088
1095
|
modelApiName: "gpt-5.6-terra",
|
|
1089
1096
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
1097
|
+
reasoningEffort: "medium",
|
|
1090
1098
|
hasThinking: true,
|
|
1091
1099
|
temperature: 1,
|
|
1092
1100
|
tags: ["fast", "expensive"]
|
|
@@ -1095,6 +1103,7 @@ var SupportedAiModels = {
|
|
|
1095
1103
|
displayName: "GPT-6 Luna",
|
|
1096
1104
|
modelApiName: "gpt-6-luna",
|
|
1097
1105
|
apiKeyName: API_KEY_CONSTANTS.OPENAI,
|
|
1106
|
+
reasoningEffort: "medium",
|
|
1098
1107
|
hasThinking: true,
|
|
1099
1108
|
temperature: 1,
|
|
1100
1109
|
tags: ["fast", "cheap"]
|
|
@@ -2508,6 +2517,17 @@ ${instruction}`);
|
|
|
2508
2517
|
apiKey
|
|
2509
2518
|
});
|
|
2510
2519
|
}
|
|
2520
|
+
/**
|
|
2521
|
+
* `reasoning: {effort}`, sent only when the catalog names a level. Every current OpenAI
|
|
2522
|
+
* model defaults to "medium" when the field is omitted — verified 2026-09-22 by calling
|
|
2523
|
+
* astra/sol/terra/luna with no reasoning param and reading the effort the API echoes back,
|
|
2524
|
+
* since OpenAI documents the default for Sol, Luna and the 5.6 family but not for Astra.
|
|
2525
|
+
* The catalog pins all four to medium so the level is explicit in our request rather than
|
|
2526
|
+
* inherited from a default OpenAI can change under us.
|
|
2527
|
+
*/
|
|
2528
|
+
reasoningParams() {
|
|
2529
|
+
return this.reasoningEffort ? { reasoning: { effort: toOpenAIEffort(this.reasoningEffort) } } : {};
|
|
2530
|
+
}
|
|
2511
2531
|
/**
|
|
2512
2532
|
* Structured output method using Zod with OpenAI's Responses API
|
|
2513
2533
|
* This provides better schema handling and runtime validation
|
|
@@ -2528,6 +2548,7 @@ ${instruction}`);
|
|
|
2528
2548
|
input,
|
|
2529
2549
|
max_output_tokens: this.maxOutputTokens,
|
|
2530
2550
|
prompt_cache_key: this.promptCacheKey,
|
|
2551
|
+
...this.reasoningParams(),
|
|
2531
2552
|
text: {
|
|
2532
2553
|
format: (0, import_zod2.zodTextFormat)(schemaToSend, "response_schema")
|
|
2533
2554
|
}
|
|
@@ -2612,7 +2633,8 @@ ${instruction}`);
|
|
|
2612
2633
|
instructions: this.instruction,
|
|
2613
2634
|
input,
|
|
2614
2635
|
max_output_tokens: this.maxOutputTokens,
|
|
2615
|
-
prompt_cache_key: this.promptCacheKey
|
|
2636
|
+
prompt_cache_key: this.promptCacheKey,
|
|
2637
|
+
...this.reasoningParams()
|
|
2616
2638
|
});
|
|
2617
2639
|
const content = response.output_text;
|
|
2618
2640
|
if (!content) {
|