@plune-ai/cli 0.11.0 → 0.11.1

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/cli.cjs CHANGED
@@ -597,7 +597,7 @@ function makeAnthropicProvider(config, env, pricing) {
597
597
  () => client.messages.create({
598
598
  model: req.model,
599
599
  max_tokens: req.max_tokens,
600
- temperature: req.temperature,
600
+ ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
601
601
  messages: [{ role: "user", content: req.prompt_resolved }]
602
602
  }),
603
603
  { max_retries: maxRetries }
@@ -657,7 +657,7 @@ function makeOpenAiCompatibleProvider(opts) {
657
657
  const res = await withRetry(
658
658
  () => client.chat.completions.create({
659
659
  model: req.model,
660
- temperature: req.temperature,
660
+ ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
661
661
  max_tokens: req.max_tokens,
662
662
  messages: [{ role: "user", content: req.prompt_resolved }],
663
663
  // OpenRouter extension: ask it to include the call's actual cost in `usage` (ADR-PRC02).
@@ -1547,7 +1547,7 @@ function buildJudge(provider, cfg, onUsage) {
1547
1547
  const res = await provider.complete({
1548
1548
  provider: cfg.type,
1549
1549
  model: cfg.model,
1550
- temperature: 0,
1550
+ ...cfg.temperature !== void 0 ? { temperature: cfg.temperature } : {},
1551
1551
  max_tokens: cfg.max_tokens ?? DEFAULT_MAX_TOKENS,
1552
1552
  prompt_resolved: prompt5
1553
1553
  });
@@ -1609,7 +1609,7 @@ function estimateUsage(prompt5, maxTokens) {
1609
1609
  async function runRow(p) {
1610
1610
  const t0 = p.now();
1611
1611
  const prompt5 = resolvePrompt(p.template, p.row.vars);
1612
- const temperature = p.providerConfig.temperature ?? 0;
1612
+ const temperature = p.providerConfig.temperature;
1613
1613
  const maxTokens = p.providerConfig.max_tokens ?? DEFAULT_MAX_TOKENS2;
1614
1614
  if (p.dryRun) {
1615
1615
  const est = estimateUsage(prompt5, maxTokens);
@@ -1619,7 +1619,7 @@ async function runRow(p) {
1619
1619
  const key = cacheKey({
1620
1620
  provider: p.providerConfig.type,
1621
1621
  model: p.providerConfig.model,
1622
- temperature,
1622
+ temperature: temperature ?? 0,
1623
1623
  max_tokens: maxTokens,
1624
1624
  prompt_resolved: prompt5
1625
1625
  });
@@ -1640,7 +1640,7 @@ async function runRow(p) {
1640
1640
  const res = await p.provider.complete({
1641
1641
  provider: p.providerConfig.type,
1642
1642
  model: p.providerConfig.model,
1643
- temperature,
1643
+ ...temperature !== void 0 ? { temperature } : {},
1644
1644
  max_tokens: maxTokens,
1645
1645
  prompt_resolved: prompt5
1646
1646
  });
package/dist/index.cjs CHANGED
@@ -480,7 +480,7 @@ function makeAnthropicProvider(config, env, pricing) {
480
480
  () => client.messages.create({
481
481
  model: req.model,
482
482
  max_tokens: req.max_tokens,
483
- temperature: req.temperature,
483
+ ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
484
484
  messages: [{ role: "user", content: req.prompt_resolved }]
485
485
  }),
486
486
  { max_retries: maxRetries }
@@ -529,7 +529,7 @@ function makeOpenAiCompatibleProvider(opts) {
529
529
  const res = await withRetry(
530
530
  () => client.chat.completions.create({
531
531
  model: req.model,
532
- temperature: req.temperature,
532
+ ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
533
533
  max_tokens: req.max_tokens,
534
534
  messages: [{ role: "user", content: req.prompt_resolved }],
535
535
  // OpenRouter extension: ask it to include the call's actual cost in `usage` (ADR-PRC02).
@@ -1216,7 +1216,7 @@ function buildJudge(provider, cfg, onUsage) {
1216
1216
  const res = await provider.complete({
1217
1217
  provider: cfg.type,
1218
1218
  model: cfg.model,
1219
- temperature: 0,
1219
+ ...cfg.temperature !== void 0 ? { temperature: cfg.temperature } : {},
1220
1220
  max_tokens: cfg.max_tokens ?? DEFAULT_MAX_TOKENS,
1221
1221
  prompt_resolved: prompt5
1222
1222
  });
@@ -1273,7 +1273,7 @@ function estimateUsage(prompt5, maxTokens) {
1273
1273
  async function runRow(p) {
1274
1274
  const t0 = p.now();
1275
1275
  const prompt5 = resolvePrompt(p.template, p.row.vars);
1276
- const temperature = p.providerConfig.temperature ?? 0;
1276
+ const temperature = p.providerConfig.temperature;
1277
1277
  const maxTokens = p.providerConfig.max_tokens ?? DEFAULT_MAX_TOKENS2;
1278
1278
  if (p.dryRun) {
1279
1279
  const est = estimateUsage(prompt5, maxTokens);
@@ -1283,7 +1283,7 @@ async function runRow(p) {
1283
1283
  const key = cacheKey({
1284
1284
  provider: p.providerConfig.type,
1285
1285
  model: p.providerConfig.model,
1286
- temperature,
1286
+ temperature: temperature ?? 0,
1287
1287
  max_tokens: maxTokens,
1288
1288
  prompt_resolved: prompt5
1289
1289
  });
@@ -1304,7 +1304,7 @@ async function runRow(p) {
1304
1304
  const res = await p.provider.complete({
1305
1305
  provider: p.providerConfig.type,
1306
1306
  model: p.providerConfig.model,
1307
- temperature,
1307
+ ...temperature !== void 0 ? { temperature } : {},
1308
1308
  max_tokens: maxTokens,
1309
1309
  prompt_resolved: prompt5
1310
1310
  });
package/dist/index.d.cts CHANGED
@@ -146,7 +146,12 @@ interface Config {
146
146
  interface CompletionRequest {
147
147
  provider: string;
148
148
  model: string;
149
- temperature: number;
149
+ /**
150
+ * Only when the config asked for one. Models released after Claude Opus 4.6 do not take a
151
+ * temperature at all — any value but 1.0 is a 400 — so a default here would be a default that
152
+ * breaks every eval on a current model. Absent means "the model's own".
153
+ */
154
+ temperature?: number;
150
155
  max_tokens: number;
151
156
  prompt_resolved: string;
152
157
  }
package/dist/index.d.ts CHANGED
@@ -146,7 +146,12 @@ interface Config {
146
146
  interface CompletionRequest {
147
147
  provider: string;
148
148
  model: string;
149
- temperature: number;
149
+ /**
150
+ * Only when the config asked for one. Models released after Claude Opus 4.6 do not take a
151
+ * temperature at all — any value but 1.0 is a 400 — so a default here would be a default that
152
+ * breaks every eval on a current model. Absent means "the model's own".
153
+ */
154
+ temperature?: number;
150
155
  max_tokens: number;
151
156
  prompt_resolved: string;
152
157
  }
package/dist/index.js CHANGED
@@ -427,7 +427,7 @@ function makeAnthropicProvider(config, env, pricing) {
427
427
  () => client.messages.create({
428
428
  model: req.model,
429
429
  max_tokens: req.max_tokens,
430
- temperature: req.temperature,
430
+ ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
431
431
  messages: [{ role: "user", content: req.prompt_resolved }]
432
432
  }),
433
433
  { max_retries: maxRetries }
@@ -476,7 +476,7 @@ function makeOpenAiCompatibleProvider(opts) {
476
476
  const res = await withRetry(
477
477
  () => client.chat.completions.create({
478
478
  model: req.model,
479
- temperature: req.temperature,
479
+ ...req.temperature !== void 0 ? { temperature: req.temperature } : {},
480
480
  max_tokens: req.max_tokens,
481
481
  messages: [{ role: "user", content: req.prompt_resolved }],
482
482
  // OpenRouter extension: ask it to include the call's actual cost in `usage` (ADR-PRC02).
@@ -1163,7 +1163,7 @@ function buildJudge(provider, cfg, onUsage) {
1163
1163
  const res = await provider.complete({
1164
1164
  provider: cfg.type,
1165
1165
  model: cfg.model,
1166
- temperature: 0,
1166
+ ...cfg.temperature !== void 0 ? { temperature: cfg.temperature } : {},
1167
1167
  max_tokens: cfg.max_tokens ?? DEFAULT_MAX_TOKENS,
1168
1168
  prompt_resolved: prompt5
1169
1169
  });
@@ -1220,7 +1220,7 @@ function estimateUsage(prompt5, maxTokens) {
1220
1220
  async function runRow(p) {
1221
1221
  const t0 = p.now();
1222
1222
  const prompt5 = resolvePrompt(p.template, p.row.vars);
1223
- const temperature = p.providerConfig.temperature ?? 0;
1223
+ const temperature = p.providerConfig.temperature;
1224
1224
  const maxTokens = p.providerConfig.max_tokens ?? DEFAULT_MAX_TOKENS2;
1225
1225
  if (p.dryRun) {
1226
1226
  const est = estimateUsage(prompt5, maxTokens);
@@ -1230,7 +1230,7 @@ async function runRow(p) {
1230
1230
  const key = cacheKey({
1231
1231
  provider: p.providerConfig.type,
1232
1232
  model: p.providerConfig.model,
1233
- temperature,
1233
+ temperature: temperature ?? 0,
1234
1234
  max_tokens: maxTokens,
1235
1235
  prompt_resolved: prompt5
1236
1236
  });
@@ -1251,7 +1251,7 @@ async function runRow(p) {
1251
1251
  const res = await p.provider.complete({
1252
1252
  provider: p.providerConfig.type,
1253
1253
  model: p.providerConfig.model,
1254
- temperature,
1254
+ ...temperature !== void 0 ? { temperature } : {},
1255
1255
  max_tokens: maxTokens,
1256
1256
  prompt_resolved: prompt5
1257
1257
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plune-ai/cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "AI-powered assertion testing for LLM apps — write assertions, run them against any provider, get a pass/fail report (local, CI, or diff).",
5
5
  "keywords": [
6
6
  "ai",