@bilalimamoglu/sift 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -1
- package/dist/cli.js +888 -114
- package/dist/index.d.ts +11 -2
- package/dist/index.js +533 -44
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,6 +49,13 @@ That writes a machine-wide config to:
|
|
|
49
49
|
|
|
50
50
|
After that, any terminal on the machine can use `sift`. A repo-local config can still override it later.
|
|
51
51
|
|
|
52
|
+
To switch between saved native providers without editing YAML:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
sift config use openai
|
|
56
|
+
sift config use openrouter
|
|
57
|
+
```
|
|
58
|
+
|
|
52
59
|
If you prefer manual setup, this is the smallest useful OpenAI setup:
|
|
53
60
|
|
|
54
61
|
```bash
|
|
@@ -58,6 +65,13 @@ export SIFT_MODEL=gpt-5-nano
|
|
|
58
65
|
export OPENAI_API_KEY=your_openai_api_key
|
|
59
66
|
```
|
|
60
67
|
|
|
68
|
+
If you prefer manual setup, this is the smallest useful OpenRouter setup:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
export SIFT_PROVIDER=openrouter
|
|
72
|
+
export OPENROUTER_API_KEY=your_openrouter_api_key
|
|
73
|
+
```
|
|
74
|
+
|
|
61
75
|
Then check it:
|
|
62
76
|
|
|
63
77
|
```bash
|
|
@@ -130,6 +144,8 @@ sift exec --preset test-status -- <test command>
|
|
|
130
144
|
|
|
131
145
|
If `standard` already names the main failure buckets, counts, and hints, stop there and read code.
|
|
132
146
|
|
|
147
|
+
If `standard` still includes an unknown bucket or ends with `Decision: zoom`, do one deeper sift pass before you fall back to raw traceback.
|
|
148
|
+
|
|
133
149
|
Then use this order:
|
|
134
150
|
1. `sift exec --preset test-status -- <test command>`
|
|
135
151
|
2. `sift rerun`
|
|
@@ -148,6 +164,8 @@ Most of the time, you do not need JSON. Start with text first.
|
|
|
148
164
|
|
|
149
165
|
If `standard` already shows bucket-level root cause, `Anchor`, and `Fix`, do not re-verify the same bucket with raw pytest. At most do one targeted source read before you edit.
|
|
150
166
|
|
|
167
|
+
If diagnose output still contains an unknown bucket or `Decision: zoom`, take one sift zoom step before raw traceback.
|
|
168
|
+
|
|
151
169
|
Use diagnose JSON only when automation or machine branching really needs it:
|
|
152
170
|
|
|
153
171
|
```bash
|
|
@@ -378,6 +396,7 @@ Useful commands:
|
|
|
378
396
|
|
|
379
397
|
```bash
|
|
380
398
|
sift config setup
|
|
399
|
+
sift config use openrouter
|
|
381
400
|
sift config init
|
|
382
401
|
sift config show
|
|
383
402
|
sift config validate
|
|
@@ -430,10 +449,14 @@ runtime:
|
|
|
430
449
|
rawFallback: true
|
|
431
450
|
```
|
|
432
451
|
|
|
433
|
-
## OpenAI vs OpenAI-compatible
|
|
452
|
+
## OpenAI vs OpenRouter vs OpenAI-compatible
|
|
434
453
|
|
|
435
454
|
Use `provider: openai` for `api.openai.com`.
|
|
436
455
|
|
|
456
|
+
Use `provider: openrouter` for the native OpenRouter path. It defaults to:
|
|
457
|
+
- `baseUrl: https://openrouter.ai/api/v1`
|
|
458
|
+
- `model: openrouter/free`
|
|
459
|
+
|
|
437
460
|
Use `provider: openai-compatible` for third-party compatible gateways or self-hosted endpoints.
|
|
438
461
|
|
|
439
462
|
For OpenAI:
|
|
@@ -441,6 +464,11 @@ For OpenAI:
|
|
|
441
464
|
export OPENAI_API_KEY=your_openai_api_key
|
|
442
465
|
```
|
|
443
466
|
|
|
467
|
+
For OpenRouter:
|
|
468
|
+
```bash
|
|
469
|
+
export OPENROUTER_API_KEY=your_openrouter_api_key
|
|
470
|
+
```
|
|
471
|
+
|
|
444
472
|
For third-party compatible endpoints, use either the endpoint-native env var or:
|
|
445
473
|
|
|
446
474
|
```bash
|