Add SubQ Snap benchmark results

#42
.gitattributes CHANGED
@@ -62,3 +62,4 @@ predictions/current/*/gliner25-decide.jsonl filter=lfs diff=lfs merge=lfs -text
62
  predictions/current/*/openai-decisions.jsonl filter=lfs diff=lfs merge=lfs -text
63
  predictions/current/*/mercury-decide.jsonl filter=lfs diff=lfs merge=lfs -text
64
  predictions/current/*/microsoft-decision-1.jsonl filter=lfs diff=lfs merge=lfs -text
 
 
62
  predictions/current/*/openai-decisions.jsonl filter=lfs diff=lfs merge=lfs -text
63
  predictions/current/*/mercury-decide.jsonl filter=lfs diff=lfs merge=lfs -text
64
  predictions/current/*/microsoft-decision-1.jsonl filter=lfs diff=lfs merge=lfs -text
65
+ predictions/current/security/subq-snap.jsonl filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -27,6 +27,7 @@ Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go
27
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | [Fastino classification API](https://api.fastino.ai/v1/chat/completions) (`fastino/GLiNER-2.5-Decide`) |
28
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`inception/mercury-decide`) |
29
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`microsoft/microsoft-decision-1`, Azure) |
 
30
 
31
  <!-- BEGIN TRADEOFF_RESULTS -->
32
 
@@ -50,6 +51,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
50
  | --- | ---: | ---: | ---: | ---: |
51
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 48.7% | 38.7% | **10.0%** | $1.102 |
52
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.4% | 27.1% | 6.3% | $0.239 |
 
53
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 24.0% | 18.8% | 5.1% | $0.481 |
54
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 17.7% | 12.7% | 5.0% | $0.551 |
55
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.0% | 39.7% | 3.3% | $0.239 |
@@ -69,6 +71,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
69
  | --- | ---: | ---: | ---: | ---: |
70
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 52.4% | 41.3% | **11.1%** | $0.247 |
71
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 35.8% | 27.3% | 8.6% | $0.054 |
 
72
  | [TypeLLM](https://typellm.ai/docs) | 11.3% | 5.8% | 5.6% | $0.129 |
73
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 25.5% | 20.6% | 4.8% | $0.108 |
74
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.0% | 15.6% | 4.5% | $0.123 |
@@ -94,6 +97,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
94
  | [TypeLLM](https://typellm.ai/docs) | 27.8% | 17.4% | 10.5% | $0.566 |
95
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 54.1% | 44.5% | 9.7% | $1.469 |
96
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 27.1% | 17.8% | 9.3% | **$0.131** |
 
97
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.1% | 25.8% | 7.3% | $0.208 |
98
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.9% | 38.2% | 5.6% | $0.455 |
99
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 21.0% | 17.2% | 3.9% | $0.251 |
@@ -114,6 +118,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
114
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 21.9% | 18.5% | 3.3% | $0.074 |
115
  | [TypeLLM](https://typellm.ai/docs) | 8.8% | 6.2% | 2.5% | $0.203 |
116
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 11.1% | 9.0% | 2.1% | **$0.047** |
 
117
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 18.1% | 16.7% | 1.4% | $0.163 |
118
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.0% | **1.5%** | 0.6% | $0.142 |
119
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **100.0%** | 100.0% | 0.0% | ~$0.528 |
@@ -132,6 +137,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
132
  | --- | ---: | ---: | ---: | ---: |
133
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **81.8%** | 6.5% | **75.2%** | $0.020 |
134
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 76.6% | 4.7% | 72.0% | $0.093 |
 
135
  | [TypeLLM](https://typellm.ai/docs) | 61.7% | 2.8% | 58.9% | $0.050 |
136
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 50.0% | 0.5% | 49.5% | $0.048 |
137
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 52.8% | 5.1% | 47.7% | $0.018 |
@@ -148,6 +154,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
148
  | --- | ---: | ---: | ---: | ---: |
149
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **87.3%** | 8.5% | **78.9%** | $0.006 |
150
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 84.5% | 7.0% | 77.5% | $0.030 |
 
151
  | [TypeLLM](https://typellm.ai/docs) | 59.2% | 5.6% | 53.5% | $0.016 |
152
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 53.5% | 1.4% | 52.1% | $0.016 |
153
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 53.5% | 8.5% | 45.1% | $0.006 |
@@ -166,6 +173,8 @@ Span-01 uses its [behavior-scoring API](https://www.respan.ai/docs/documentation
166
 
167
  Liquid d1 received the same Perch method state and all applicable questions in one API call per method. Semantic lint used the same compiled `ensure` rule as Jev.
168
 
 
 
169
  GLiNER-2.5-Decide scores the answer criteria as native classification labels. Perch sizes each method's context and batches its applicable questions to fit the endpoint. Large methods are read in overlapping source chunks; each question's highest issue score supplies the method decision. Returned label confidences supply the scores. Timeouts and requests that still cannot fit are recorded as failures. Costs use API-reported prompt tokens at the live catalog rate of $0.03 per million input tokens.
170
 
171
  Inference costs cover scoring the method sides in each table. Jev costs are estimated from API-reported input tokens at [TypeSafe's published rate](https://typesafe.ai/blog/introducing-system-one-models-and-jev); for semantic lint, input-token usage was measured by replaying the same 570 requests with `jev-1.13.0`. Span-01 costs use API-reported input tokens at [Respan's published rate](https://www.respan.ai/docs/documentation/span-01/concept). Beam costs are API-reported. CLM cost is an estimated share of a 38.4-minute H100 run costing $2.23 total, allocated by embedding count. Costs are not ranked. TypeLLM cost uses API-reported input tokens at its [published rate](https://typellm.ai/pricing); no thinking tokens were used.
@@ -190,6 +199,7 @@ Liquid d1, Mercury Decide and Microsoft-Decision-1 receive each method's saved c
190
  - [`perch-sizing.mjs`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/perch-sizing.mjs): uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
191
  - [`openai_decisions.py`](openai_decisions.py) and [`openai-decisions-manifest.json`](openai-decisions-manifest.json): resumable Decisions API scorer and public benchmark file checksums.
192
  - [`openrouter_decisions.py`](openrouter_decisions.py) and [`openrouter-decisions-manifest.json`](openrouter-decisions-manifest.json): resumable native SystemOne scorer and public benchmark file checksums.
 
193
  - [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer.
194
 
195
  To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment:
@@ -241,6 +251,14 @@ python3 openrouter_decisions.py --model microsoft/microsoft-decision-1 --manifes
241
 
242
  The paid endpoints use the full saved context. Mercury’s free endpoint is available with `--model inception/mercury-decide:free`; its daily account quota can pause a run. Rerun the same command to resume saved outcomes.
243
 
 
 
 
 
 
 
 
 
244
  ## License
245
 
246
  Everything here except the scripts is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): the results, predictions, question pack and this card. The scripts (`*.py`, `*.mjs` and `adapters/`) are licensed under MIT. The pair data is in the [bug](https://huggingface.co/datasets/perchscan/bug-pairs-public), [security](https://huggingface.co/datasets/perchscan/security-pairs-public) and [lint](https://huggingface.co/datasets/perchscan/perch-lint-bench-public) datasets, each with its own license. See their cards for the data sources.
 
27
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | [Fastino classification API](https://api.fastino.ai/v1/chat/completions) (`fastino/GLiNER-2.5-Decide`) |
28
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`inception/mercury-decide`) |
29
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`microsoft/microsoft-decision-1`, Azure) |
30
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | [SubQ Decisions API](https://api.subq.ai/v1/systemone) (`subq-snap-preview`) |
31
 
32
  <!-- BEGIN TRADEOFF_RESULTS -->
33
 
 
51
  | --- | ---: | ---: | ---: | ---: |
52
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 48.7% | 38.7% | **10.0%** | $1.102 |
53
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.4% | 27.1% | 6.3% | $0.239 |
54
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | 15.3% | 9.9% | 5.3% | $0.568 |
55
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 24.0% | 18.8% | 5.1% | $0.481 |
56
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 17.7% | 12.7% | 5.0% | $0.551 |
57
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.0% | 39.7% | 3.3% | $0.239 |
 
71
  | --- | ---: | ---: | ---: | ---: |
72
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 52.4% | 41.3% | **11.1%** | $0.247 |
73
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 35.8% | 27.3% | 8.6% | $0.054 |
74
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | 19.3% | 11.2% | 8.2% | $0.133 |
75
  | [TypeLLM](https://typellm.ai/docs) | 11.3% | 5.8% | 5.6% | $0.129 |
76
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 25.5% | 20.6% | 4.8% | $0.108 |
77
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.0% | 15.6% | 4.5% | $0.123 |
 
97
  | [TypeLLM](https://typellm.ai/docs) | 27.8% | 17.4% | 10.5% | $0.566 |
98
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 54.1% | 44.5% | 9.7% | $1.469 |
99
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 27.1% | 17.8% | 9.3% | **$0.131** |
100
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | 24.7% | 15.9% | 8.8% | $0.817 |
101
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.1% | 25.8% | 7.3% | $0.208 |
102
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.9% | 38.2% | 5.6% | $0.455 |
103
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 21.0% | 17.2% | 3.9% | $0.251 |
 
118
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 21.9% | 18.5% | 3.3% | $0.074 |
119
  | [TypeLLM](https://typellm.ai/docs) | 8.8% | 6.2% | 2.5% | $0.203 |
120
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 11.1% | 9.0% | 2.1% | **$0.047** |
121
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | 10.3% | 8.3% | 2.0% | $0.278 |
122
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 18.1% | 16.7% | 1.4% | $0.163 |
123
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.0% | **1.5%** | 0.6% | $0.142 |
124
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **100.0%** | 100.0% | 0.0% | ~$0.528 |
 
137
  | --- | ---: | ---: | ---: | ---: |
138
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **81.8%** | 6.5% | **75.2%** | $0.020 |
139
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 76.6% | 4.7% | 72.0% | $0.093 |
140
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | 71.5% | 2.8% | 68.7% | $0.045 |
141
  | [TypeLLM](https://typellm.ai/docs) | 61.7% | 2.8% | 58.9% | $0.050 |
142
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 50.0% | 0.5% | 49.5% | $0.048 |
143
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 52.8% | 5.1% | 47.7% | $0.018 |
 
154
  | --- | ---: | ---: | ---: | ---: |
155
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **87.3%** | 8.5% | **78.9%** | $0.006 |
156
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 84.5% | 7.0% | 77.5% | $0.030 |
157
+ | [SubQ Snap Preview](https://docs.subq.ai/using-the-api/models/) | 71.8% | 4.2% | 67.6% | $0.016 |
158
  | [TypeLLM](https://typellm.ai/docs) | 59.2% | 5.6% | 53.5% | $0.016 |
159
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 53.5% | 1.4% | 52.1% | $0.016 |
160
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 53.5% | 8.5% | 45.1% | $0.006 |
 
173
 
174
  Liquid d1 received the same Perch method state and all applicable questions in one API call per method. Semantic lint used the same compiled `ensure` rule as Jev.
175
 
176
+ SubQ Snap Preview uses its native noul probabilities with an 8,192-token limit reported by the server. Perch sizes the method context and batches its questions; large methods use overlapping source readings that cover every target-source byte. Each question’s highest issue score supplies the method decision. Input-token usage returned by SubQ is priced at its [published $0.05 per million rate](https://docs.subq.ai/using-the-api/models/).
177
+
178
  GLiNER-2.5-Decide scores the answer criteria as native classification labels. Perch sizes each method's context and batches its applicable questions to fit the endpoint. Large methods are read in overlapping source chunks; each question's highest issue score supplies the method decision. Returned label confidences supply the scores. Timeouts and requests that still cannot fit are recorded as failures. Costs use API-reported prompt tokens at the live catalog rate of $0.03 per million input tokens.
179
 
180
  Inference costs cover scoring the method sides in each table. Jev costs are estimated from API-reported input tokens at [TypeSafe's published rate](https://typesafe.ai/blog/introducing-system-one-models-and-jev); for semantic lint, input-token usage was measured by replaying the same 570 requests with `jev-1.13.0`. Span-01 costs use API-reported input tokens at [Respan's published rate](https://www.respan.ai/docs/documentation/span-01/concept). Beam costs are API-reported. CLM cost is an estimated share of a 38.4-minute H100 run costing $2.23 total, allocated by embedding count. Costs are not ranked. TypeLLM cost uses API-reported input tokens at its [published rate](https://typellm.ai/pricing); no thinking tokens were used.
 
199
  - [`perch-sizing.mjs`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/perch-sizing.mjs): uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
200
  - [`openai_decisions.py`](openai_decisions.py) and [`openai-decisions-manifest.json`](openai-decisions-manifest.json): resumable Decisions API scorer and public benchmark file checksums.
201
  - [`openrouter_decisions.py`](openrouter_decisions.py) and [`openrouter-decisions-manifest.json`](openrouter-decisions-manifest.json): resumable native SystemOne scorer and public benchmark file checksums.
202
+ - [`subq.py`](subq.py): SubQ Decisions scorer using the shared native runner and Perch’s context sizing.
203
  - [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer.
204
 
205
  To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment:
 
251
 
252
  The paid endpoints use the full saved context. Mercury’s free endpoint is available with `--model inception/mercury-decide:free`; its daily account quota can pause a run. Rerun the same command to resume saved outcomes.
253
 
254
+ To run SubQ Snap Preview, use the public files and manifest above, install `httpx`, and set `SUBQ_API_KEY` and `PERCH_SOURCE` to a [Perch checkout](https://github.com/lakeday-org/perch) with its npm dependencies installed. Node must be on your PATH:
255
+
256
+ ```sh
257
+ python3 subq.py --manifest openrouter-decisions-manifest.json --out subq-results
258
+ ```
259
+
260
+ Rerun the same command to resume saved outcomes.
261
+
262
  ## License
263
 
264
  Everything here except the scripts is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): the results, predictions, question pack and this card. The scripts (`*.py`, `*.mjs` and `adapters/`) are licensed under MIT. The pair data is in the [bug](https://huggingface.co/datasets/perchscan/bug-pairs-public), [security](https://huggingface.co/datasets/perchscan/security-pairs-public) and [lint](https://huggingface.co/datasets/perchscan/perch-lint-bench-public) datasets, each with its own license. See their cards for the data sources.
assets/bug-tradeoff.svg CHANGED
assets/lint-tradeoff.svg CHANGED
assets/security-tradeoff.svg CHANGED
openrouter_decisions.py CHANGED
@@ -22,6 +22,10 @@ import openai_decisions as shared
22
 
23
  ROOT = Path(__file__).resolve().parent
24
  API = 'https://openrouter.ai/api/v1/systemone'
 
 
 
 
25
  CATALOG = {
26
  'inception/mercury-decide:free': ('mercury-decide', 'inception/mercury-decide-20260930',
27
  'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, 0),
@@ -87,7 +91,7 @@ def payload_for(pair, role, domain, pack, model):
87
 
88
  def prediction(pair, role, domain, pack, response, elapsed, model):
89
  if response.get('model') != REVISION:
90
- raise AccountError('OpenRouter returned a different checkpoint: ' + str(response.get('model')))
91
  checks = questions_for(pair, domain, pack)
92
  answers = response.get('answers', {})
93
  if not isinstance(answers, dict) or set(answers) != {c['name'] for c in checks}:
@@ -133,13 +137,14 @@ def predict(key, pair, role, domain, pack, timeout, limiter, model):
133
  response = _local.client.post(API, json=payload, timeout=timeout)
134
  if response.status_code >= 400:
135
  try:
136
- detail = response.json().get('error', {})
 
137
  except ValueError:
138
  detail = {}
139
  metadata = detail.get('metadata') or {}
140
  code = metadata.get('error_type') or detail.get('code') or response.status_code
141
  if response.status_code in (401, 402, 403, 404):
142
- raise AccountError(f'OpenRouter HTTP {response.status_code}: {code}')
143
  if response.status_code == 429:
144
  # A daily quota cannot be fixed by retrying this method.
145
  remaining = response.headers.get('x-ratelimit-remaining')
@@ -157,7 +162,7 @@ def predict(key, pair, role, domain, pack, timeout, limiter, model):
157
  delay = 2 ** (attempt + 1)
158
  time.sleep(min(30, max(1, delay)))
159
  continue
160
- raise RuntimeError(f'OpenRouter HTTP {response.status_code}: {code}')
161
  return prediction(pair, role, domain, pack, response.json(),
162
  time.monotonic() - started, model)
163
  raise AssertionError('unreachable')
@@ -173,8 +178,8 @@ def report(group, pack, model):
173
  result.update(model_id=MODEL_ID, model_revision=REVISION, requested_model=model,
174
  protocol_id=PROTOCOL, run_id=RUN_ID,
175
  inference_cost_usd=sum(r.get('usage', {}).get('cost', 0) for r in rows),
176
- inference_cost_basis='OpenRouter API-reported usage.cost',
177
- inference_endpoint=API, inference_host='OpenRouter / ' + HOST,
178
  context_limit_tokens=CONTEXT_LIMIT)
179
  return result
180
 
@@ -252,9 +257,9 @@ def main():
252
  spent = save_reports()
253
  if args.score_saved or not pending:
254
  return
255
- key = os.environ.get('OPENROUTER_API_KEY')
256
  if not key:
257
- raise AccountError('Set OPENROUTER_API_KEY')
258
  if args.model.endswith(':free'):
259
  limits = httpx.get('https://openrouter.ai/api/v1/key',
260
  headers={'Authorization': 'Bearer ' + key}, timeout=args.timeout)
@@ -268,6 +273,8 @@ def main():
268
  raise AccountError('OpenRouter daily free request allowance exhausted')
269
  pending = pending[:remaining]
270
  print(f'Free allowance: scheduling at most {len(pending)} requests today.', flush=True)
 
 
271
  limiter = RequestLimiter(args.requests_per_second)
272
  iterator, attempted = iter(pending), 0
273
  reserved = 0.
@@ -283,7 +290,7 @@ def main():
283
  job = next(iterator, None)
284
  if job:
285
  group, pair, role = job
286
- bound = maximum_charge(args.model, len(questions_for(pair, group['domain'], pack)))
287
  if args.budget is not None and spent + reserved + bound > args.budget:
288
  budget_paused = True
289
  return
 
22
 
23
  ROOT = Path(__file__).resolve().parent
24
  API = 'https://openrouter.ai/api/v1/systemone'
25
+ API_LABEL = 'OpenRouter'
26
+ KEY_ENV = 'OPENROUTER_API_KEY'
27
+ COST_BASIS = 'OpenRouter API-reported usage.cost'
28
+ HOST_PREFIX = 'OpenRouter / '
29
  CATALOG = {
30
  'inception/mercury-decide:free': ('mercury-decide', 'inception/mercury-decide-20260930',
31
  'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, 0),
 
91
 
92
  def prediction(pair, role, domain, pack, response, elapsed, model):
93
  if response.get('model') != REVISION:
94
+ raise AccountError(API_LABEL + ' returned a different checkpoint: ' + str(response.get('model')))
95
  checks = questions_for(pair, domain, pack)
96
  answers = response.get('answers', {})
97
  if not isinstance(answers, dict) or set(answers) != {c['name'] for c in checks}:
 
137
  response = _local.client.post(API, json=payload, timeout=timeout)
138
  if response.status_code >= 400:
139
  try:
140
+ error_body = response.json()
141
+ detail = error_body.get('error') or error_body.get('detail') or {}
142
  except ValueError:
143
  detail = {}
144
  metadata = detail.get('metadata') or {}
145
  code = metadata.get('error_type') or detail.get('code') or response.status_code
146
  if response.status_code in (401, 402, 403, 404):
147
+ raise AccountError(f'{API_LABEL} HTTP {response.status_code}: {code}')
148
  if response.status_code == 429:
149
  # A daily quota cannot be fixed by retrying this method.
150
  remaining = response.headers.get('x-ratelimit-remaining')
 
162
  delay = 2 ** (attempt + 1)
163
  time.sleep(min(30, max(1, delay)))
164
  continue
165
+ raise RuntimeError(f'{API_LABEL} HTTP {response.status_code}: {code}')
166
  return prediction(pair, role, domain, pack, response.json(),
167
  time.monotonic() - started, model)
168
  raise AssertionError('unreachable')
 
178
  result.update(model_id=MODEL_ID, model_revision=REVISION, requested_model=model,
179
  protocol_id=PROTOCOL, run_id=RUN_ID,
180
  inference_cost_usd=sum(r.get('usage', {}).get('cost', 0) for r in rows),
181
+ inference_cost_basis=COST_BASIS,
182
+ inference_endpoint=API, inference_host=HOST_PREFIX + HOST,
183
  context_limit_tokens=CONTEXT_LIMIT)
184
  return result
185
 
 
257
  spent = save_reports()
258
  if args.score_saved or not pending:
259
  return
260
+ key = os.environ.get(KEY_ENV)
261
  if not key:
262
+ raise AccountError('Set ' + KEY_ENV)
263
  if args.model.endswith(':free'):
264
  limits = httpx.get('https://openrouter.ai/api/v1/key',
265
  headers={'Authorization': 'Bearer ' + key}, timeout=args.timeout)
 
273
  raise AccountError('OpenRouter daily free request allowance exhausted')
274
  pending = pending[:remaining]
275
  print(f'Free allowance: scheduling at most {len(pending)} requests today.', flush=True)
276
+ if args.budget is not None and CONTEXT_LIMIT is None:
277
+ parser.error('A spending cap requires a published context limit; account credit still limits spending')
278
  limiter = RequestLimiter(args.requests_per_second)
279
  iterator, attempted = iter(pending), 0
280
  reserved = 0.
 
290
  job = next(iterator, None)
291
  if job:
292
  group, pair, role = job
293
+ bound = maximum_charge(args.model, len(questions_for(pair, group['domain'], pack))) if args.budget is not None else 0.
294
  if args.budget is not None and spent + reserved + bound > args.budget:
295
  budget_paused = True
296
  return
perch-sizing.mjs CHANGED
@@ -45,7 +45,17 @@ function methodInput(side) {
45
  const callees = (state.calls ?? []).map(neighbor), callers = (state.called_by ?? []).map(neighbor);
46
  const edges = (state.call_graph ?? []).map(edge => Array.isArray(edge) ? edge : String(edge).split(' -> '))
47
  .filter(edge => edge.length === 2).map(edge => edge.map(name => names.get(name) ?? name));
48
- return { node, lines, callees, callers, edges };
 
 
 
 
 
 
 
 
 
 
49
  }
50
 
51
  function plan({ side, checks, stateBudget, requestBudget, maxQuestions }) {
 
45
  const callees = (state.calls ?? []).map(neighbor), callers = (state.called_by ?? []).map(neighbor);
46
  const edges = (state.call_graph ?? []).map(edge => Array.isArray(edge) ? edge : String(edge).split(' -> '))
47
  .filter(edge => edge.length === 2).map(edge => edge.map(name => names.get(name) ?? name));
48
+ const imports = (state.imports ?? []).map(item => {
49
+ if (typeof item !== 'string') return item;
50
+ const from = item.lastIndexOf(' from ');
51
+ if (from < 0) throw new Error('Saved import has no module: ' + item);
52
+ const target = item.slice(0, from), module = item.slice(from + 6);
53
+ const as = target.lastIndexOf(' as ');
54
+ const name = as < 0 ? target : target.slice(0, as);
55
+ const alias = as < 0 ? name : target.slice(as + 4);
56
+ return { name, alias, module };
57
+ });
58
+ return { node, lines, imports, moduleScopeText: state.module_scope ?? null, callees, callers, edges };
59
  }
60
 
61
  function plan({ side, checks, stateBudget, requestBudget, maxQuestions }) {
predictions/current/bug/subq-snap.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
predictions/current/lint/subq-snap.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
predictions/current/security/subq-snap.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a61de1126c4ec1bf4a53c1549643bde0253144bc436dab29b4c8bfb618d47994
3
+ size 17403214
results-current.jsonl CHANGED
@@ -64,3 +64,9 @@
64
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4758656734035225, "average_precision_answered_methods": 0.4758656734035225, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 396, "fp": 24, "tn": 548, "tp": 28}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.11764705882352941, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04195804195804196, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.19667368, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 4916842, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7929241659585387, "latency_p95_seconds": 2.340836458024569, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5062344139650873, "pair_order_correct": 203, "pair_order_eligible": 401, "precision": 0.5384615384615384, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.0660377358490566, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 203, "eligible": 401, "ties": 5}}
65
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.49708136950251325, "average_precision_answered_methods": 0.49708136950251325, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 545, "fp": 603, "tn": 877, "tp": 597}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.5098206660973527, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.40743243243243243, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 6.13173568, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 153293392, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0774508339818567, "latency_p95_seconds": 2.837762249982916, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5284697508896797, "pair_order_correct": 594, "pair_order_eligible": 1124, "precision": 0.4975, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5227670753064798, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 594, "eligible": 1124, "ties": 15}}
66
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4793341864639895, "average_precision_answered_methods": 0.4793341864639895, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 260, "fp": 141, "tn": 339, "tp": 138}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.4076809453471196, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.29375, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 2.36226772, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 59056693, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.1423684580950066, "latency_p95_seconds": 2.9545628749765456, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.4946236559139785, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.34673366834170855, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 181, "eligible": 398, "ties": 4}}
 
 
 
 
 
 
 
64
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4758656734035225, "average_precision_answered_methods": 0.4758656734035225, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 396, "fp": 24, "tn": 548, "tp": 28}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.11764705882352941, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04195804195804196, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.19667368, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 4916842, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7929241659585387, "latency_p95_seconds": 2.340836458024569, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5062344139650873, "pair_order_correct": 203, "pair_order_eligible": 401, "precision": 0.5384615384615384, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.0660377358490566, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 203, "eligible": 401, "ties": 5}}
65
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.49708136950251325, "average_precision_answered_methods": 0.49708136950251325, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 545, "fp": 603, "tn": 877, "tp": 597}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.5098206660973527, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.40743243243243243, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 6.13173568, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 153293392, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0774508339818567, "latency_p95_seconds": 2.837762249982916, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5284697508896797, "pair_order_correct": 594, "pair_order_eligible": 1124, "precision": 0.4975, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5227670753064798, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 594, "eligible": 1124, "ties": 15}}
66
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4793341864639895, "average_precision_answered_methods": 0.4793341864639895, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 260, "fp": 141, "tn": 339, "tp": 138}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.4076809453471196, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.29375, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 2.36226772, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 59056693, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.1423684580950066, "latency_p95_seconds": 2.9545628749765456, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.4946236559139785, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.34673366834170855, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 181, "eligible": 398, "ties": 4}}
67
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.954599215445173, "average_precision_answered_methods": 0.954599215445173, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 61, "fp": 6, "tn": 208, "tp": 153}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "lint", "f1": 0.8203753351206434, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.028037383177570093, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.045379050000000004, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 907581, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8166153749916703, "latency_p95_seconds": 2.551551292068325, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.9672897196261683, "pair_order_correct": 207, "pair_order_eligible": 214, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.9622641509433962, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": null, "recall": 0.7149532710280374, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 207, "eligible": 214, "ties": 0}}
68
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9686294456382798, "average_precision_answered_methods": 0.9686294456382798, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 20, "fp": 3, "tn": 68, "tp": 51}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "lint", "f1": 0.816, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04225352112676056, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.015941200000000003, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 318824, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.152747832937166, "latency_p95_seconds": 2.732683040900156, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.9577464788732394, "pair_order_correct": 68, "pair_order_eligible": 71, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.9444444444444444, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": null, "recall": 0.7183098591549296, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 68, "eligible": 71, "ties": 0}}
69
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4426, "average_precision": 0.48487100893482865, "average_precision_answered_methods": 0.48487100893482865, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1577, "fp": 256, "tn": 2323, "tp": 284}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "bug", "f1": 0.23656809662640566, "failed_methods": 14, "failure_counts": {"Context sizing failed": 14}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.09926328034121752, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.56760645, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 11352129, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.812008082983084, "latency_p95_seconds": 2.3090446670539677, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.5095398428731762, "pair_order_correct": 908, "pair_order_eligible": 1782, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5259259259259259, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.15260612573885007, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 908, "eligible": 1782, "ties": 2}}
70
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 992, "average_precision": 0.5253123825884426, "average_precision_answered_methods": 0.5253123825884426, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 342, "fp": 64, "tn": 508, "tp": 82}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "bug", "f1": 0.28771929824561404, "failed_methods": 4, "failure_counts": {"Context sizing failed": 4}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.11188811188811189, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.13267365, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 2653473, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.776716374908574, "latency_p95_seconds": 2.5099464589729905, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.49875311720698257, "pair_order_correct": 200, "pair_order_eligible": 401, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5616438356164384, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.19339622641509435, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 200, "eligible": 401, "ties": 1}}
71
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2621, "average_precision": 0.5145437196389815, "average_precision_answered_methods": 0.5145437196389815, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 860, "fp": 235, "tn": 1245, "tp": 282}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "security", "f1": 0.3399638336347197, "failed_methods": 1, "failure_counts": {"Context sizing failed": 1}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.15878378378378377, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.81717625, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 16343525, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.3714272920042276, "latency_p95_seconds": 4.737156999995932, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.5355871886120996, "pair_order_correct": 602, "pair_order_eligible": 1124, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5454545454545454, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.2469352014010508, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 602, "eligible": 1124, "ties": 1}}
72
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.5004935106105339, "average_precision_answered_methods": 0.5004935106105339, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 357, "fp": 40, "tn": 440, "tp": 41}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "security", "f1": 0.17118997912317327, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.08333333333333333, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.2778463, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 5556926, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.590956083033234, "latency_p95_seconds": 4.45469124999363, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.4648241206030151, "pair_order_correct": 185, "pair_order_eligible": 398, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5061728395061729, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.10301507537688442, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 185, "eligible": 398, "ties": 0}}
results.jsonl CHANGED
@@ -116,3 +116,9 @@
116
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4758656734035225, "average_precision_answered_methods": 0.4758656734035225, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 396, "fp": 24, "tn": 548, "tp": 28}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.11764705882352941, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04195804195804196, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.19667368, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 4916842, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7929241659585387, "latency_p95_seconds": 2.340836458024569, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5062344139650873, "pair_order_correct": 203, "pair_order_eligible": 401, "precision": 0.5384615384615384, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.0660377358490566, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 203, "eligible": 401, "ties": 5}}
117
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.49708136950251325, "average_precision_answered_methods": 0.49708136950251325, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 545, "fp": 603, "tn": 877, "tp": 597}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.5098206660973527, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.40743243243243243, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 6.13173568, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 153293392, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0774508339818567, "latency_p95_seconds": 2.837762249982916, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5284697508896797, "pair_order_correct": 594, "pair_order_eligible": 1124, "precision": 0.4975, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5227670753064798, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 594, "eligible": 1124, "ties": 15}}
118
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4793341864639895, "average_precision_answered_methods": 0.4793341864639895, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 260, "fp": 141, "tn": 339, "tp": 138}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.4076809453471196, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.29375, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 2.36226772, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 59056693, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.1423684580950066, "latency_p95_seconds": 2.9545628749765456, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.4946236559139785, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.34673366834170855, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 181, "eligible": 398, "ties": 4}}
 
 
 
 
 
 
 
116
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4758656734035225, "average_precision_answered_methods": 0.4758656734035225, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 396, "fp": 24, "tn": 548, "tp": 28}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.11764705882352941, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04195804195804196, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.19667368, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 4916842, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7929241659585387, "latency_p95_seconds": 2.340836458024569, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5062344139650873, "pair_order_correct": 203, "pair_order_eligible": 401, "precision": 0.5384615384615384, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.0660377358490566, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 203, "eligible": 401, "ties": 5}}
117
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.49708136950251325, "average_precision_answered_methods": 0.49708136950251325, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 545, "fp": 603, "tn": 877, "tp": 597}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.5098206660973527, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.40743243243243243, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 6.13173568, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 153293392, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0774508339818567, "latency_p95_seconds": 2.837762249982916, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5284697508896797, "pair_order_correct": 594, "pair_order_eligible": 1124, "precision": 0.4975, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5227670753064798, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 594, "eligible": 1124, "ties": 15}}
118
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4793341864639895, "average_precision_answered_methods": 0.4793341864639895, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 260, "fp": 141, "tn": 339, "tp": 138}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.4076809453471196, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.29375, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 2.36226772, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 59056693, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.1423684580950066, "latency_p95_seconds": 2.9545628749765456, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.4946236559139785, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.34673366834170855, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 181, "eligible": 398, "ties": 4}}
119
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.954599215445173, "average_precision_answered_methods": 0.954599215445173, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 61, "fp": 6, "tn": 208, "tp": 153}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "lint", "f1": 0.8203753351206434, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.028037383177570093, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.045379050000000004, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 907581, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8166153749916703, "latency_p95_seconds": 2.551551292068325, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.9672897196261683, "pair_order_correct": 207, "pair_order_eligible": 214, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.9622641509433962, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": null, "recall": 0.7149532710280374, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 207, "eligible": 214, "ties": 0}}
120
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9686294456382798, "average_precision_answered_methods": 0.9686294456382798, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 20, "fp": 3, "tn": 68, "tp": 51}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "lint", "f1": 0.816, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04225352112676056, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.015941200000000003, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 318824, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.152747832937166, "latency_p95_seconds": 2.732683040900156, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.9577464788732394, "pair_order_correct": 68, "pair_order_eligible": 71, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.9444444444444444, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": null, "recall": 0.7183098591549296, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 68, "eligible": 71, "ties": 0}}
121
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4426, "average_precision": 0.48487100893482865, "average_precision_answered_methods": 0.48487100893482865, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1577, "fp": 256, "tn": 2323, "tp": 284}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "bug", "f1": 0.23656809662640566, "failed_methods": 14, "failure_counts": {"Context sizing failed": 14}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.09926328034121752, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.56760645, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 11352129, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.812008082983084, "latency_p95_seconds": 2.3090446670539677, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.5095398428731762, "pair_order_correct": 908, "pair_order_eligible": 1782, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5259259259259259, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.15260612573885007, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 908, "eligible": 1782, "ties": 2}}
122
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 992, "average_precision": 0.5253123825884426, "average_precision_answered_methods": 0.5253123825884426, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 342, "fp": 64, "tn": 508, "tp": 82}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "bug", "f1": 0.28771929824561404, "failed_methods": 4, "failure_counts": {"Context sizing failed": 4}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.11188811188811189, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.13267365, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 2653473, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.776716374908574, "latency_p95_seconds": 2.5099464589729905, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.49875311720698257, "pair_order_correct": 200, "pair_order_eligible": 401, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5616438356164384, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.19339622641509435, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 200, "eligible": 401, "ties": 1}}
123
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2621, "average_precision": 0.5145437196389815, "average_precision_answered_methods": 0.5145437196389815, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 860, "fp": 235, "tn": 1245, "tp": 282}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "security", "f1": 0.3399638336347197, "failed_methods": 1, "failure_counts": {"Context sizing failed": 1}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.15878378378378377, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.81717625, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 16343525, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.3714272920042276, "latency_p95_seconds": 4.737156999995932, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.5355871886120996, "pair_order_correct": 602, "pair_order_eligible": 1124, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5454545454545454, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.2469352014010508, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 602, "eligible": 1124, "ties": 1}}
124
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.5004935106105339, "average_precision_answered_methods": 0.5004935106105339, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 357, "fp": 40, "tn": 440, "tp": 41}, "context_limit_basis": "SubQ server context-length validation: maximum model length 8192", "context_limit_tokens": 8192, "domain": "security", "f1": 0.17118997912317327, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.08333333333333333, "inference_cost_basis": "API-reported input tokens at SubQ published $0.05 per million input tokens", "inference_cost_usd": 0.2778463, "inference_endpoint": "https://api.subq.ai/v1/systemone", "inference_host": "SubQ", "input_tokens": 5556926, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.590956083033234, "latency_p95_seconds": 4.45469124999363, "model_id": "subq-snap", "model_revision": "subq-snap-preview", "pair_order": 0.4648241206030151, "pair_order_correct": 185, "pair_order_eligible": 398, "perch_revision": "4af67af46d76ac99398d61c7ad0a45441760d4dc", "perch_sizing_bundle_sha256": "17592731f69d88e2d1dda3f93b52eab2e3d2fc440d6b3bf0af6583e718cbd51a", "precision": 0.5061728395061729, "protocol_id": "subq-snap-perch-sized-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.10301507537688442, "refused_methods": 0, "requested_model": "subq-snap-preview", "run_id": "subq-snap-20261012", "sizing": {"adapter_sha256": "cef0475d20258b14a8820ce734cfcd422f397131b18ecf3fba5b40c5ec9d7b87", "request_budget": 6500, "state_budget": 4500}, "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 185, "eligible": 398, "ties": 0}}
subq.py ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Benchmark SubQ Snap with native decisions and Perch context sizing.
3
+
4
+ SubQ's server reports an 8,192-token maximum. Perch batches questions and reads
5
+ large methods in overlapping chunks, preserving every target-source byte.
6
+ Cost uses API-reported input tokens at the published $0.05 per million rate.
7
+ """
8
+ from collections import Counter
9
+ import hashlib
10
+ import json
11
+ import os
12
+ from pathlib import Path
13
+ import subprocess
14
+ import sys
15
+ import threading
16
+ import time
17
+
18
+ import httpx
19
+ import openrouter_decisions as runner
20
+ from gliner_decide import PerchSizer, SizeError
21
+
22
+ MODEL = 'subq-snap-preview'
23
+ STATE_BUDGET = 4500
24
+ REQUEST_BUDGET = 6500
25
+ _native_prediction = runner.prediction
26
+ _native_report = runner.report
27
+ _sizer = None
28
+ _sizer_lock = threading.Lock()
29
+ _source_revision = None
30
+
31
+
32
+ def prediction(pair, role, domain, pack, response, elapsed, model):
33
+ usage = response.get('usage') or {}
34
+ tokens = usage.get('input_tokens')
35
+ if isinstance(tokens, bool) or not isinstance(tokens, int) or tokens < 0:
36
+ raise runner.AnswerError('Missing input-token usage', response, elapsed)
37
+ response = dict(response, usage=dict(usage, cost=tokens * .05 / 1_000_000))
38
+ return _native_prediction(pair, role, domain, pack, response, elapsed, model)
39
+
40
+
41
+ def sizer():
42
+ global _sizer, _source_revision
43
+ with _sizer_lock:
44
+ if _sizer is None:
45
+ source = os.environ.get('PERCH_SOURCE')
46
+ if not source:
47
+ raise runner.AccountError('Set PERCH_SOURCE to a Perch checkout with npm dependencies installed')
48
+ source = Path(source)
49
+ _source_revision = subprocess.check_output(['git', '-C', str(source), 'rev-parse', 'HEAD'], text=True).strip()
50
+ _sizer = PerchSizer(source, Path(os.environ.get('SUBQ_SIZING_CACHE', '.subq-sizing')))
51
+ return _sizer
52
+
53
+
54
+ def request(key, state, checks, timeout, limiter):
55
+ if not hasattr(runner._local, 'client'):
56
+ runner._local.client = httpx.Client(headers={'Authorization': 'Bearer ' + key})
57
+ payload = {'model': MODEL, 'state': state,
58
+ 'questions': {c['name']: c['question'] for c in checks}}
59
+ for attempt in range(3):
60
+ limiter.wait()
61
+ response = runner._local.client.post(runner.API, json=payload, timeout=timeout)
62
+ if response.status_code >= 400:
63
+ try:
64
+ detail = response.json().get('detail') or response.json().get('error') or {}
65
+ message = detail.get('message', '') if isinstance(detail, dict) else str(detail)
66
+ code = detail.get('error_type', response.status_code) if isinstance(detail, dict) else response.status_code
67
+ except ValueError:
68
+ code, message = response.status_code, ''
69
+ error = f'SubQ HTTP {response.status_code}: {code}: {message}'
70
+ if response.status_code in (401, 402, 403, 404):
71
+ raise runner.AccountError(error)
72
+ if response.status_code in (400, 413, 422) and any(text in message.lower() for text in ('maximum model length', 'context length', 'context window', 'too many tokens')):
73
+ raise SizeError(error)
74
+ if response.status_code == 429 and attempt < 2:
75
+ try:
76
+ delay = float(response.headers.get('retry-after', 2 ** (attempt + 1)))
77
+ except ValueError:
78
+ delay = 2 ** (attempt + 1)
79
+ time.sleep(min(30, max(1, delay)))
80
+ continue
81
+ raise RuntimeError(error)
82
+ body = response.json()
83
+ if body.get('model') != MODEL:
84
+ raise runner.AccountError('SubQ returned a different model: ' + str(body.get('model')))
85
+ answers = body.get('answers')
86
+ if not isinstance(answers, dict) or set(answers) != {c['name'] for c in checks}:
87
+ raise runner.AnswerError('Missing or unexpected answers', body, 0)
88
+ for name, answer in answers.items():
89
+ if not isinstance(answer, dict) or answer.get('type') != 'noul':
90
+ raise runner.AnswerError('Unexpected answer type for ' + name, body, 0)
91
+ runner.core.probability(answer.get('noul'))
92
+ tokens = body.get('usage', {}).get('input_tokens')
93
+ if isinstance(tokens, bool) or not isinstance(tokens, int) or tokens < 0:
94
+ raise runner.AnswerError('Missing input-token usage', body, 0)
95
+ return body
96
+ raise AssertionError('unreachable')
97
+
98
+
99
+ def predict(key, pair, role, domain, pack, timeout, limiter, model):
100
+ checks = runner.questions_for(pair, domain, pack)
101
+ by_name = {c['name']: c for c in checks}
102
+ tokens, requests, discarded = 0, 0, 0
103
+ started, budget = time.monotonic(), STATE_BUDGET
104
+ try:
105
+ for attempt in range(9):
106
+ probabilities, scores, readings = {}, {}, []
107
+ try:
108
+ plans = sizer().plan(pair[role], checks, budget, REQUEST_BUDGET, len(checks))
109
+ def ask(plan, names):
110
+ nonlocal requests, tokens
111
+ requests += 1
112
+ try:
113
+ body = request(key, plan['state'], [by_name[n] for n in names], timeout, limiter)
114
+ except runner.AnswerError as exc:
115
+ charged = exc.usage.get('input_tokens', 0)
116
+ if isinstance(charged, int) and not isinstance(charged, bool) and charged >= 0:
117
+ tokens += charged
118
+ raise
119
+ except SizeError:
120
+ if len(names) == 1:
121
+ raise
122
+ middle = (len(names) + 1) // 2
123
+ ask(plan, names[:middle]); ask(plan, names[middle:])
124
+ return
125
+ tokens += body['usage']['input_tokens']
126
+ for name, answer in body['answers'].items():
127
+ probability = runner.core.probability(answer['noul'])
128
+ score = runner.core.raised_score(by_name[name], probability)
129
+ if name not in scores or score > scores[name]:
130
+ scores[name], probabilities[name] = score, probability
131
+ reading = {k: v for k, v in plan.items() if k not in ('state', 'question_names')}
132
+ reading.update(question_names=names, answers=body['answers'], usage=body['usage'],
133
+ state_sha256=hashlib.sha256(json.dumps(plan['state'], sort_keys=True).encode()).hexdigest())
134
+ readings.append(reading)
135
+ for plan in plans:
136
+ ask(plan, plan['question_names'])
137
+ break
138
+ except SizeError:
139
+ discarded += len(readings)
140
+ budget //= 2
141
+ if attempt == 8 or budget < 128:
142
+ raise
143
+ if set(probabilities) != set(by_name):
144
+ raise RuntimeError('Not every question received a score')
145
+ body = {'model': MODEL, 'answers': {n: {'type': 'noul', 'noul': p} for n, p in probabilities.items()},
146
+ 'usage': {'input_tokens': tokens, 'output_tokens': 0}}
147
+ row = prediction(pair, role, domain, pack, body, time.monotonic()-started, model)
148
+ row.update(readings=readings, api_requests=requests, discarded_readings=discarded,
149
+ final_state_budget=budget, perch_revision=_source_revision,
150
+ sizing={'state_budget': STATE_BUDGET, 'request_budget': REQUEST_BUDGET,
151
+ 'adapter_sha256': hashlib.sha256((runner.ROOT/'perch-sizing.mjs').read_bytes()).hexdigest()})
152
+ return row
153
+ except Exception as exc:
154
+ exc.usage = {'input_tokens': tokens, 'output_tokens': 0, 'cost': tokens * .05 / 1_000_000}
155
+ raise
156
+
157
+
158
+ def report(group, pack, model):
159
+ result = _native_report(group, pack, model)
160
+ # Aggregate failures without exposing private method names from sizing errors.
161
+ failures = Counter()
162
+ for row in group['failures'].values():
163
+ message = row.get('error', '')
164
+ if 'Check incomplete:' in message:
165
+ category = 'Context sizing failed'
166
+ elif message.startswith('SubQ HTTP '):
167
+ category = ':'.join(message.split(':')[:2]).strip()
168
+ elif 'timeout' in message.lower() or 'timed out' in message.lower():
169
+ category = 'Request timed out'
170
+ else:
171
+ category = 'Invalid or incomplete decision'
172
+ failures[category] += 1
173
+ result['failure_counts'] = dict(failures)
174
+ result.update(context_limit_basis='SubQ server context-length validation: maximum model length 8192',
175
+ sizing={'state_budget': STATE_BUDGET, 'request_budget': REQUEST_BUDGET},
176
+ perch_revision=next((row.get('perch_revision') for row in group['predictions'].values()
177
+ if row.get('perch_revision')), _source_revision))
178
+ return result
179
+
180
+
181
+ def configure():
182
+ runner.API = 'https://api.subq.ai/v1/systemone'
183
+ runner.API_LABEL = 'SubQ'
184
+ runner.KEY_ENV = 'SUBQ_API_KEY'
185
+ runner.COST_BASIS = 'API-reported input tokens at SubQ published $0.05 per million input tokens'
186
+ runner.HOST_PREFIX = ''
187
+ runner.CATALOG = {MODEL: ('subq-snap', MODEL, 'subq-snap-perch-sized-systemone-v1',
188
+ 'subq-snap-20261012', 'SubQ', 8192, .05)}
189
+ runner.MODELS = (MODEL,)
190
+ runner.prediction = prediction
191
+ runner.predict = predict
192
+ runner.report = report
193
+
194
+
195
+ if __name__ == '__main__':
196
+ configure()
197
+ if '--score-saved' not in sys.argv:
198
+ sizer()
199
+ try:
200
+ runner.main()
201
+ finally:
202
+ if _sizer is not None:
203
+ _sizer.close()
test_subq.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import unittest
2
+ from unittest.mock import Mock, patch
3
+ import httpx
4
+ import subq
5
+
6
+
7
+ class SubQTests(unittest.TestCase):
8
+ def setUp(self):
9
+ names = ('API API_LABEL KEY_ENV COST_BASIS HOST_PREFIX CATALOG MODELS MODEL_ID REVISION PROTOCOL RUN_ID HOST CONTEXT_LIMIT PRICE prediction predict report').split()
10
+ self.restore = patch.multiple(subq.runner, **{n: getattr(subq.runner, n) for n in names})
11
+ self.restore.start(); self.addCleanup(self.restore.stop)
12
+ subq.configure(); subq.runner.select_model(subq.MODEL)
13
+ self.pack = subq.runner.core.load_pack(subq.runner.ROOT/'question-pack.json')
14
+ self.pair = {'pair_id': 'example', 'language': 'python',
15
+ 'rule': {'ensure': 'Reject zero before division.'},
16
+ 'before': {'state': {'method': {'source': 'return a / b'}}}}
17
+
18
+ def plan(self, names):
19
+ return {'state': self.pair['before']['state'], 'question_names': names,
20
+ 'covers': {'start_byte': 0, 'end_byte': 12}}
21
+
22
+ def answer(self, probability, tokens=100):
23
+ return {'model': subq.MODEL, 'answers': {'semantic': {'type': 'noul', 'noul': probability}},
24
+ 'usage': {'input_tokens': tokens, 'output_tokens': 0}}
25
+
26
+ def test_chunk_scores_preserve_polarity_and_sum_billed_tokens(self):
27
+ sizer = Mock(); sizer.plan.return_value = [self.plan(['semantic']), self.plan(['semantic'])]
28
+ with patch.object(subq, 'sizer', return_value=sizer), patch.object(subq, 'request', side_effect=[self.answer(.9), self.answer(.2, 200)]) as request:
29
+ row = subq.predict('key', self.pair, 'before', 'lint', self.pack, 30, Mock(), subq.MODEL)
30
+ self.assertEqual(request.call_count, 2)
31
+ self.assertAlmostEqual(row['score'], .8)
32
+ self.assertTrue(row['alert'])
33
+ self.assertEqual(row['usage']['input_tokens'], 300)
34
+ self.assertAlmostEqual(row['usage']['cost'], .000015)
35
+ self.assertEqual(len(row['readings']), 2)
36
+
37
+ def test_timeout_stays_failed_and_retains_prior_reading_cost(self):
38
+ sizer = Mock(); sizer.plan.return_value = [self.plan(['semantic']), self.plan(['semantic'])]
39
+ with patch.object(subq, 'sizer', return_value=sizer), patch.object(subq, 'request', side_effect=[self.answer(.9, 300), httpx.ReadTimeout('timeout')]) as request:
40
+ with self.assertRaises(httpx.ReadTimeout) as raised:
41
+ subq.predict('key', self.pair, 'before', 'lint', self.pack, 30, Mock(), subq.MODEL)
42
+ self.assertEqual(request.call_count, 2)
43
+ self.assertEqual(raised.exception.usage['input_tokens'], 300)
44
+ self.assertAlmostEqual(raised.exception.usage['cost'], .000015)
45
+
46
+ def test_size_rejection_reduces_state_budget(self):
47
+ sizer = Mock(); sizer.plan.return_value = [self.plan(['semantic'])]
48
+ with patch.object(subq, 'sizer', return_value=sizer), patch.object(subq, 'request', side_effect=[subq.SizeError('maximum model length'), self.answer(.1)]) as request:
49
+ row = subq.predict('key', self.pair, 'before', 'lint', self.pack, 30, Mock(), subq.MODEL)
50
+ self.assertEqual(request.call_count, 2)
51
+ self.assertEqual(row['final_state_budget'], subq.STATE_BUDGET//2)
52
+ self.assertEqual(sizer.plan.call_args.args[2], subq.STATE_BUDGET//2)
53
+ self.assertTrue(row['alert'])
54
+
55
+
56
+ if __name__ == '__main__':
57
+ unittest.main()
tradeoff.py CHANGED
@@ -35,6 +35,7 @@ NAMES = {
35
  "microsoft-decision-1": ("Microsoft-Decision-1", "https://openrouter.ai/microsoft/microsoft-decision-1"),
36
  "mercury-decide": ("Mercury Decide", "https://openrouter.ai/inception/mercury-decide"),
37
  "openai-decisions": ("GPT-6 Luna Decisions", "https://developers.openai.com/api/docs/guides/decisions"),
 
38
  }
39
  # Shapes distinguish models independently of color, including in grayscale.
40
  COLORS = {
@@ -42,14 +43,14 @@ COLORS = {
42
  "diffusiongemma": "#ff9234", "span01": "#00c49a", "clm": "#a0a8b5",
43
  "semif": "#ef5b5b", "gliner25-decide": "#ffe05b",
44
  "microsoft-decision-1": "#f5f5f5", "mercury-decide": "#6e8fff",
45
- "openai-decisions": "#b8e186",
46
  }
47
  MARKERS = {
48
  "jev": "circle", "typellm": "diamond", "liquid-d1": "triangle",
49
  "diffusiongemma": "square", "span01": "triangle-down", "clm": "hexagon",
50
  "semif": "cross", "gliner25-decide": "pentagon",
51
  "microsoft-decision-1": "plus", "mercury-decide": "star",
52
- "openai-decisions": "ring",
53
  }
54
  ORDER = tuple(NAMES)
55
  OLD_PACK_SHA = "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d"
@@ -271,6 +272,9 @@ def marker(model: str, x: float, y: float, size: float = 7,
271
  element = f'<circle r="{size-1}" fill="#101318" stroke="{color}" stroke-width="3"/>'
272
  elif shape == "square":
273
  element = f'<rect x="{-size}" y="{-size}" width="{size*2}" height="{size*2}" {style}/>'
 
 
 
274
  elif shape in ("plus", "cross"):
275
  thickness = size * .35
276
  path = f'M {-thickness} {-size} H {thickness} V {-thickness} H {size} V {thickness} H {thickness} V {size} H {-thickness} V {thickness} H {-size} V {-thickness} H {-thickness} Z'
 
35
  "microsoft-decision-1": ("Microsoft-Decision-1", "https://openrouter.ai/microsoft/microsoft-decision-1"),
36
  "mercury-decide": ("Mercury Decide", "https://openrouter.ai/inception/mercury-decide"),
37
  "openai-decisions": ("GPT-6 Luna Decisions", "https://developers.openai.com/api/docs/guides/decisions"),
38
+ "subq-snap": ("SubQ Snap Preview", "https://docs.subq.ai/using-the-api/models/"),
39
  }
40
  # Shapes distinguish models independently of color, including in grayscale.
41
  COLORS = {
 
43
  "diffusiongemma": "#ff9234", "span01": "#00c49a", "clm": "#a0a8b5",
44
  "semif": "#ef5b5b", "gliner25-decide": "#ffe05b",
45
  "microsoft-decision-1": "#f5f5f5", "mercury-decide": "#6e8fff",
46
+ "openai-decisions": "#b8e186", "subq-snap": "#ffd5bf",
47
  }
48
  MARKERS = {
49
  "jev": "circle", "typellm": "diamond", "liquid-d1": "triangle",
50
  "diffusiongemma": "square", "span01": "triangle-down", "clm": "hexagon",
51
  "semif": "cross", "gliner25-decide": "pentagon",
52
  "microsoft-decision-1": "plus", "mercury-decide": "star",
53
+ "openai-decisions": "ring", "subq-snap": "hourglass",
54
  }
55
  ORDER = tuple(NAMES)
56
  OLD_PACK_SHA = "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d"
 
272
  element = f'<circle r="{size-1}" fill="#101318" stroke="{color}" stroke-width="3"/>'
273
  elif shape == "square":
274
  element = f'<rect x="{-size}" y="{-size}" width="{size*2}" height="{size*2}" {style}/>'
275
+ elif shape == "hourglass":
276
+ points = f'{-size},{-size} {size},{-size} 0,0 {size},{size} {-size},{size} 0,0'
277
+ element = f'<polygon points="{points}" {style}/>'
278
  elif shape in ("plus", "cross"):
279
  thickness = size * .35
280
  path = f'M {-thickness} {-size} H {thickness} V {-thickness} H {size} V {thickness} H {thickness} V {size} H {-thickness} V {thickness} H {-size} V {-thickness} H {-thickness} Z'