@reinsjs/brain 0.8.0 → 0.8.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/CHANGELOG.md +6 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @reinsjs/brain
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fc3dffa: perception: a `contextTokens` limit at or above the model's context window (`contextLimit`) no longer counts toward "Run budget remaining". A single request cannot exceed the window, so that limit's remaining share just restated the context-usage line. Limits below the window are still reported. With only such a context limit configured, the budget line is omitted.
|
|
8
|
+
|
|
3
9
|
## 0.8.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1032,7 +1032,10 @@ interface PerceptionReading {
|
|
|
1032
1032
|
sessionTokens: Tier;
|
|
1033
1033
|
/** 可见的外溢工具结果条数档位;level 0 即没有 */
|
|
1034
1034
|
spilledResults: Tier;
|
|
1035
|
-
/**
|
|
1035
|
+
/**
|
|
1036
|
+
* 配置了上限时:最紧的那一维的剩余比例档位。contextTokens 上限不小于窗口时不参与(与 contextUsage 重复);
|
|
1037
|
+
* 只设了这样一条上下文上限时为空
|
|
1038
|
+
*/
|
|
1036
1039
|
budgetRemaining?: Tier & {
|
|
1037
1040
|
tightest: LimitDimension;
|
|
1038
1041
|
};
|
package/dist/index.js
CHANGED
|
@@ -2210,6 +2210,7 @@ function remainingOf(budget2, contextTokens, limits) {
|
|
|
2210
2210
|
for (const dimension of Object.keys(used)) {
|
|
2211
2211
|
const limit = limits[dimension];
|
|
2212
2212
|
if (limit === void 0 || limit <= 0) continue;
|
|
2213
|
+
if (dimension === "contextTokens" && limit >= budget2.contextLimit) continue;
|
|
2213
2214
|
const fraction = Math.max(0, 1 - used[dimension] / limit);
|
|
2214
2215
|
if (!tightest || fraction < tightest.fraction) tightest = { fraction, dimension };
|
|
2215
2216
|
}
|