ocb-cli 1.2.2 → 1.2.4
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/proxy.js +5 -16
- package/package.json +1 -1
- package/src/proxy.ts +5 -15
package/dist/proxy.js
CHANGED
|
@@ -59,7 +59,7 @@ async function createSession(workspace, modelId) {
|
|
|
59
59
|
},
|
|
60
60
|
body: JSON.stringify({
|
|
61
61
|
workspace,
|
|
62
|
-
agent: "
|
|
62
|
+
agent: "build",
|
|
63
63
|
modelId: modelId || currentModel
|
|
64
64
|
})
|
|
65
65
|
});
|
|
@@ -280,21 +280,10 @@ app.post("/v1/messages", async (req, res) => {
|
|
|
280
280
|
try {
|
|
281
281
|
const requestedModel = req.body?.model;
|
|
282
282
|
let actualModel = currentModel;
|
|
283
|
-
if (requestedModel) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
currentSessionId = null;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
else {
|
|
291
|
-
const found = availableModels.find(m => m.id === requestedModel);
|
|
292
|
-
if (found) {
|
|
293
|
-
actualModel = requestedModel;
|
|
294
|
-
if (actualModel !== currentModel) {
|
|
295
|
-
currentSessionId = null;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
283
|
+
if (requestedModel && modelAliases[requestedModel]) {
|
|
284
|
+
actualModel = modelAliases[requestedModel];
|
|
285
|
+
if (actualModel !== currentModel) {
|
|
286
|
+
currentSessionId = null;
|
|
298
287
|
}
|
|
299
288
|
}
|
|
300
289
|
if (req.body?.max_tokens === undefined && req.body?.messages) {
|
package/package.json
CHANGED
package/src/proxy.ts
CHANGED
|
@@ -78,7 +78,7 @@ async function createSession(workspace: string, modelId?: string): Promise<strin
|
|
|
78
78
|
},
|
|
79
79
|
body: JSON.stringify({
|
|
80
80
|
workspace,
|
|
81
|
-
agent: "
|
|
81
|
+
agent: "build",
|
|
82
82
|
modelId: modelId || currentModel
|
|
83
83
|
})
|
|
84
84
|
});
|
|
@@ -317,20 +317,10 @@ app.post("/v1/messages", async (req, res) => {
|
|
|
317
317
|
const requestedModel = req.body?.model;
|
|
318
318
|
let actualModel = currentModel;
|
|
319
319
|
|
|
320
|
-
if (requestedModel) {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
currentSessionId = null;
|
|
325
|
-
}
|
|
326
|
-
} else {
|
|
327
|
-
const found = availableModels.find(m => m.id === requestedModel);
|
|
328
|
-
if (found) {
|
|
329
|
-
actualModel = requestedModel;
|
|
330
|
-
if (actualModel !== currentModel) {
|
|
331
|
-
currentSessionId = null;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
320
|
+
if (requestedModel && modelAliases[requestedModel]) {
|
|
321
|
+
actualModel = modelAliases[requestedModel];
|
|
322
|
+
if (actualModel !== currentModel) {
|
|
323
|
+
currentSessionId = null;
|
|
334
324
|
}
|
|
335
325
|
}
|
|
336
326
|
|