@velum-labs/routekit-tool-opencode 0.16.3 → 0.16.5
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/launch.js +12 -11
- package/package.json +5 -4
package/dist/launch.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
+
import { reasoningEffortDescriptors } from "@velum-labs/routekit-contracts";
|
|
4
5
|
import { spawnTool, trimTrailingSlashes } from "@velum-labs/routekit-runtime";
|
|
5
6
|
const PROVIDER_ID = "routekit";
|
|
6
7
|
export function opencodeModelArg(model) {
|
|
@@ -8,17 +9,17 @@ export function opencodeModelArg(model) {
|
|
|
8
9
|
}
|
|
9
10
|
/** Serialize one neutral routed provider for launchers and driver instances. */
|
|
10
11
|
export function opencodeProviderConfig(spec) {
|
|
11
|
-
const configFor = (name, reasoning) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{ reasoningEffort: effort.id }
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
12
|
+
const configFor = (name, reasoning) => {
|
|
13
|
+
const efforts = reasoningEffortDescriptors(reasoning);
|
|
14
|
+
return {
|
|
15
|
+
name,
|
|
16
|
+
...(efforts.length > 0
|
|
17
|
+
? {
|
|
18
|
+
variants: Object.fromEntries(efforts.map((effort) => [effort.id, { reasoningEffort: effort.id }]))
|
|
19
|
+
}
|
|
20
|
+
: {})
|
|
21
|
+
};
|
|
22
|
+
};
|
|
22
23
|
const models = Object.fromEntries(spec.models.flatMap((model) => [
|
|
23
24
|
[model.id, configFor(model.label ?? model.id, model.reasoning)],
|
|
24
25
|
...(model.aliases ?? []).map((alias) => [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velum-labs/routekit-tool-opencode",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/velum-labs/routekit.git",
|
|
@@ -28,9 +28,10 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@opencode-ai/sdk": "1.17.13",
|
|
30
30
|
"zod": "4.4.3",
|
|
31
|
-
"@velum-labs/routekit-
|
|
32
|
-
"@velum-labs/routekit-
|
|
33
|
-
"@velum-labs/routekit-
|
|
31
|
+
"@velum-labs/routekit-contracts": "0.16.5",
|
|
32
|
+
"@velum-labs/routekit-harness-core": "0.16.5",
|
|
33
|
+
"@velum-labs/routekit-tools": "0.16.5",
|
|
34
|
+
"@velum-labs/routekit-runtime": "0.16.5"
|
|
34
35
|
},
|
|
35
36
|
"keywords": [
|
|
36
37
|
"llm",
|