@wrongstack/cli 0.9.19 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # Curated model-catalog overlay (`providers.json`)
2
+
3
+ `providers.json` is a **curated override layer** that WrongStack deep-merges **on top of**
4
+ the live `https://models.dev/api.json` catalog. models.dev stays the base/primary source; this
5
+ file lets us **add** providers/models it doesn't carry and **fix** fields it gets wrong (a missing
6
+ model, a stale context limit, etc.) without waiting for an upstream fix or a release.
7
+
8
+ At runtime the registry resolves:
9
+
10
+ ```
11
+ merged = mergeModelsPayload(modelsDev, providers.json) // overlay wins
12
+ ```
13
+
14
+ It is loaded from (first non-empty wins):
15
+ 1. this file fetched from our GitHub raw URL (so it can refresh between releases), then
16
+ 2. this file bundled in the installed package (offline floor).
17
+
18
+ If models.dev is completely unreachable and there's no cache, a **non-empty** overlay still drives
19
+ the catalog on its own. An empty `{}` overlay is a safe no-op.
20
+
21
+ ## Shape
22
+
23
+ Same schema as `models.dev/api.json` — a map keyed by provider id. You only include the fields you
24
+ want to add or override; everything else falls through to the base. (JSON has no comments, hence
25
+ this README.)
26
+
27
+ ```jsonc
28
+ {
29
+ // Override just one field on an existing model — here, fix a context window.
30
+ "deepseek": {
31
+ "models": {
32
+ "deepseek-v4-pro": { "limit": { "context": 128000 } }
33
+ }
34
+ },
35
+
36
+ // Add a provider models.dev doesn't list at all.
37
+ "myco": {
38
+ "id": "myco",
39
+ "name": "My Co",
40
+ "npm": "@ai-sdk/openai-compatible", // determines the wire family
41
+ "api": "https://api.myco.example/v1",
42
+ "env": ["MYCO_API_KEY"],
43
+ "models": {
44
+ "myco-large": {
45
+ "id": "myco-large",
46
+ "name": "MyCo Large",
47
+ "tool_call": true,
48
+ "modalities": { "input": ["text"], "output": ["text"] },
49
+ "limit": { "context": 200000, "output": 16000 },
50
+ "cost": { "input": 0.5, "output": 1.5 }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ ## Merge rules
58
+
59
+ - Provider in both → overlay scalar fields (`name`, `npm`, `api`, `env`, `doc`) override the base;
60
+ `models` are merged by id.
61
+ - Model in both → `{ ...baseModel, ...overlayModel }`, with the nested `limit` / `cost` /
62
+ `modalities` objects merged one level deeper — so `{"limit":{"context":…}}` overrides only the
63
+ context and keeps the base's `limit.output`.
64
+ - Anything only in the overlay is added.
65
+
66
+ ## Editing / refreshing
67
+
68
+ Use the helper to seed and sanity-check entries against upstream:
69
+
70
+ ```bash
71
+ pnpm run sync:models -- --extract deepseek:deepseek-v4-pro # print a paste-ready overlay snippet
72
+ pnpm run sync:models -- --diff # what we override vs upstream + drift
73
+ ```
74
+
75
+ Then edit `providers.json` and commit. Keep it **small and curated** — it is an override layer,
76
+ not a mirror of models.dev. Once models.dev catches up, drop the now-redundant override (`--diff`
77
+ flags those).
@@ -0,0 +1 @@
1
+ {}