@alisio/server 0.5.1 → 0.5.2
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/routes/sessions.js +11 -1
- package/package.json +4 -4
package/dist/routes/sessions.js
CHANGED
|
@@ -103,7 +103,17 @@ export function registerSessionRoutes(router, ctx) {
|
|
|
103
103
|
if (ctx.scheduler.busy(session.id))
|
|
104
104
|
throw new HttpError("session_busy", "Cannot change the model while a run is active");
|
|
105
105
|
const { app } = await sessions.app(session);
|
|
106
|
-
|
|
106
|
+
// Changing the model re-binds the session to the provider that owns it: the persisted
|
|
107
|
+
// transcript is provider-neutral, so a model of the now-active provider is usable even when
|
|
108
|
+
// the session's original provider is gone (no fresh session needed).
|
|
109
|
+
try {
|
|
110
|
+
await app.rebindSession(session.id, patch.model);
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
throw new HttpError("validation_failed", error instanceof Error ? error.message : String(error), {
|
|
114
|
+
fields: ["model"],
|
|
115
|
+
});
|
|
116
|
+
}
|
|
107
117
|
}
|
|
108
118
|
const options = {};
|
|
109
119
|
if (patch.effort !== undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alisio/server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Local HTTP + SSE server behind `alisio serve`: multi-workspace, multi-session web access to the Alisio agent core with a launch-token cookie, strict Host/Origin checks and fail-closed approvals. node:http only; runs on Node >=22.16 and Bun.",
|
|
5
5
|
"author": "Gustavo Gutiérrez",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"node": ">=22.16"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@alisio/core": "0.5.
|
|
43
|
-
"@alisio/sdk": "0.5.
|
|
42
|
+
"@alisio/core": "0.5.2",
|
|
43
|
+
"@alisio/sdk": "0.5.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@alisio/web": "0.5.
|
|
46
|
+
"@alisio/web": "0.5.2"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public",
|