modelspec-dev 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. api/__init__.py +0 -0
  2. api/class_fit.py +334 -0
  3. api/classes.py +557 -0
  4. api/ranking/__init__.py +12 -0
  5. api/ranking/engine.py +1943 -0
  6. cli/__init__.py +0 -0
  7. cli/modelspec/__init__.py +0 -0
  8. cli/modelspec/cli.py +1819 -0
  9. cli/modelspec/commands/__init__.py +0 -0
  10. cli/modelspec/decide_cmd.py +333 -0
  11. cli/modelspec/offline.py +623 -0
  12. cli/modelspec/snapshot.py +698 -0
  13. cli/modelspec/snapshot_build_cmd.py +49 -0
  14. cli/modelspec/verify_cmd.py +125 -0
  15. cli/modelspec/vocab_cmd.py +204 -0
  16. cli/modelspec/vocabulary_cache.py +54 -0
  17. decision/__init__.py +13 -0
  18. decision/capability.py +872 -0
  19. decision/computed.py +125 -0
  20. decision/contract.py +1575 -0
  21. decision/engine.py +238 -0
  22. decision/excluded.py +34 -0
  23. decision/explain.py +908 -0
  24. decision/filter.py +796 -0
  25. decision/model.py +438 -0
  26. decision/normalise.py +604 -0
  27. decision/optimise.py +320 -0
  28. decision/registry.py +717 -0
  29. decision/relax.py +132 -0
  30. decision/resolve.py +111 -0
  31. decision/schema.py +21 -0
  32. decision/snapshot.py +1483 -0
  33. decision/sources.py +544 -0
  34. decision/templates.py +134 -0
  35. decision/verify.py +1745 -0
  36. decision/vocabulary.py +433 -0
  37. modelspec_dev-0.1.0.dist-info/METADATA +101 -0
  38. modelspec_dev-0.1.0.dist-info/RECORD +63 -0
  39. modelspec_dev-0.1.0.dist-info/WHEEL +4 -0
  40. modelspec_dev-0.1.0.dist-info/entry_points.txt +2 -0
  41. modelspec_dev-0.1.0.dist-info/licenses/LICENSE +43 -0
  42. modelspec_dev-0.1.0.dist-info/licenses/LICENSE-DATA +428 -0
  43. pipeline/__init__.py +0 -0
  44. pipeline/class_export.py +172 -0
  45. pipeline/hardware.py +434 -0
  46. pipeline/hosts.py +247 -0
  47. pipeline/load.py +224 -0
  48. pipeline/ranking.py +551 -0
  49. registry/domains.yaml +130 -0
  50. registry/facets.yaml +888 -0
  51. registry/harnesses.yaml +79 -0
  52. registry/providers.yaml +354 -0
  53. registry/sources.yaml +3059 -0
  54. registry/templates.yaml +166 -0
  55. schema/__init__.py +0 -0
  56. schema/applicability.py +147 -0
  57. schema/benchmark.py +175 -0
  58. schema/benchmark_eligibility.py +304 -0
  59. schema/card.py +1463 -0
  60. schema/enrichment.py +162 -0
  61. schema/enums.py +327 -0
  62. schema/graph.py +406 -0
  63. schema/suppliers.py +72 -0
