@ai-sdk%2Fanthropic@3.0.71.patch 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. diff --git a/dist/index.js b/dist/index.js
  2. --- a/dist/index.js
  3. +++ b/dist/index.js
  4. @@ -934,6 +934,10 @@ var anthropicLanguageModelOptions = import_v43.z.object({
  5. */
  6. effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
  7. /**
  8. + * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
  9. + */
  10. + output_config: import_v43.z.record(import_v43.z.string(), import_v43.z.any()).optional(),
  11. + /**
  12. * Task budget for agentic turns. Informs the model of the total token budget
  13. * available for the current task, allowing it to prioritize work and wind down
  14. * gracefully as the budget is consumed.
  15. @@ -3070,8 +3074,9 @@ var AnthropicMessagesLanguageModel = class {
  16. ...thinkingDisplay != null && { display: thinkingDisplay }
  17. }
  18. },
  19. - ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  20. + ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  21. output_config: {
  22. + ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
  23. ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
  24. effort: anthropicOptions.effort
  25. },
  26. diff --git a/dist/index.mjs b/dist/index.mjs
  27. --- a/dist/index.mjs
  28. +++ b/dist/index.mjs
  29. @@ -929,6 +929,10 @@ var anthropicLanguageModelOptions = z3.object({
  30. */
  31. effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
  32. /**
  33. + * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
  34. + */
  35. + output_config: z3.record(z3.string(), z3.any()).optional(),
  36. + /**
  37. * Task budget for agentic turns. Informs the model of the total token budget
  38. * available for the current task, allowing it to prioritize work and wind down
  39. * gracefully as the budget is consumed.
  40. @@ -3107,8 +3111,9 @@ var AnthropicMessagesLanguageModel = class {
  41. ...thinkingDisplay != null && { display: thinkingDisplay }
  42. }
  43. },
  44. - ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  45. + ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  46. output_config: {
  47. + ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
  48. ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
  49. effort: anthropicOptions.effort
  50. },
  51. diff --git a/dist/index.d.ts b/dist/index.d.ts
  52. --- a/dist/index.d.ts
  53. +++ b/dist/index.d.ts
  54. @@ -178,9 +178,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
  55. high: "high";
  56. xhigh: "xhigh";
  57. max: "max";
  58. }>>;
  59. + output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
  60. taskBudget: z.ZodOptional<z.ZodObject<{
  61. type: z.ZodLiteral<"tokens">;
  62. total: z.ZodNumber;
  63. remaining: z.ZodOptional<z.ZodNumber>;
  64. }, z.core.$strip>>;
  65. diff --git a/dist/index.d.mts b/dist/index.d.mts
  66. --- a/dist/index.d.mts
  67. +++ b/dist/index.d.mts
  68. @@ -178,9 +178,10 @@ declare const anthropicLanguageModelOptions: z.ZodObject<{
  69. high: "high";
  70. xhigh: "xhigh";
  71. max: "max";
  72. }>>;
  73. + output_config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
  74. taskBudget: z.ZodOptional<z.ZodObject<{
  75. type: z.ZodLiteral<"tokens">;
  76. total: z.ZodNumber;
  77. remaining: z.ZodOptional<z.ZodNumber>;
  78. }, z.core.$strip>>;
  79. diff --git a/dist/internal/index.js b/dist/internal/index.js
  80. --- a/dist/internal/index.js
  81. +++ b/dist/internal/index.js
  82. @@ -926,6 +926,10 @@ var anthropicLanguageModelOptions = import_v43.z.object({
  83. */
  84. effort: import_v43.z.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
  85. /**
  86. + * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
  87. + */
  88. + output_config: import_v43.z.record(import_v43.z.string(), import_v43.z.any()).optional(),
  89. + /**
  90. * Task budget for agentic turns. Informs the model of the total token budget
  91. * available for the current task, allowing it to prioritize work and wind down
  92. * gracefully as the budget is consumed.
  93. @@ -3062,8 +3066,9 @@ var AnthropicMessagesLanguageModel = class {
  94. ...thinkingDisplay != null && { display: thinkingDisplay }
  95. }
  96. },
  97. - ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  98. + ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  99. output_config: {
  100. + ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
  101. ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
  102. effort: anthropicOptions.effort
  103. },
  104. diff --git a/dist/internal/index.mjs b/dist/internal/index.mjs
  105. --- a/dist/internal/index.mjs
  106. +++ b/dist/internal/index.mjs
  107. @@ -913,6 +913,10 @@ var anthropicLanguageModelOptions = z3.object({
  108. */
  109. effort: z3.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
  110. /**
  111. + * Raw Anthropic `output_config` passthrough for Anthropic-compatible endpoints.
  112. + */
  113. + output_config: z3.record(z3.string(), z3.any()).optional(),
  114. + /**
  115. * Task budget for agentic turns. Informs the model of the total token budget
  116. * available for the current task, allowing it to prioritize work and wind down
  117. * gracefully as the budget is consumed.
  118. @@ -3091,8 +3095,9 @@ var AnthropicMessagesLanguageModel = class {
  119. ...thinkingDisplay != null && { display: thinkingDisplay }
  120. }
  121. },
  122. - ...((anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  123. + ...(Object.keys((anthropicOptions == null ? void 0 : anthropicOptions.output_config) ?? {}).length > 0 || (anthropicOptions == null ? void 0 : anthropicOptions.effort) || (anthropicOptions == null ? void 0 : anthropicOptions.taskBudget) || useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) && {
  124. output_config: {
  125. + ...(anthropicOptions == null ? void 0 : anthropicOptions.output_config),
  126. ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
  127. effort: anthropicOptions.effort
  128. },