@tangle-network/agent-app 0.60.193 → 0.60.194
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/chat-routes/index.js +1 -1
- package/dist/{chunk-QW4UOEPH.js → chunk-SUIH5B55.js} +5 -3
- package/dist/chunk-SUIH5B55.js.map +1 -0
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/model.d.ts +4 -0
- package/package.json +1 -1
- package/dist/chunk-QW4UOEPH.js.map +0 -1
|
@@ -47,6 +47,7 @@ function backendModelFields(model) {
|
|
|
47
47
|
model: model.model,
|
|
48
48
|
provider: model.provider,
|
|
49
49
|
...model.apiKey !== void 0 ? { apiKey: model.apiKey } : {},
|
|
50
|
+
...model.apiKeyEnv !== void 0 ? { apiKeyEnv: model.apiKeyEnv } : {},
|
|
50
51
|
...model.baseUrl !== void 0 ? { baseUrl: model.baseUrl } : {}
|
|
51
52
|
}
|
|
52
53
|
};
|
|
@@ -66,7 +67,8 @@ function resolveModelSelection(config, override) {
|
|
|
66
67
|
const source = overrideModel ? "override" : configModel ? "config" : "default";
|
|
67
68
|
if (!provider) return { succeeded: false, error: "no_provider", model: modelName, source };
|
|
68
69
|
const apiKey = explicitApiKey ?? (provider === "openai" ? openaiApiKey : void 0);
|
|
69
|
-
|
|
70
|
+
const apiKeyEnv = apiKey ? null : trimOrNull(c.apiKeyEnv);
|
|
71
|
+
if (!apiKey && !apiKeyEnv && !c.allowKeylessModel) {
|
|
70
72
|
return { succeeded: false, error: "no_api_key", model: modelName, provider, source };
|
|
71
73
|
}
|
|
72
74
|
return {
|
|
@@ -74,7 +76,7 @@ function resolveModelSelection(config, override) {
|
|
|
74
76
|
value: {
|
|
75
77
|
model: modelName,
|
|
76
78
|
provider,
|
|
77
|
-
...apiKey ? { apiKey } : {},
|
|
79
|
+
...apiKey ? { apiKey } : apiKeyEnv ? { apiKeyEnv } : {},
|
|
78
80
|
...explicitBaseUrl ? { baseUrl: explicitBaseUrl } : {}
|
|
79
81
|
}
|
|
80
82
|
};
|
|
@@ -3343,4 +3345,4 @@ export {
|
|
|
3343
3345
|
isTerminalPromptEvent,
|
|
3344
3346
|
detectInteractiveQuestion
|
|
3345
3347
|
};
|
|
3346
|
-
//# sourceMappingURL=chunk-
|
|
3348
|
+
//# sourceMappingURL=chunk-SUIH5B55.js.map
|