troxy-cli 1.29.26 → 1.29.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "troxy-cli",
3
- "version": "1.29.26",
3
+ "version": "1.29.27",
4
4
  "description": "A secure control layer for AI agents: policies across payments, messages, logins, destructive actions, model usage, and secrets, all enforceable from the CLI",
5
5
  "homepage": "https://troxy.io",
6
6
  "bugs": {
@@ -48,7 +48,8 @@ async function failClosed($, e, next, err) {
48
48
 
49
49
  // --- Routing: extend the usage bar by sending easy prompts to a cheaper model.
50
50
  //
51
- // Ported from the proxy's scorer (troxy-tf-live model-proxy/app.py: bands,
51
+ // Ported from the proxy's scorer (troxy-tf-live model-proxy/app.py; bands match
52
+ // the production ROUTE_SCORER_BANDS=0.2:haiku,0.6:sonnet,0.8:opus,
52
53
  // never-upward rule, 50k context floor for Haiku). The mod scores each human
53
54
  // prompt once with the user's own session via $.model.complete, so there is no
54
55
  // Troxy round trip and no credential to carry. One decision per prompt, applied
@@ -60,7 +61,7 @@ const MODELS = {
60
61
  opus: 'claude-opus-5-5',
61
62
  };
62
63
  const RANK = { haiku: 0, sonnet: 1, opus: 2 };
63
- const BANDS = [[0.1, 'haiku'], [0.6, 'sonnet'], [0.8, 'opus']];
64
+ const BANDS = [[0.2, 'haiku'], [0.6, 'sonnet'], [0.8, 'opus']];
64
65
  const HAIKU_CONTEXT_FLOOR_TOKENS = 50000;
65
66
  const SCORE_TIMEOUT_MS = 3000;
66
67
  const SCORER_PROMPT_CHARS = 4000;
@@ -16,8 +16,10 @@ test('parseScore: unparseable text is null so the caller keeps the requested mod
16
16
  assert.equal(parseScore('hard'), null);
17
17
  });
18
18
 
19
- test('pickModel: bands route down from opus (<=0.1 haiku, <=0.6 sonnet, <=0.8 opus)', () => {
19
+ test('pickModel: bands route down from opus (<=0.2 haiku, <=0.6 sonnet, <=0.8 opus)', () => {
20
20
  assert.equal(pickModel(0.05, MODELS.opus, 1000), MODELS.haiku);
21
+ assert.equal(pickModel(0.2, MODELS.opus, 1000), MODELS.haiku);
22
+ assert.equal(pickModel(0.25, MODELS.opus, 1000), MODELS.sonnet);
21
23
  assert.equal(pickModel(0.4, MODELS.opus, 1000), MODELS.sonnet);
22
24
  assert.equal(pickModel(0.7, MODELS.opus, 1000), MODELS.opus);
23
25
  assert.equal(pickModel(0.95, MODELS.opus, 1000), MODELS.opus);