@@ -0,0 +1,79 @@
1
+ # The harness registry (MODEL-133; design §4.1 and §12.4).
2
+ #
3
+ # A harness is the agent scaffold a model runs inside. Evidence and outcome
4
+ # records are kept per harness version, because the same model performs
5
+ # differently in different harnesses.
6
+ #
7
+ # Canonical IDs are `name@major.minor`, for example `claude-code@2.1`. A patch
8
+ # or build suffix resolves to its registered major.minor (`claude-code@2.1.282`
9
+ # is `claude-code@2.1`). Anything that does not resolve to a registered version
10
+ # (an unknown name, an unregistered version, free text) is reported as the
11
+ # literal `unregistered`, never passed through as free text. New harnesses and
12
+ # versions are added here by a registry PR. Loader: decision/registry.py.
13
+ #
14
+ # Entry fields
15
+ # id kebab-case harness name, the part before `@`
16
+ # name, url as the harness names itself; its home page, or null with a
17
+ # `url_note` when there is no public one
18
+ # versions registered `id@major.minor` versions, each with the source the
19
+ # version was read from and the date it was read
20
+ #
21
+ # Versions seeded 2026-09-24 are the current release line on that date. Older
22
+ # lines are added when evidence or outcome records need them.
23
+
24
+ schema_version: 1
25
+
26
+ unregistered: unregistered
27
+
28
+ harnesses:
29
+ - id: claude-code
30
+ name: Claude Code
31
+ url: https://github.com/anthropics/claude-code
32
+ versions:
33
+ - id: claude-code@2.1
34
+ source: https://registry.npmjs.org/@anthropic-ai/claude-code/latest
35
+ read: "2026-09-24"
36
+ note: npm latest was 2.1.282.
37
+ - id: codex-cli
38
+ name: Codex CLI
39
+ url: https://github.com/openai/codex
40
+ versions:
41
+ - id: codex-cli@0.156
42
+ source: https://registry.npmjs.org/@openai/codex/latest
43
+ read: "2026-09-24"
44
+ note: npm latest was 0.156.1.
45
+ - id: aider
46
+ name: Aider
47
+ url: https://aider.chat/
48
+ versions:
49
+ - id: aider@0.86
50
+ source: https://pypi.org/pypi/aider-chat/json
51
+ read: "2026-09-24"
52
+ note: PyPI aider-chat latest was 0.86.2.
53
+ - id: openhands
54
+ name: OpenHands
55
+ url: https://github.com/All-Hands-AI/OpenHands
56
+ versions:
57
+ - id: openhands@1.11
58
+ source: https://pypi.org/pypi/openhands-ai/json
59
+ read: "2026-09-24"
60
+ note: PyPI openhands-ai latest was 1.11.0.
61
+ - id: cursor-agent
62
+ name: Cursor CLI (cursor-agent)
63
+ url: https://cursor.com/cli
64
+ versions:
65
+ - id: cursor-agent@2026.09
66
+ source: https://cursor.com/install
67
+ read: "2026-09-24"
68
+ note: >-
69
+ Cursor versions its CLI by date (the installer named
70
+ 2026.09.23-86fc751), so major.minor is year.month.
71
+ - id: dpf-native
72
+ name: DPF native harness
73
+ url: null
74
+ url_note: DPF's own harness, the reference user's (design §2). It has no public URL yet.
75
+ versions:
76
+ - id: dpf-native@1.0
77
+ source: null
78
+ read: "2026-09-24"
79
+ note: Named by the design (§4.1) as the first DPF harness version.
@@ -0,0 +1,354 @@
1
+ # The provider registry (MODEL-133; design §4.1).
2
+ #
3
+ # A provider is an organisation that serves models for use through an API or a
4
+ # cloud. It replaces the fixed platform fields on `Availability` in
5
+ # `schema/card.py`; `v1_availability_field` names the field each entry takes
6
+ # over, so the offerings migration (MODEL-134) can be checked, not guessed.
7
+ # App-only platforms (consumer chat apps, IDEs, aggregating chat apps) are not
8
+ # providers of offerings and are kept out (design §4.1, "Consumer chat apps are
9
+ # out of scope for now").
10
+ #
11
+ # Adding a provider is an entry here. Loader: decision/registry.py.
12
+ #
13
+ # Entry fields
14
+ # id kebab-case, unique; used in offering paths
15
+ # (offerings/<provider>/<lab>/<model>.yaml)
16
+ # name, url as the provider names itself; its home page
17
+ # kind lab_api | cloud | inference | aggregator
18
+ # v1_availability_field optional: the `Availability` field this replaces
19
+ # jurisdiction `unknown`, or a sourced fact:
20
+ # value ISO 3166-1 alpha-2 country of the legal entity that contracts
21
+ # with a customer in the United States under the provider's
22
+ # standard terms (terms that name regional entities are read
23
+ # for a United States customer)
24
+ # entity that entity, as the terms name it
25
+ # shown_by address | incorporation | governing_law: what in the terms
26
+ # establishes the country
27
+ # basis service_terms | website_terms: website terms govern the site,
28
+ # not necessarily the paid service, and are marked as such
29
+ # source the URL read; read the date it was read (YYYY-MM-DD)
30
+ # note optional
31
+ # attestations provider-level attestations, each `unknown` or
32
+ # {value, source, read}. Provider-level only: whether an
33
+ # attestation covers an offering is the offering's
34
+ # `offering.attestation.*` fact. Documented, never
35
+ # certified.
36
+ #
37
+ # Every attestation is `unknown` at seeding. The trust pages that list them
38
+ # need a rendered browser, and a null beats a guess; they are collected and
39
+ # verified by the two-key process, not by this seed.
40
+
41
+ schema_version: 1
42
+
43
+ providers:
44
+ # ── Labs' own APIs ────────────────────────────────────────────────────────
45
+ - id: openai
46
+ name: OpenAI API
47
+ url: https://platform.openai.com/
48
+ kind: lab_api
49
+ jurisdiction:
50
+ value: US
51
+ entity: OpenAI OpCo, LLC
52
+ shown_by: address
53
+ basis: service_terms
54
+ source: https://openai.com/policies/services-agreement/
55
+ read: "2026-09-24"
56
+ note: The agreement also names OpenAI Ireland Ltd as a contracting entity.
57
+ attestations: {soc2: unknown, iso_27001: unknown}
58
+ - id: anthropic
59
+ name: Anthropic API
60
+ url: https://www.anthropic.com/api
61
+ kind: lab_api
62
+ jurisdiction:
63
+ value: US
64
+ entity: Anthropic, PBC
65
+ shown_by: governing_law
66
+ basis: service_terms
67
+ source: https://www.anthropic.com/legal/commercial-terms
68
+ read: "2026-09-24"
69
+ note: Anthropic Ireland, Limited contracts with customers in the EEA, Switzerland or UK.
70
+ attestations: {soc2: unknown, iso_27001: unknown}
71
+ - id: google-gemini-api
72
+ name: Gemini API (Google AI Studio)
73
+ url: https://ai.google.dev/
74
+ kind: lab_api
75
+ jurisdiction:
76
+ value: US
77
+ entity: Google LLC
78
+ shown_by: address
79
+ basis: service_terms
80
+ source: https://developers.google.com/terms
81
+ read: "2026-09-24"
82
+ note: >-
83
+ The Gemini API Additional Terms (https://ai.google.dev/gemini-api/terms)
84
+ incorporate the Google APIs Terms of Service, which name Google LLC.
85
+ attestations: {soc2: unknown, iso_27001: unknown}
86
+ - id: xai
87
+ name: xAI API
88
+ url: https://x.ai/api
89
+ kind: lab_api
90
+ v1_availability_field: grok_xai
91
+ jurisdiction: unknown
92
+ attestations: {soc2: unknown, iso_27001: unknown}
93
+ - id: mistral
94
+ name: Mistral AI La Plateforme
95
+ url: https://console.mistral.ai/
96
+ kind: lab_api
97
+ v1_availability_field: mistral_plateforme
98
+ jurisdiction:
99
+ value: FR
100
+ entity: Mistral AI
101
+ shown_by: incorporation
102
+ basis: service_terms
103
+ source: https://legal.mistral.ai/terms/commercial-terms-of-service
104
+ read: "2026-09-24"
105
+ attestations: {soc2: unknown, iso_27001: unknown}
106
+ - id: cohere
107
+ name: Cohere API
108
+ url: https://cohere.com/
109
+ kind: lab_api
110
+ v1_availability_field: cohere
111
+ jurisdiction:
112
+ value: CA
113
+ entity: Cohere Inc.
114
+ shown_by: governing_law
115
+ basis: website_terms
116
+ source: https://cohere.com/terms-of-use
117
+ read: "2026-09-24"
118
+ attestations: {soc2: unknown, iso_27001: unknown}
119
+ - id: deepseek
120
+ name: DeepSeek Open Platform
121
+ url: https://platform.deepseek.com/
122
+ kind: lab_api
123
+ v1_availability_field: deepseek
124
+ jurisdiction:
125
+ value: CN
126
+ entity: Hangzhou DeepSeek Artificial Intelligence Co., Ltd.
127
+ shown_by: address
128
+ basis: service_terms
129
+ source: https://cdn.deepseek.com/policies/en-US/deepseek-open-platform-terms-of-service.html
130
+ read: "2026-09-24"
131
+ attestations: {soc2: unknown, iso_27001: unknown}
132
+ - id: alibaba-model-studio
133
+ name: Alibaba Cloud Model Studio
134
+ url: https://www.alibabacloud.com/en/product/modelstudio
135
+ kind: lab_api
136
+ v1_availability_field: qwen_alibaba
137
+ jurisdiction: unknown
138
+ attestations: {soc2: unknown, iso_27001: unknown}
139
+ - id: moonshot
140
+ name: Kimi Open Platform (Moonshot AI)
141
+ url: https://platform.moonshot.ai/
142
+ kind: lab_api
143
+ v1_availability_field: moonshot_kimi
144
+ jurisdiction:
145
+ value: SG
146
+ entity: Moonshot AI PTE. LTD.
147
+ shown_by: governing_law
148
+ basis: service_terms
149
+ source: https://platform.moonshot.ai/docs/agreement/modeluse
150
+ read: "2026-09-24"
151
+ attestations: {soc2: unknown, iso_27001: unknown}
152
+ - id: zai
153
+ name: Z.ai API
154
+ url: https://z.ai/
155
+ kind: lab_api
156
+ v1_availability_field: zhipu_glm
157
+ jurisdiction:
158
+ value: SG
159
+ entity: JINGSHENG HENGXING TECHNOLOGY PTE.LTD
160
+ shown_by: governing_law
161
+ basis: service_terms
162
+ source: https://docs.z.ai/legal-agreement/terms-of-use
163
+ read: "2026-09-24"
164
+ attestations: {soc2: unknown, iso_27001: unknown}
165
+ - id: minimax
166
+ name: MiniMax API Platform
167
+ url: https://www.minimax.io/platform
168
+ kind: lab_api
169
+ v1_availability_field: minimax
170
+ jurisdiction: unknown
171
+ attestations: {soc2: unknown, iso_27001: unknown}
172
+ - id: ai21
173
+ name: AI21 Studio
174
+ url: https://www.ai21.com/
175
+ kind: lab_api
176
+ v1_availability_field: ai21_labs
177
+ jurisdiction:
178
+ value: IL
179
+ entity: AI21 Labs Ltd.
180
+ shown_by: governing_law
181
+ basis: website_terms
182
+ source: https://www.ai21.com/terms-of-use/
183
+ read: "2026-09-24"
184
+ attestations: {soc2: unknown, iso_27001: unknown}
185
+ - id: meta-model-api
186
+ name: Meta Model API
187
+ url: https://ai.developer.meta.com/
188
+ kind: lab_api
189
+ jurisdiction: unknown
190
+ attestations: {soc2: unknown, iso_27001: unknown}
191
+ - id: typesafe
192
+ name: TypeSafe API
193
+ url: https://typesafe.ai/
194
+ kind: lab_api
195
+ jurisdiction: unknown
196
+ attestations: {soc2: unknown, iso_27001: unknown}
197
+
198
+ # ── Clouds ────────────────────────────────────────────────────────────────
199
+ - id: aws-bedrock
200
+ name: Amazon Bedrock
201
+ url: https://aws.amazon.com/bedrock/
202
+ kind: cloud
203
+ v1_availability_field: aws_bedrock
204
+ jurisdiction:
205
+ value: US
206
+ entity: Amazon Web Services, Inc.
207
+ shown_by: address
208
+ basis: service_terms
209
+ source: https://aws.amazon.com/agreement/
210
+ read: "2026-09-24"
211
+ note: The AWS Contracting Party varies by account country; Amazon Web Services, Inc. covers any country not listed, including the United States.
212
+ attestations: {soc2: unknown, iso_27001: unknown}
213
+ - id: google-vertex-ai
214
+ name: Vertex AI (Google Cloud)
215
+ url: https://cloud.google.com/vertex-ai
216
+ kind: cloud
217
+ v1_availability_field: google_vertex_ai
218
+ jurisdiction:
219
+ value: US
220
+ entity: Google LLC
221
+ shown_by: address
222
+ basis: service_terms
223
+ source: https://cloud.google.com/terms/google-entity
224
+ read: "2026-09-24"
225
+ note: The Google Cloud contracting entity varies by billing address; Google LLC for the United States.
226
+ attestations: {soc2: unknown, iso_27001: unknown}
227
+ - id: azure-ai-foundry
228
+ name: Azure AI Foundry
229
+ url: https://ai.azure.com/
230
+ kind: cloud
231
+ v1_availability_field: azure_ai_foundry
232
+ jurisdiction: unknown
233
+ attestations: {soc2: unknown, iso_27001: unknown}
234
+
235
+ # ── Inference providers ───────────────────────────────────────────────────
236
+ - id: groq
237
+ name: GroqCloud
238
+ url: https://groq.com/
239
+ kind: inference
240
+ v1_availability_field: groq
241
+ jurisdiction:
242
+ value: US
243
+ entity: Groq LLC
244
+ shown_by: address
245
+ basis: website_terms
246
+ source: https://groq.com/terms-of-use
247
+ read: "2026-09-24"
248
+ attestations: {soc2: unknown, iso_27001: unknown}
249
+ - id: together-ai
250
+ name: Together AI
251
+ url: https://www.together.ai/
252
+ kind: inference
253
+ v1_availability_field: together_ai
254
+ jurisdiction:
255
+ value: US
256
+ entity: Together Computer, Inc.
257
+ shown_by: incorporation
258
+ basis: website_terms
259
+ source: https://www.together.ai/terms-of-service
260
+ read: "2026-09-24"
261
+ attestations: {soc2: unknown, iso_27001: unknown}
262
+ - id: fireworks-ai
263
+ name: Fireworks AI
264
+ url: https://fireworks.ai/
265
+ kind: inference
266
+ v1_availability_field: fireworks_ai
267
+ jurisdiction:
268
+ value: US
269
+ entity: Fireworks.ai, Inc.
270
+ shown_by: address
271
+ basis: service_terms
272
+ source: https://fireworks.ai/terms-of-service
273
+ read: "2026-09-24"
274
+ attestations: {soc2: unknown, iso_27001: unknown}
275
+ - id: deepinfra
276
+ name: DeepInfra
277
+ url: https://deepinfra.com/
278
+ kind: inference
279
+ v1_availability_field: deepinfra
280
+ jurisdiction:
281
+ value: US
282
+ entity: Deep Infra Inc.
283
+ shown_by: incorporation
284
+ basis: service_terms
285
+ source: https://deepinfra.com/terms
286
+ read: "2026-09-24"
287
+ attestations: {soc2: unknown, iso_27001: unknown}
288
+ - id: cerebras
289
+ name: Cerebras Inference
290
+ url: https://www.cerebras.ai/
291
+ kind: inference
292
+ v1_availability_field: cerebras
293
+ jurisdiction:
294
+ value: US
295
+ entity: Cerebras Systems Inc.
296
+ shown_by: address
297
+ basis: website_terms
298
+ source: https://www.cerebras.ai/terms-of-service
299
+ read: "2026-09-24"
300
+ attestations: {soc2: unknown, iso_27001: unknown}
301
+ - id: sambanova
302
+ name: SambaNova Cloud
303
+ url: https://sambanova.ai/
304
+ kind: inference
305
+ v1_availability_field: sambanova
306
+ jurisdiction:
307
+ value: US
308
+ entity: SambaNova Systems, Inc.
309
+ shown_by: address
310
+ basis: website_terms
311
+ source: https://sambanova.ai/terms-and-conditions
312
+ read: "2026-09-24"
313
+ attestations: {soc2: unknown, iso_27001: unknown}
314
+ - id: nvidia-nim
315
+ name: NVIDIA NIM (build.nvidia.com)
316
+ url: https://build.nvidia.com/
317
+ kind: inference
318
+ v1_availability_field: nvidia_nim
319
+ jurisdiction:
320
+ value: US
321
+ entity: NVIDIA Corporation
322
+ shown_by: address
323
+ basis: website_terms
324
+ source: https://www.nvidia.com/en-us/about-nvidia/terms-of-service/
325
+ read: "2026-09-24"
326
+ attestations: {soc2: unknown, iso_27001: unknown}
327
+ - id: replicate
328
+ name: Replicate
329
+ url: https://replicate.com/
330
+ kind: inference
331
+ v1_availability_field: replicate
332
+ jurisdiction:
333
+ value: US
334
+ entity: Replicate, LLC
335
+ shown_by: address
336
+ basis: service_terms
337
+ source: https://replicate.com/terms
338
+ read: "2026-09-24"
339
+ attestations: {soc2: unknown, iso_27001: unknown}
340
+
341
+ # ── Aggregators ───────────────────────────────────────────────────────────
342
+ - id: openrouter
343
+ name: OpenRouter
344
+ url: https://openrouter.ai/
345
+ kind: aggregator
346
+ v1_availability_field: openrouter
347
+ jurisdiction:
348
+ value: US
349
+ entity: OpenRouter, Inc.
350
+ shown_by: address
351
+ basis: service_terms
352
+ source: https://openrouter.ai/terms
353
+ read: "2026-09-24"
354
+ attestations: {soc2: unknown, iso_27001: unknown}