@elisym/cli 0.17.0 → 0.17.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/index.js CHANGED
@@ -406,7 +406,16 @@ function createOpenAICompatibleProvider(config) {
406
406
  },
407
407
  body: JSON.stringify({
408
408
  model,
409
- max_tokens: 1,
409
+ // Some xAI / DeepSeek model variants are reasoning models that
410
+ // burn output tokens on internal chain-of-thought before any
411
+ // visible reply; with `max_tokens: 1` the API returns HTTP 400
412
+ // and we falsely flip the (provider, model) pair to unhealthy
413
+ // on a valid key. 256 leaves room for the minimum reasoning
414
+ // budget on every current variant; for non-reasoning models
415
+ // the probe still stops at the first natural token, so the
416
+ // extra ceiling does not change the per-probe cost in
417
+ // practice.
418
+ max_tokens: 256,
410
419
  messages: [{ role: "user", content: "." }]
411
420
  })
412
421
  },
@@ -693,7 +702,17 @@ async function verifyKeyDeep2(apiKey, model, signal) {
693
702
  },
694
703
  body: JSON.stringify({
695
704
  model,
696
- ...reasoning ? { max_completion_tokens: 1 } : { max_tokens: 1 },
705
+ // GPT-5 reasoning models count internal chain-of-thought tokens
706
+ // against `max_completion_tokens`. With a budget of 1 the model
707
+ // exhausts it on reasoning before producing any visible content
708
+ // and the API responds HTTP 400 ("max_tokens reached") - which
709
+ // would falsely flip the (provider, model) pair to unhealthy on
710
+ // an otherwise valid key. 256 covers a "." prompt's reasoning
711
+ // budget on every current GPT-5 variant we tested with margin;
712
+ // non-reasoning models still take max_tokens: 1 since they emit
713
+ // visible content directly. Probe cost stays sub-cent per
714
+ // startup probe (reasoning tokens are billed at output rates).
715
+ ...reasoning ? { max_completion_tokens: 256 } : { max_tokens: 1 },
697
716
  messages: [{ role: "user", content: "." }]
698
717
  })
699
718
  },