u-foo 3.1.6 → 3.1.7
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/package.json
CHANGED
package/src/code/nativeRunner.js
CHANGED
|
@@ -127,11 +127,10 @@ const NATIVE_SSE_DISPATCHER_OPTIONS = Object.freeze({
|
|
|
127
127
|
});
|
|
128
128
|
/** Max text-only auto-continues while a plan is waiting on a task (per user submit). */
|
|
129
129
|
const DEFAULT_MAX_PLAN_AUTO_CONTINUES = 24;
|
|
130
|
-
//
|
|
131
|
-
//
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
const DEFAULT_ANTHROPIC_MAX_TOKENS = 64000;
|
|
130
|
+
// Reserve 32K output tokens by default across transports. Override via
|
|
131
|
+
// UFOO_UCODE_MAX_TOKENS (positive integer).
|
|
132
|
+
const DEFAULT_OPENAI_MAX_TOKENS = 32768;
|
|
133
|
+
const DEFAULT_ANTHROPIC_MAX_TOKENS = 32768;
|
|
135
134
|
// Extended thinking defaults live in thinkingLevels.js (medium = 10k).
|
|
136
135
|
// UFOO_UCODE_THINKING=off|low|medium|high|max selects a preset; numeric
|
|
137
136
|
// UFOO_UCODE_THINKING_BUDGET_TOKENS still overrides. 0 disables thinking.
|
|
@@ -1779,8 +1778,8 @@ async function runAnthropicTurn({
|
|
|
1779
1778
|
tools: buildAnthropicToolSpecs(),
|
|
1780
1779
|
stream: true,
|
|
1781
1780
|
};
|
|
1782
|
-
const thinkingBudget = resolveThinkingBudgetTokens();
|
|
1783
|
-
if (thinkingBudget
|
|
1781
|
+
const thinkingBudget = Math.min(resolveThinkingBudgetTokens(), payload.max_tokens - 1);
|
|
1782
|
+
if (thinkingBudget >= 1024) {
|
|
1784
1783
|
payload.thinking = { type: "enabled", budget_tokens: thinkingBudget };
|
|
1785
1784
|
}
|
|
1786
1785
|
if (Array.isArray(systemBlocks) && systemBlocks.length > 0) {
|