@kenkaiiii/gg-agent 5.83.4 → 5.84.0
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -379,8 +379,10 @@ interface AgentOptions {
|
|
|
379
379
|
/** Whether the target model supports video input. When false, video blocks
|
|
380
380
|
* in messages are downgraded to text placeholders. Default: false. */
|
|
381
381
|
supportsVideo?: boolean;
|
|
382
|
-
/** Enable provider-native web search.
|
|
383
|
-
|
|
382
|
+
/** Enable provider-native web search. A function is re-evaluated before every
|
|
383
|
+
* request, so a host can attach the server tool mid-run (after the model
|
|
384
|
+
* promotes it) without restarting the loop. */
|
|
385
|
+
webSearch?: boolean | (() => boolean);
|
|
384
386
|
/** Enable server-side compaction (Anthropic only, beta). */
|
|
385
387
|
compaction?: boolean;
|
|
386
388
|
/** Enable server-side clearing of old tool use/result pairs (Anthropic only, beta). */
|
package/dist/index.d.ts
CHANGED
|
@@ -379,8 +379,10 @@ interface AgentOptions {
|
|
|
379
379
|
/** Whether the target model supports video input. When false, video blocks
|
|
380
380
|
* in messages are downgraded to text placeholders. Default: false. */
|
|
381
381
|
supportsVideo?: boolean;
|
|
382
|
-
/** Enable provider-native web search.
|
|
383
|
-
|
|
382
|
+
/** Enable provider-native web search. A function is re-evaluated before every
|
|
383
|
+
* request, so a host can attach the server tool mid-run (after the model
|
|
384
|
+
* promotes it) without restarting the loop. */
|
|
385
|
+
webSearch?: boolean | (() => boolean);
|
|
384
386
|
/** Enable server-side compaction (Anthropic only, beta). */
|
|
385
387
|
compaction?: boolean;
|
|
386
388
|
/** Enable server-side clearing of old tool use/result pairs (Anthropic only, beta). */
|
package/dist/index.js
CHANGED
|
@@ -812,7 +812,7 @@ async function* agentLoop(messages, options) {
|
|
|
812
812
|
tools: options.tools,
|
|
813
813
|
serverTools: options.serverTools,
|
|
814
814
|
toolChoice: options.toolChoice,
|
|
815
|
-
webSearch: options.webSearch,
|
|
815
|
+
webSearch: typeof options.webSearch === "function" ? options.webSearch() : options.webSearch,
|
|
816
816
|
// Clamped to whatever ceiling this route has already rejected us for
|
|
817
817
|
// (identity when nothing has been learned).
|
|
818
818
|
maxTokens: clampOutputTokens(ceilingKey, options.maxTokens),
|