@hiper2d/ai-agents 0.1.3 → 0.1.5

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 CHANGED
@@ -340,6 +340,7 @@ declare const LLM_CONSTANTS: {
340
340
  CLAUDE_HAIKU: string;
341
341
  DEEPSEEK_FLASH: string;
342
342
  DEEPSEEK_PRO: string;
343
+ GPT_ASTRA: string;
343
344
  GPT_SOL: string;
344
345
  GPT: string;
345
346
  GPT_MINI: string;
package/dist/index.d.ts CHANGED
@@ -340,6 +340,7 @@ declare const LLM_CONSTANTS: {
340
340
  CLAUDE_HAIKU: string;
341
341
  DEEPSEEK_FLASH: string;
342
342
  DEEPSEEK_PRO: string;
343
+ GPT_ASTRA: string;
343
344
  GPT_SOL: string;
344
345
  GPT: string;
345
346
  GPT_MINI: string;
package/dist/index.js CHANGED
@@ -919,6 +919,7 @@ var LLM_CONSTANTS = {
919
919
  DEEPSEEK_PRO: "deepseek-pro",
920
920
  // GPT-5.6 family. 'gpt' and 'gpt-mini' are stable picker ids carried over from the
921
921
  // GPT-5.5 / GPT-5.4-mini era so existing consumers keep working across the repoint.
922
+ GPT_ASTRA: "gpt-astra",
922
923
  GPT_SOL: "gpt-sol",
923
924
  GPT: "gpt",
924
925
  GPT_MINI: "gpt-mini",
@@ -1003,6 +1004,17 @@ var SupportedAiModels = {
1003
1004
  tags: ["cheap"]
1004
1005
  },
1005
1006
  // Models with always-on reasoning
1007
+ // GPT-6 Astra (2026-09-03): OpenAI's frontier tier above Sol. No `none` reasoning effort;
1008
+ // temperature/top_p are rejected — Gpt5Agent sends neither, so the same agent serves it.
1009
+ // The catalog temperature is only carried for the agent constructor signature.
1010
+ [LLM_CONSTANTS.GPT_ASTRA]: {
1011
+ displayName: "GPT-6 Astra",
1012
+ modelApiName: "gpt-6-astra",
1013
+ apiKeyName: API_KEY_CONSTANTS.OPENAI,
1014
+ hasThinking: true,
1015
+ temperature: 1,
1016
+ tags: ["expensive"]
1017
+ },
1006
1018
  // GPT-5.6 family (promoted July 2026 when the limited preview opened up):
1007
1019
  // sol is the flagship, terra the mainline, luna the cheap tier.
1008
1020
  [LLM_CONSTANTS.GPT_SOL]: {
@@ -1274,6 +1286,19 @@ var DEEPSEEK_PEAK_SCHEDULE = {
1274
1286
  weekendOffPeak: { utcOffsetHours: 8 }
1275
1287
  };
1276
1288
  var MODEL_PRICING = {
1289
+ // OpenAI GPT-6 Astra (developers.openai.com/api/docs/pricing, 2026-09-03): $10/$50 cache-hit $1
1290
+ // short context, $20/$75 cache-hit $2 long context. OpenAI's pricing table doesn't restate
1291
+ // the boundary; we assume the same 272k threshold as the GPT-5.6 siblings. Cache writes
1292
+ // ($12.50/$25) are not modelled — caching is automatic and we only see hits.
1293
+ [SupportedAiModels[LLM_CONSTANTS.GPT_ASTRA].modelApiName]: {
1294
+ inputPrice: 10,
1295
+ outputPrice: 50,
1296
+ cacheHitPrice: 1,
1297
+ extendedContextInputPrice: 20,
1298
+ extendedContextOutputPrice: 75,
1299
+ extendedContextCacheHitPrice: 2,
1300
+ extendedContextThresholdTokens: 272e3
1301
+ },
1277
1302
  // OpenAI GPT-5.6 models
1278
1303
  // Sol repriced 2026-08-30 (developers.openai.com/api/docs/pricing): $4/$20 short context,
1279
1304
  // $8/$30 past the long-context threshold — the same 272k boundary its siblings use.
@@ -1872,8 +1897,7 @@ ${msg.content}` };
1872
1897
 
1873
1898
  // src/agents/gpt-5-agent.ts
1874
1899
  var import_openai = __toESM(require("openai"));
1875
- var import_zod2 = require("zod");
1876
- var import_zod3 = require("openai/helpers/zod");
1900
+ var import_zod2 = require("openai/helpers/zod");
1877
1901
  var Gpt5Agent = class extends AbstractAgent {
1878
1902
  client;
1879
1903
  // Log message templates
@@ -1906,12 +1930,7 @@ var Gpt5Agent = class extends AbstractAgent {
1906
1930
  `System: ${this.instruction}`,
1907
1931
  ...this.prepareMessages(messages).map((msg) => `${msg.role === "user" ? "User" : "Assistant"}: ${msg.content}`)
1908
1932
  ].join("\n\n");
1909
- let schemaToSend = zodSchema;
1910
- if (this.enableThinking && zodSchema instanceof import_zod2.z.ZodObject) {
1911
- schemaToSend = zodSchema.extend({
1912
- thinking: import_zod2.z.string().describe("Your internal chain-of-thought reasoning process used to arrive at the final answer.")
1913
- });
1914
- }
1933
+ const schemaToSend = zodSchema;
1915
1934
  let response;
1916
1935
  try {
1917
1936
  response = await this.client.responses.parse({
@@ -1920,7 +1939,7 @@ var Gpt5Agent = class extends AbstractAgent {
1920
1939
  input,
1921
1940
  max_output_tokens: this.maxOutputTokens,
1922
1941
  text: {
1923
- format: (0, import_zod3.zodTextFormat)(schemaToSend, "response_schema")
1942
+ format: (0, import_zod2.zodTextFormat)(schemaToSend, "response_schema")
1924
1943
  }
1925
1944
  });
1926
1945
  } catch (error) {
@@ -4390,6 +4409,7 @@ var AgentFactory = class {
4390
4409
  case LLM_CONSTANTS.CLAUDE_HAIKU:
4391
4410
  return new ClaudeAgent(name, instruction, model.modelApiName, key, shouldEnableThinking);
4392
4411
  // Always-on reasoning models
4412
+ case LLM_CONSTANTS.GPT_ASTRA:
4393
4413
  case LLM_CONSTANTS.GPT_SOL:
4394
4414
  case LLM_CONSTANTS.GPT:
4395
4415
  case LLM_CONSTANTS.GPT_MINI: