@ai-sdk%[email protected] 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. --- a/dist/index.js
  2. +++ b/dist/index.js
  3. @@ -3155,15 +3155,6 @@
  4. });
  5. }
  6. baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
  7. - } else {
  8. - if (topP != null && temperature != null) {
  9. - warnings.push({
  10. - type: "unsupported",
  11. - feature: "topP",
  12. - details: `topP is not supported when temperature is set. topP is ignored.`
  13. - });
  14. - baseArgs.top_p = void 0;
  15. - }
  16. }
  17. if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
  18. if (maxOutputTokens != null) {
  19. @@ -5180,4 +5171,4 @@
  20. createAnthropic,
  21. forwardAnthropicContainerIdFromLastStep
  22. });
  23. -//# sourceMappingURL=index.js.map
  24. \ No newline at end of file
  25. +//# sourceMappingURL=index.js.map
  26. --- a/dist/index.mjs
  27. +++ b/dist/index.mjs
  28. @@ -3192,15 +3192,6 @@
  29. });
  30. }
  31. baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
  32. - } else {
  33. - if (topP != null && temperature != null) {
  34. - warnings.push({
  35. - type: "unsupported",
  36. - feature: "topP",
  37. - details: `topP is not supported when temperature is set. topP is ignored.`
  38. - });
  39. - baseArgs.top_p = void 0;
  40. - }
  41. }
  42. if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
  43. if (maxOutputTokens != null) {
  44. @@ -5256,4 +5247,4 @@
  45. createAnthropic,
  46. forwardAnthropicContainerIdFromLastStep
  47. };
  48. -//# sourceMappingURL=index.mjs.map
  49. \ No newline at end of file
  50. +//# sourceMappingURL=index.mjs.map
  51. --- a/dist/internal/index.js
  52. +++ b/dist/internal/index.js
  53. @@ -3147,15 +3147,6 @@
  54. });
  55. }
  56. baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
  57. - } else {
  58. - if (topP != null && temperature != null) {
  59. - warnings.push({
  60. - type: "unsupported",
  61. - feature: "topP",
  62. - details: `topP is not supported when temperature is set. topP is ignored.`
  63. - });
  64. - baseArgs.top_p = void 0;
  65. - }
  66. }
  67. if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
  68. if (maxOutputTokens != null) {
  69. @@ -5080,4 +5071,4 @@
  70. anthropicTools,
  71. prepareTools
  72. });
  73. -//# sourceMappingURL=index.js.map
  74. \ No newline at end of file
  75. +//# sourceMappingURL=index.js.map
  76. --- a/dist/internal/index.mjs
  77. +++ b/dist/internal/index.mjs
  78. @@ -3176,15 +3176,6 @@
  79. });
  80. }
  81. baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0);
  82. - } else {
  83. - if (topP != null && temperature != null) {
  84. - warnings.push({
  85. - type: "unsupported",
  86. - feature: "topP",
  87. - details: `topP is not supported when temperature is set. topP is ignored.`
  88. - });
  89. - baseArgs.top_p = void 0;
  90. - }
  91. }
  92. if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) {
  93. if (maxOutputTokens != null) {
  94. @@ -5148,4 +5139,4 @@
  95. anthropicTools,
  96. prepareTools
  97. };
  98. -//# sourceMappingURL=index.mjs.map
  99. \ No newline at end of file
  100. +//# sourceMappingURL=index.mjs.map
  101. --- a/src/anthropic-messages-language-model.ts
  102. +++ b/src/anthropic-messages-language-model.ts
  103. @@ -534,16 +534,6 @@
  104. // adjust max tokens to account for thinking:
  105. baseArgs.max_tokens = maxTokens + (thinkingBudget ?? 0);
  106. - } else {
  107. - // Only check temperature/topP mutual exclusivity when thinking is not enabled
  108. - if (topP != null && temperature != null) {
  109. - warnings.push({
  110. - type: 'unsupported',
  111. - feature: 'topP',
  112. - details: `topP is not supported when temperature is set. topP is ignored.`,
  113. - });
  114. - baseArgs.top_p = undefined;
  115. - }
  116. }
  117. // limit to max output tokens for known models to enable model switching without breaking it: