@sandagent/runner-cli 0.6.2 → 0.6.3
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/bundle.mjs +17 -11
- package/package.json +6 -6
package/dist/bundle.mjs
CHANGED
|
@@ -1253,7 +1253,7 @@ function createPiRunner(options = {}) {
|
|
|
1253
1253
|
const { provider, modelName } = parseModelSpec(modelSpec.trim());
|
|
1254
1254
|
const cwd = options.cwd || process.cwd();
|
|
1255
1255
|
const modelRegistry = new ModelRegistry(AuthStorage.create());
|
|
1256
|
-
let model = getModel(provider, modelName);
|
|
1256
|
+
let model = getModel(provider, modelName) ?? modelRegistry.find(provider, modelName);
|
|
1257
1257
|
if (model == null) {
|
|
1258
1258
|
const baseUrlEnvKey = `${provider.toUpperCase().replace(/-/g, "_")}_BASE_URL`;
|
|
1259
1259
|
const apiKeyEnvKey = `${provider.toUpperCase().replace(/-/g, "_")}_API_KEY`;
|
|
@@ -1265,17 +1265,23 @@ function createPiRunner(options = {}) {
|
|
|
1265
1265
|
baseUrl,
|
|
1266
1266
|
apiKey: apiKeyEnvKey,
|
|
1267
1267
|
api: "openai-completions",
|
|
1268
|
-
models: [
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1268
|
+
models: [
|
|
1269
|
+
{
|
|
1270
|
+
id: modelName,
|
|
1271
|
+
name: modelName,
|
|
1272
|
+
reasoning: false,
|
|
1273
|
+
input: ["text"],
|
|
1274
|
+
cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
1275
|
+
contextWindow: 128e3,
|
|
1276
|
+
maxTokens: 8192
|
|
1277
|
+
}
|
|
1278
|
+
]
|
|
1277
1279
|
});
|
|
1278
|
-
|
|
1280
|
+
const registered = modelRegistry.find(provider, modelName);
|
|
1281
|
+
if (!registered) {
|
|
1282
|
+
throw new Error(`Pi runner: failed to resolve model "${modelSpec}" after registration.`);
|
|
1283
|
+
}
|
|
1284
|
+
model = registered;
|
|
1279
1285
|
}
|
|
1280
1286
|
applyModelOverrides(model, provider, options.env);
|
|
1281
1287
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sandagent/runner-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "SandAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"esbuild": "^0.27.2",
|
|
55
55
|
"typescript": "^5.3.0",
|
|
56
56
|
"vitest": "^1.6.1",
|
|
57
|
-
"@sandagent/runner-
|
|
58
|
-
"@sandagent/runner-
|
|
59
|
-
"@sandagent/runner-
|
|
60
|
-
"@sandagent/runner-
|
|
61
|
-
"@sandagent/runner-
|
|
57
|
+
"@sandagent/runner-codex": "0.6.2",
|
|
58
|
+
"@sandagent/runner-gemini": "0.6.2",
|
|
59
|
+
"@sandagent/runner-pi": "0.6.3",
|
|
60
|
+
"@sandagent/runner-claude": "0.6.2",
|
|
61
|
+
"@sandagent/runner-opencode": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc && pnpm bundle",
|