diff options
| author | Aiden Cline <[email protected]> | 2026-03-27 15:24:30 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-27 15:24:30 -0500 |
| commit | c33d9996f0e630d15b6e40b9a1feb578e991561a (patch) | |
| tree | 9cadd3b59c7467843680fdbca35184233060ddda /patches/@ai-sdk%[email protected] | |
| parent | 7a7643c86a69edbd79f99b0c4f613463627f2428 (diff) | |
| download | opencode-c33d9996f0e630d15b6e40b9a1feb578e991561a.tar.gz opencode-c33d9996f0e630d15b6e40b9a1feb578e991561a.zip | |
feat: AI SDK v6 support (#18433)
Diffstat (limited to 'patches/@ai-sdk%[email protected]')
| -rw-r--r-- | patches/@ai-sdk%[email protected] | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/patches/@ai-sdk%[email protected] b/patches/@ai-sdk%[email protected] new file mode 100644 index 000000000..b8c2f387d --- /dev/null +++ b/patches/@ai-sdk%[email protected] @@ -0,0 +1,119 @@ +--- a/dist/index.js ++++ b/dist/index.js +@@ -3155,15 +3155,6 @@ + }); + } + baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0); +- } else { +- if (topP != null && temperature != null) { +- warnings.push({ +- type: "unsupported", +- feature: "topP", +- details: `topP is not supported when temperature is set. topP is ignored.` +- }); +- baseArgs.top_p = void 0; +- } + } + if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) { + if (maxOutputTokens != null) { +@@ -5180,4 +5171,4 @@ + createAnthropic, + forwardAnthropicContainerIdFromLastStep + }); +-//# sourceMappingURL=index.js.map +\ No newline at end of file ++//# sourceMappingURL=index.js.map +--- a/dist/index.mjs ++++ b/dist/index.mjs +@@ -3192,15 +3192,6 @@ + }); + } + baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0); +- } else { +- if (topP != null && temperature != null) { +- warnings.push({ +- type: "unsupported", +- feature: "topP", +- details: `topP is not supported when temperature is set. topP is ignored.` +- }); +- baseArgs.top_p = void 0; +- } + } + if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) { + if (maxOutputTokens != null) { +@@ -5256,4 +5247,4 @@ + createAnthropic, + forwardAnthropicContainerIdFromLastStep + }; +-//# sourceMappingURL=index.mjs.map +\ No newline at end of file ++//# sourceMappingURL=index.mjs.map +--- a/dist/internal/index.js ++++ b/dist/internal/index.js +@@ -3147,15 +3147,6 @@ + }); + } + baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0); +- } else { +- if (topP != null && temperature != null) { +- warnings.push({ +- type: "unsupported", +- feature: "topP", +- details: `topP is not supported when temperature is set. topP is ignored.` +- }); +- baseArgs.top_p = void 0; +- } + } + if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) { + if (maxOutputTokens != null) { +@@ -5080,4 +5071,4 @@ + anthropicTools, + prepareTools + }); +-//# sourceMappingURL=index.js.map +\ No newline at end of file ++//# sourceMappingURL=index.js.map +--- a/dist/internal/index.mjs ++++ b/dist/internal/index.mjs +@@ -3176,15 +3176,6 @@ + }); + } + baseArgs.max_tokens = maxTokens + (thinkingBudget != null ? thinkingBudget : 0); +- } else { +- if (topP != null && temperature != null) { +- warnings.push({ +- type: "unsupported", +- feature: "topP", +- details: `topP is not supported when temperature is set. topP is ignored.` +- }); +- baseArgs.top_p = void 0; +- } + } + if (isKnownModel && baseArgs.max_tokens > maxOutputTokensForModel) { + if (maxOutputTokens != null) { +@@ -5148,4 +5139,4 @@ + anthropicTools, + prepareTools + }; +-//# sourceMappingURL=index.mjs.map +\ No newline at end of file ++//# sourceMappingURL=index.mjs.map +--- a/src/anthropic-messages-language-model.ts ++++ b/src/anthropic-messages-language-model.ts +@@ -534,16 +534,6 @@ + + // adjust max tokens to account for thinking: + baseArgs.max_tokens = maxTokens + (thinkingBudget ?? 0); +- } else { +- // Only check temperature/topP mutual exclusivity when thinking is not enabled +- if (topP != null && temperature != null) { +- warnings.push({ +- type: 'unsupported', +- feature: 'topP', +- details: `topP is not supported when temperature is set. topP is ignored.`, +- }); +- baseArgs.top_p = undefined; +- } + } + + // limit to max output tokens for known models to enable model switching without breaking it: |
