@tangle-network/agent-app 3.0.22 → 3.0.23
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Harness } from '../harness/index.js';
|
|
2
2
|
import type { SandboxRuntimeConfig } from '../sandbox/configuration.js';
|
|
3
|
+
import type { ProviderResolutionConfig } from '../sandbox/model.js';
|
|
3
4
|
import { type StreamSandboxPromptOptions } from '../sandbox/prompt-options.js';
|
|
4
5
|
import type { ChatTurnStoreBindings } from './route-storage.js';
|
|
5
6
|
import { type ModelPolicy } from '../policy-filters/index.js';
|
|
@@ -30,6 +31,10 @@ export interface ChatTurnDefaultBackend<TContext = unknown, TResource = unknown>
|
|
|
30
31
|
interactions?: StreamSandboxPromptOptions['interactions'];
|
|
31
32
|
/** Existing product provisioning, credentials, profiles and egress policy remain authoritative. */
|
|
32
33
|
shell?: SandboxRuntimeConfig;
|
|
34
|
+
/** A model's own provider, keyed by the exact model id a turn carries; any other model runs on the shell's. The box is
|
|
35
|
+
* created on the shell's provider, and only an api-mode keyless provider there gets the box its own Router key, so a
|
|
36
|
+
* pool of an OpenCode free model and a Router model puts the Router member on the shell and the free one here. */
|
|
37
|
+
providers?: Readonly<Record<string, ProviderResolutionConfig>>;
|
|
33
38
|
/** Explicitly keep every turn on the sandbox lane. */
|
|
34
39
|
router?: false;
|
|
35
40
|
/** Who pays for the Router model call: the turn's key, or a per-turn lease (`createDelegatedTurnKeys`) the
|
|
@@ -3637,7 +3637,7 @@ function createDefaultChatBackend(projectId, env, config, bindings, modelPolicy)
|
|
|
3637
3637
|
modelFailover: false,
|
|
3638
3638
|
errorNotice: true,
|
|
3639
3639
|
openEvents: ({ model: model2, signal }) => streamSandboxPrompt(
|
|
3640
|
-
shell,
|
|
3640
|
+
config.providers?.[model2] ? { ...shell, provider: config.providers[model2] } : shell,
|
|
3641
3641
|
box,
|
|
3642
3642
|
normalizeChatPromptForSandbox(args.prompt),
|
|
3643
3643
|
{ ...promptOptions(args), model: model2, signal }
|
|
@@ -4154,4 +4154,4 @@ export {
|
|
|
4154
4154
|
createChatTurnRoutes,
|
|
4155
4155
|
streamChatRouteAsSandboxEvents
|
|
4156
4156
|
};
|
|
4157
|
-
//# sourceMappingURL=chunk-
|
|
4157
|
+
//# sourceMappingURL=chunk-XCMTWZ36.js.map
|