@sandagent/runner-cli 0.6.1 → 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.
Files changed (2) hide show
  1. package/dist/bundle.mjs +17 -11
  2. 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
- id: modelName,
1270
- name: modelName,
1271
- reasoning: false,
1272
- input: ["text"],
1273
- cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
1274
- contextWindow: 128e3,
1275
- maxTokens: 8192
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
- model = modelRegistry.find(provider, modelName);
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.1",
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-claude": "0.1.2",
58
- "@sandagent/runner-codex": "0.1.0",
59
- "@sandagent/runner-opencode": "0.1.0",
60
- "@sandagent/runner-gemini": "0.1.0",
61
- "@sandagent/runner-pi": "0.6.1"
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",