@hiper2d/ai-agents 0.14.1 → 0.15.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.mjs CHANGED
@@ -1065,10 +1065,15 @@ var SupportedAiModels = {
1065
1065
  // Live 2026-08-30 (one sample each): day-2 vote 11.8s, 15-character story 56.2s.
1066
1066
  tags: ["cheap"]
1067
1067
  },
1068
- // Sakana Fugu models — OpenAI-compatible. They reason internally (and bill it as
1069
- // "orchestration" tokens), but never surface reasoning to us: responses come back with
1070
- // reasoning_tokens: 0 and no reasoning_content. So hasThinking is false — there's no
1071
- // thinking content to show and no user-facing thinking toggle. Single entry per model.
1068
+ // Sakana Fugu models — OpenAI-compatible. They reason internally, but Chat Completions
1069
+ // (what FuguAgent uses) never returns the text: reasoning_tokens are reported and billed,
1070
+ // there is no reasoning_content. So hasThinking is false. Single entry per model.
1071
+ // The Messages and Responses APIs DO return reasoning (thinking blocks with an empty
1072
+ // signature / reasoning items, some with encrypted_content), but probed 2026-09-24 on
1073
+ // fugu-max it isn't worth switching for, since we keep reasoning only to replay it: the
1074
+ // returned text is often a vague status summary or empty rather than the actual
1075
+ // reasoning, and replayed reasoning reaches the model distorted (a planted "4817" came
1076
+ // back as "4829" on both APIs, presumably rewritten by the orchestrator).
1072
1077
  //
1073
1078
  // Base `fugu` was RETIRED 2026-08-04. It was carried as a cheap everyday option at an
1074
1079
  // assumed $1/$3, but reconciling token logs against the Sakana balance showed it actually
@@ -4734,7 +4739,11 @@ ${schemaDescription}`;
4734
4739
  const params = {
4735
4740
  ...this.defaultParams,
4736
4741
  messages: openAIMessages,
4737
- ...this.thinkingParams()
4742
+ ...this.thinkingParams(),
4743
+ response_format: {
4744
+ type: "json_schema",
4745
+ json_schema: ZodSchemaConverter.toOpenAIJsonSchema(zodSchema, "response_schema")
4746
+ }
4738
4747
  };
4739
4748
  completion = await this.client.chat.completions.create(params);
4740
4749
  } catch (apiError) {