decision-api 1.1.0 → 1.2.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/README.md +1 -1
- package/dist/models.d.ts +4 -0
- package/dist/models.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# decision-api
|
|
2
2
|
|
|
3
|
-
One client for decision models: models that answer typed questions with calibrated probabilities instead of text. It speaks TypeSafe's Jev, Cloudflare's Clef and Clef-flash (Workers AI), OpenAI's gpt-6-luna and the decision models on OpenRouter (such as `microsoft/microsoft-decision-1`), and returns the same answer shape from all of them. It depends only on `zod`.
|
|
3
|
+
One client for decision models: models that answer typed questions with calibrated probabilities instead of text. It speaks TypeSafe's Jev, Cloudflare's Clef and Clef-flash (Workers AI), OpenAI's gpt-6-luna and the decision models on OpenRouter (such as `microsoft/microsoft-decision-1` and `typesafe/jev-1.13`), and returns the same answer shape from all of them. It depends only on `zod`.
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
npm install decision-api
|
package/dist/models.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export declare const DECISION_MODELS: {
|
|
|
39
39
|
readonly provider: "openrouter";
|
|
40
40
|
readonly inputUsdPerMTok: 0.042;
|
|
41
41
|
};
|
|
42
|
+
readonly 'typesafe/jev-1.13': {
|
|
43
|
+
readonly provider: "openrouter";
|
|
44
|
+
readonly inputUsdPerMTok: 0.042;
|
|
45
|
+
};
|
|
42
46
|
};
|
|
43
47
|
export type DecisionModel = keyof typeof DECISION_MODELS;
|
|
44
48
|
type ModelsOf<Provider> = {
|
package/dist/models.js
CHANGED
|
@@ -19,7 +19,9 @@ export const DECISION_MODELS = {
|
|
|
19
19
|
'microsoft/microsoft-decision-1': {
|
|
20
20
|
provider: 'openrouter',
|
|
21
21
|
inputUsdPerMTok: 0.042
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
// TypeSafe's Jev 1.13 on OpenRouter, served on OpenRouter's zero-data-retention list
|
|
24
|
+
'typesafe/jev-1.13': { provider: 'openrouter', inputUsdPerMTok: 0.042 }
|
|
23
25
|
};
|
|
24
26
|
/** One POST: where it goes, and the headers and body it carries. */
|
|
25
27
|
export function buildDecisionRequest(model, input, keys) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decision-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "One typed client for decision models (TypeSafe Jev, Cloudflare Clef, OpenAI gpt-6-luna, OpenRouter models such as Microsoft-Decision-1) that answer questions with calibrated probabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Kristoffer Hansen",
|