@voltagent/server-core 1.0.36 → 2.0.1

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/edge.js CHANGED
@@ -966,15 +966,15 @@ function processAgentOptions(body, signal) {
966
966
  if (options.context && typeof options.context === "object" && !(options.context instanceof Map)) {
967
967
  processedOptions.context = new Map(Object.entries(options.context));
968
968
  }
969
- if (options.experimental_output) {
970
- const { type, schema: jsonSchema } = options.experimental_output;
969
+ if (options.output) {
970
+ const { type, schema: jsonSchema } = options.output;
971
971
  if (type === "object" && jsonSchema) {
972
972
  const zodSchema = ("toJSONSchema" in import_zod.z ? import_zod_from_json_schema.convertJsonSchemaToZod : import_zod_from_json_schema_v3.convertJsonSchemaToZod)(
973
973
  jsonSchema
974
974
  );
975
- processedOptions.experimental_output = import_ai.Output.object({ schema: zodSchema });
975
+ processedOptions.output = import_ai.Output.object({ schema: zodSchema });
976
976
  } else if (type === "text") {
977
- processedOptions.experimental_output = import_ai.Output.text();
977
+ processedOptions.output = import_ai.Output.text();
978
978
  }
979
979
  }
980
980
  return processedOptions;
@@ -1056,10 +1056,10 @@ async function handleGenerateText(agentId, body, deps, logger, signal) {
1056
1056
  finishReason: result.finishReason,
1057
1057
  toolCalls: result.toolCalls,
1058
1058
  toolResults: result.toolResults,
1059
- // Try to access experimental_output safely - getter throws if not defined
1059
+ // Try to access output safely - getter throws if not defined
1060
1060
  ...(() => {
1061
1061
  try {
1062
- return result.experimental_output ? { experimental_output: result.experimental_output } : {};
1062
+ return result.output ? { output: result.output } : {};
1063
1063
  } catch {
1064
1064
  return {};
1065
1065
  }