@profullstack/ai-providers 0.1.1 → 0.1.2
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 +1 -1
- package/package.json +1 -1
- package/src/c0mpute.js +3 -2
- package/src/index.js +3 -2
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ A thrown error with `status` 401/402/403, or a 429 or 400 that mentions credits
|
|
|
57
57
|
|
|
58
58
|
| Variable | Default | |
|
|
59
59
|
|---|---|---|
|
|
60
|
-
| `C0MPUTE_API_KEY` | none | Infernet
|
|
60
|
+
| `C0MPUTE_API_KEY` | none | Infernet **account** key (`ik_live_...`), billed per job. An `ifc_` trusted-client key without an end-user subject, or no key at all, gets the free tier of 10 queries a day. |
|
|
61
61
|
| `C0MPUTE_URL` | `https://infernetprotocol.com` | |
|
|
62
62
|
| `C0MPUTE_MODELS` | `huihui_ai/qwen3.5-abliterated:9b,qwen2.5:7b,qwen3:4b,gemma3:4b,huihui_ai/qwen3.5-abliterated:4b` | Tried in order. The first is an Infernet house model every node pulls. |
|
|
63
63
|
| `C0MPUTE_ANY_MODEL` | off | Let any free node answer as a last resort. Small models write junk JSON. |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@profullstack/ai-providers",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "One text-model call for every Profullstack app: c0mpute first, OpenAI and Anthropic as alternating fallbacks, dead keys parked. Zero dependencies.",
|
|
6
6
|
"keywords": [
|
package/src/c0mpute.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* -> {jobId, source, model}
|
|
6
6
|
* GET /api/chat/stream/<jobId> server-sent events: meta, token..., done | error
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* trusted-client key (`ifc_
|
|
8
|
+
* Use an account key (`ik_live_...`): it is billed per job with no daily cap.
|
|
9
|
+
* With no key, or a trusted-client key (`ifc_...`) that names no end user, the
|
|
10
|
+
* caller gets the free tier of 10 queries a day.
|
|
10
11
|
*
|
|
11
12
|
* `p2p_only` (default on) stops Infernet handing the job to its billed hosted
|
|
12
13
|
* fallback; an answer from anything but a peer node is refused.
|
package/src/index.js
CHANGED
|
@@ -26,8 +26,9 @@ const num = (v) => (v == null || v === '' || Number.isNaN(Number(v)) ? undefined
|
|
|
26
26
|
/**
|
|
27
27
|
* Builds the router from the environment.
|
|
28
28
|
*
|
|
29
|
-
* C0MPUTE_API_KEY Infernet
|
|
30
|
-
*
|
|
29
|
+
* C0MPUTE_API_KEY Infernet account key (ik_live_...), billed per job. No
|
|
30
|
+
* key, or an ifc_ key with no subject, gets 10 free
|
|
31
|
+
* queries a day.
|
|
31
32
|
* C0MPUTE_URL default https://infernetprotocol.com
|
|
32
33
|
* C0MPUTE_MODELS comma list, tried in order (C0MPUTE_MODEL also read)
|
|
33
34
|
* C0MPUTE_ANY_MODEL 1 to let any free node answer as a last resort
|