@memberjunction/ai-openrouter 6.2.0-edge.1 → 6.2.0-edge.3
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 +34 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/models/openRouterDecision.d.ts +42 -0
- package/dist/models/openRouterDecision.d.ts.map +1 -0
- package/dist/models/openRouterDecision.js +238 -0
- package/dist/models/openRouterDecision.js.map +1 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -58,6 +58,39 @@ const result = await llm.ChatCompletion({
|
|
|
58
58
|
console.log(result.data.choices[0].message.content);
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
## Typed decisions (Jev)
|
|
62
|
+
|
|
63
|
+
`OpenRouterDecision` is a `BaseDecision` driver for OpenRouter's Decisions API
|
|
64
|
+
(`POST https://openrouter.ai/api/alpha/decisions`), which serves TypeSafe's Jev decision model.
|
|
65
|
+
It answers Likelihood, Choice and Score questions with typed probabilities, so nothing is parsed
|
|
66
|
+
from prose. Most callers reach it through `AIDecisionRunner` (`@memberjunction/ai-prompts`) and the
|
|
67
|
+
`Default Decision` prompt, where the `Jev` model is the first choice.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
import { OpenRouterDecision } from '@memberjunction/ai-openrouter';
|
|
71
|
+
|
|
72
|
+
const jev = new OpenRouterDecision('your-openrouter-api-key');
|
|
73
|
+
const result = await jev.Decide({
|
|
74
|
+
Model: 'typesafe/jev-1.13-20260917',
|
|
75
|
+
State: 'I was charged twice for March. Please refund the duplicate.',
|
|
76
|
+
Questions: {
|
|
77
|
+
refund: { Kind: 'Likelihood', Instructions: 'Is the customer asking for money back?' },
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
// result.Answers.refund → { Kind: 'Likelihood', Probability: 0.97 }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Credentials.** When it runs through `AIDecisionRunner`, the key resolves like any model's: an AI
|
|
84
|
+
Credential Binding on the `Default Decision` prompt's Jev row or on the Jev model-vendor row, or else
|
|
85
|
+
the legacy environment variable. The legacy variable is keyed by driver class, so Jev needs its own:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
AI_VENDOR_API_KEY__OPENROUTERDECISION=sk-or-... # the same OpenRouter key as AI_VENDOR_API_KEY__OPENROUTERLLM
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Without a key the runner skips Jev and falls back to the next decision model (`LLM Decision`), and
|
|
92
|
+
logs that once per process.
|
|
93
|
+
|
|
61
94
|
## How It Works
|
|
62
95
|
|
|
63
96
|
`OpenRouterLLM` is a thin subclass of `OpenAILLM` that redirects all API calls to OpenRouter's endpoint at `https://openrouter.ai/api/v1`. Since OpenRouter implements an OpenAI-compatible API, all chat, streaming, and parameter handling logic is inherited from the OpenAI provider.
|
|
@@ -75,7 +108,7 @@ OpenRouter provides access to models from many providers. Use the provider-prefi
|
|
|
75
108
|
|
|
76
109
|
## Class Registration
|
|
77
110
|
|
|
78
|
-
Registered as `OpenRouterLLM` via `@RegisterClass(BaseLLM, 'OpenRouterLLM')`.
|
|
111
|
+
Registered as `OpenRouterLLM` via `@RegisterClass(BaseLLM, 'OpenRouterLLM')`, and `OpenRouterDecision` via `@RegisterClass(BaseDecision, 'OpenRouterDecision')`.
|
|
79
112
|
|
|
80
113
|
## Dependencies
|
|
81
114
|
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BaseDecision, DecisionParams, DecisionResult } from '@memberjunction/ai';
|
|
2
|
+
/**
|
|
3
|
+
* A `BaseDecision` driver for OpenRouter's Decisions API, which serves TypeSafe's Jev decision
|
|
4
|
+
* model. The API returns typed answers, so nothing is parsed from prose. Choice and Score
|
|
5
|
+
* distributions are renormalised, because the API rounds each probability to two decimals.
|
|
6
|
+
*/
|
|
7
|
+
export declare class OpenRouterDecision extends BaseDecision {
|
|
8
|
+
/** The OpenRouter Decisions API endpoint. */
|
|
9
|
+
static readonly DEFAULT_ENDPOINT = "https://openrouter.ai/api/alpha/decisions";
|
|
10
|
+
/** The model used when DecisionParams.Model is empty. */
|
|
11
|
+
static readonly DEFAULT_MODEL = "~typesafe/jev-latest";
|
|
12
|
+
private _endpointURL;
|
|
13
|
+
constructor(apiKey: string, endpointURL?: string);
|
|
14
|
+
/** The configured Decisions API endpoint URL. */
|
|
15
|
+
get EndpointURL(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Sends the questions to the Decisions API and maps its typed answers. An HTTP or network error
|
|
18
|
+
* is thrown, carrying the HTTP `status`, so `Decide()` classifies it and rate limits and
|
|
19
|
+
* server errors become failover-eligible.
|
|
20
|
+
*/
|
|
21
|
+
protected DoDecide(params: DecisionParams): Promise<DecisionResult>;
|
|
22
|
+
/** POSTs the request and returns the parsed JSON body. Throws on a non-2xx status. */
|
|
23
|
+
private postRequest;
|
|
24
|
+
/** Records the dated model version and usage, whenever the response carries them. */
|
|
25
|
+
private recordTelemetry;
|
|
26
|
+
/**
|
|
27
|
+
* Marks the result failed because the response could not be mapped. Another model may still
|
|
28
|
+
* answer, so the failure allows failover (and is not 'Fatal', which would stop the failover loop).
|
|
29
|
+
*/
|
|
30
|
+
private fail;
|
|
31
|
+
private buildRequestBody;
|
|
32
|
+
/** Maps one question onto the wire: a Choice's options as `{ value: description }`, a Score's levels as an array. */
|
|
33
|
+
private buildQuestion;
|
|
34
|
+
private mapAnswer;
|
|
35
|
+
/** Checks the answer's wire type, when the API sends one. */
|
|
36
|
+
private typeMismatch;
|
|
37
|
+
private mapLikelihood;
|
|
38
|
+
private mapChoice;
|
|
39
|
+
/** A Score's probabilities come keyed by level index ("0", "1", …); MJ keys them by level name. */
|
|
40
|
+
private mapScore;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=openRouterDecision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openRouterDecision.d.ts","sourceRoot":"","sources":["../../src/models/openRouterDecision.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAGZ,cAAc,EAEd,cAAc,EAGjB,MAAM,oBAAoB,CAAC;AAc5B;;;;GAIG;AACH,qBACa,kBAAmB,SAAQ,YAAY;IAChD,6CAA6C;IAC7C,gBAAuB,gBAAgB,+CAA+C;IAEtF,yDAAyD;IACzD,gBAAuB,aAAa,0BAA0B;IAE9D,OAAO,CAAC,YAAY,CAAS;gBAEjB,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IAOhD,iDAAiD;IACjD,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED;;;;OAIG;cACa,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAqBzE,sFAAsF;YACxE,WAAW;IAoBzB,qFAAqF;IACrF,OAAO,CAAC,eAAe;IAkBvB;;;OAGG;IACH,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,gBAAgB;IAQxB,qHAAqH;IACrH,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,SAAS;IAejB,6DAA6D;IAC7D,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,SAAS;IAkBjB,mGAAmG;IACnG,OAAO,CAAC,QAAQ;CAmBnB"}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var OpenRouterDecision_1;
|
|
11
|
+
import { BaseDecision, DecisionResult, ModelUsage, } from '@memberjunction/ai';
|
|
12
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
13
|
+
/**
|
|
14
|
+
* The Decisions API's name for a Likelihood question. It is both the wire `type` of the question
|
|
15
|
+
* and the property that carries the answer's probability. The vendor's word stays at this boundary.
|
|
16
|
+
*/
|
|
17
|
+
const WIRE_LIKELIHOOD = 'noul';
|
|
18
|
+
/**
|
|
19
|
+
* A `BaseDecision` driver for OpenRouter's Decisions API, which serves TypeSafe's Jev decision
|
|
20
|
+
* model. The API returns typed answers, so nothing is parsed from prose. Choice and Score
|
|
21
|
+
* distributions are renormalised, because the API rounds each probability to two decimals.
|
|
22
|
+
*/
|
|
23
|
+
let OpenRouterDecision = class OpenRouterDecision extends BaseDecision {
|
|
24
|
+
static { OpenRouterDecision_1 = this; }
|
|
25
|
+
/** The OpenRouter Decisions API endpoint. */
|
|
26
|
+
static { this.DEFAULT_ENDPOINT = 'https://openrouter.ai/api/alpha/decisions'; }
|
|
27
|
+
/** The model used when DecisionParams.Model is empty. */
|
|
28
|
+
static { this.DEFAULT_MODEL = '~typesafe/jev-latest'; }
|
|
29
|
+
constructor(apiKey, endpointURL) {
|
|
30
|
+
super(apiKey);
|
|
31
|
+
this._endpointURL = endpointURL && endpointURL.trim().length > 0
|
|
32
|
+
? endpointURL.trim()
|
|
33
|
+
: OpenRouterDecision_1.DEFAULT_ENDPOINT;
|
|
34
|
+
}
|
|
35
|
+
/** The configured Decisions API endpoint URL. */
|
|
36
|
+
get EndpointURL() {
|
|
37
|
+
return this._endpointURL;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Sends the questions to the Decisions API and maps its typed answers. An HTTP or network error
|
|
41
|
+
* is thrown, carrying the HTTP `status`, so `Decide()` classifies it and rate limits and
|
|
42
|
+
* server errors become failover-eligible.
|
|
43
|
+
*/
|
|
44
|
+
async DoDecide(params) {
|
|
45
|
+
const startTime = new Date();
|
|
46
|
+
const model = params.Model && params.Model.trim().length > 0 ? params.Model.trim() : OpenRouterDecision_1.DEFAULT_MODEL;
|
|
47
|
+
const response = await this.postRequest(this.buildRequestBody(model, params), params.CancellationToken);
|
|
48
|
+
const result = new DecisionResult(true, startTime, new Date());
|
|
49
|
+
this.recordTelemetry(result, response);
|
|
50
|
+
const answers = isObject(response) ? response['answers'] : undefined;
|
|
51
|
+
if (!isObject(answers)) {
|
|
52
|
+
return this.fail(result, 'The Decisions API response has no answers object');
|
|
53
|
+
}
|
|
54
|
+
for (const [key, question] of Object.entries(params.Questions)) {
|
|
55
|
+
const mapped = this.mapAnswer(key, question, answers);
|
|
56
|
+
if ('errorMessage' in mapped) {
|
|
57
|
+
return this.fail(result, mapped.errorMessage);
|
|
58
|
+
}
|
|
59
|
+
result.Answers[key] = mapped.answer;
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
/** POSTs the request and returns the parsed JSON body. Throws on a non-2xx status. */
|
|
64
|
+
async postRequest(body, signal) {
|
|
65
|
+
const res = await fetch(this.EndpointURL, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
headers: { Authorization: `Bearer ${this.apiKey}`, 'Content-Type': 'application/json' },
|
|
68
|
+
body: JSON.stringify(body),
|
|
69
|
+
signal,
|
|
70
|
+
});
|
|
71
|
+
if (!res.ok) {
|
|
72
|
+
const snippet = (await res.text().catch(() => '')).slice(0, 500);
|
|
73
|
+
const err = new Error(`OpenRouter Decisions API returned HTTP ${res.status}${snippet ? `: ${snippet}` : ''}`);
|
|
74
|
+
err.status = res.status;
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
try {
|
|
78
|
+
return await res.json();
|
|
79
|
+
}
|
|
80
|
+
catch (err) {
|
|
81
|
+
throw new Error(`The OpenRouter Decisions API response is not JSON: ${err instanceof Error ? err.message : String(err)}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/** Records the dated model version and usage, whenever the response carries them. */
|
|
85
|
+
recordTelemetry(result, response) {
|
|
86
|
+
if (!isObject(response)) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (typeof response['model'] === 'string') {
|
|
90
|
+
result.ResolvedModel = response['model'];
|
|
91
|
+
}
|
|
92
|
+
const usage = response['usage'];
|
|
93
|
+
if (isObject(usage)) {
|
|
94
|
+
result.Usage = new ModelUsage(finiteOr(usage['input_tokens'], 0), finiteOr(usage['output_tokens'], 0), typeof usage['cost'] === 'number' ? usage['cost'] : undefined, 'USD');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Marks the result failed because the response could not be mapped. Another model may still
|
|
99
|
+
* answer, so the failure allows failover (and is not 'Fatal', which would stop the failover loop).
|
|
100
|
+
*/
|
|
101
|
+
fail(result, message) {
|
|
102
|
+
result.success = false;
|
|
103
|
+
result.errorMessage = message;
|
|
104
|
+
result.errorInfo = { errorType: 'ModelError', severity: 'Retriable', canFailover: true };
|
|
105
|
+
result.Answers = {};
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
buildRequestBody(model, params) {
|
|
109
|
+
const questions = {};
|
|
110
|
+
for (const [key, question] of Object.entries(params.Questions)) {
|
|
111
|
+
questions[key] = this.buildQuestion(question);
|
|
112
|
+
}
|
|
113
|
+
return { model, state: params.State, questions };
|
|
114
|
+
}
|
|
115
|
+
/** Maps one question onto the wire: a Choice's options as `{ value: description }`, a Score's levels as an array. */
|
|
116
|
+
buildQuestion(question) {
|
|
117
|
+
switch (question.Kind) {
|
|
118
|
+
case 'Likelihood':
|
|
119
|
+
return { type: WIRE_LIKELIHOOD, instructions: question.Instructions };
|
|
120
|
+
case 'Choice': {
|
|
121
|
+
const criteria = {};
|
|
122
|
+
for (const option of question.Options) {
|
|
123
|
+
criteria[option.Value] = option.Description;
|
|
124
|
+
}
|
|
125
|
+
return { type: 'choice', instructions: question.Instructions, criteria };
|
|
126
|
+
}
|
|
127
|
+
case 'Score':
|
|
128
|
+
return { type: 'score', instructions: question.Instructions, criteria: [...question.Levels] };
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
mapAnswer(key, question, answers) {
|
|
132
|
+
const answer = Object.prototype.hasOwnProperty.call(answers, key) ? answers[key] : undefined;
|
|
133
|
+
if (!isObject(answer)) {
|
|
134
|
+
return { success: false, errorMessage: `Question '${key}': the response has no answer object for it` };
|
|
135
|
+
}
|
|
136
|
+
switch (question.Kind) {
|
|
137
|
+
case 'Likelihood':
|
|
138
|
+
return this.mapLikelihood(key, answer);
|
|
139
|
+
case 'Choice':
|
|
140
|
+
return this.mapChoice(key, question, answer);
|
|
141
|
+
case 'Score':
|
|
142
|
+
return this.mapScore(key, question, answer);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/** Checks the answer's wire type, when the API sends one. */
|
|
146
|
+
typeMismatch(key, answer, expected) {
|
|
147
|
+
const type = answer['type'];
|
|
148
|
+
return type === undefined || type === expected
|
|
149
|
+
? undefined
|
|
150
|
+
: `Question '${key}': expected an answer of type '${expected}', got '${String(type)}'`;
|
|
151
|
+
}
|
|
152
|
+
mapLikelihood(key, answer) {
|
|
153
|
+
const mismatch = this.typeMismatch(key, answer, WIRE_LIKELIHOOD);
|
|
154
|
+
if (mismatch) {
|
|
155
|
+
return { success: false, errorMessage: mismatch };
|
|
156
|
+
}
|
|
157
|
+
const probability = answer[WIRE_LIKELIHOOD];
|
|
158
|
+
if (typeof probability !== 'number' || !Number.isFinite(probability)) {
|
|
159
|
+
return { success: false, errorMessage: `Question '${key}': the Likelihood probability is not a finite number` };
|
|
160
|
+
}
|
|
161
|
+
return { success: true, answer: { Kind: 'Likelihood', Probability: clamp(probability, 0, 1) } };
|
|
162
|
+
}
|
|
163
|
+
mapChoice(key, question, answer) {
|
|
164
|
+
const mismatch = this.typeMismatch(key, answer, 'choice');
|
|
165
|
+
if (mismatch) {
|
|
166
|
+
return { success: false, errorMessage: mismatch };
|
|
167
|
+
}
|
|
168
|
+
const values = question.Options.map(o => o.Value);
|
|
169
|
+
const choice = answer['choice'];
|
|
170
|
+
if (typeof choice !== 'string' || !values.includes(choice)) {
|
|
171
|
+
return { success: false, errorMessage: `Question '${key}': the choice '${String(choice)}' is not one of the options (${values.join(', ')})` };
|
|
172
|
+
}
|
|
173
|
+
const raw = isObject(answer['probabilities']) ? answer['probabilities'] : {};
|
|
174
|
+
const probabilities = normalize(values.map(value => [value, raw[value]]));
|
|
175
|
+
if (!probabilities) {
|
|
176
|
+
return { success: false, errorMessage: `Question '${key}': the Choice probabilities sum to 0` };
|
|
177
|
+
}
|
|
178
|
+
return { success: true, answer: { Kind: 'Choice', Value: choice, Probabilities: probabilities, Confidence: readConfidence(answer, probabilities) } };
|
|
179
|
+
}
|
|
180
|
+
/** A Score's probabilities come keyed by level index ("0", "1", …); MJ keys them by level name. */
|
|
181
|
+
mapScore(key, question, answer) {
|
|
182
|
+
const mismatch = this.typeMismatch(key, answer, 'score');
|
|
183
|
+
if (mismatch) {
|
|
184
|
+
return { success: false, errorMessage: mismatch };
|
|
185
|
+
}
|
|
186
|
+
const score = answer['score'];
|
|
187
|
+
if (typeof score !== 'number' || !Number.isFinite(score)) {
|
|
188
|
+
return { success: false, errorMessage: `Question '${key}': the Score value is not a finite number` };
|
|
189
|
+
}
|
|
190
|
+
const raw = isObject(answer['probabilities']) ? answer['probabilities'] : {};
|
|
191
|
+
const probabilities = normalize(question.Levels.map((level, i) => [level, raw[String(i)]]));
|
|
192
|
+
if (!probabilities) {
|
|
193
|
+
return { success: false, errorMessage: `Question '${key}': the Score probabilities sum to 0` };
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
success: true,
|
|
197
|
+
answer: { Kind: 'Score', Value: clamp(score, 0, question.Levels.length - 1), Probabilities: probabilities, Confidence: readConfidence(answer, probabilities) },
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
OpenRouterDecision = OpenRouterDecision_1 = __decorate([
|
|
202
|
+
RegisterClass(BaseDecision, 'OpenRouterDecision'),
|
|
203
|
+
__metadata("design:paramtypes", [String, String])
|
|
204
|
+
], OpenRouterDecision);
|
|
205
|
+
export { OpenRouterDecision };
|
|
206
|
+
function isObject(value) {
|
|
207
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
208
|
+
}
|
|
209
|
+
function clamp(value, min, max) {
|
|
210
|
+
return Math.max(min, Math.min(max, value));
|
|
211
|
+
}
|
|
212
|
+
function finiteOr(value, fallback) {
|
|
213
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : fallback;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Builds a distribution over the given keys, in order. A missing, negative or non-numeric entry
|
|
217
|
+
* counts as 0. Returns undefined when the entries sum to 0.
|
|
218
|
+
*/
|
|
219
|
+
function normalize(entries) {
|
|
220
|
+
const values = entries.map(([name, raw]) => [name, Math.max(0, finiteOr(raw, 0))]);
|
|
221
|
+
const sum = values.reduce((total, [, p]) => total + p, 0);
|
|
222
|
+
if (sum <= 0) {
|
|
223
|
+
return undefined;
|
|
224
|
+
}
|
|
225
|
+
const result = {};
|
|
226
|
+
for (const [name, p] of values) {
|
|
227
|
+
result[name] = p / sum;
|
|
228
|
+
}
|
|
229
|
+
return result;
|
|
230
|
+
}
|
|
231
|
+
/** The API's own confidence, clamped; when it sends none, the top probability. */
|
|
232
|
+
function readConfidence(answer, probabilities) {
|
|
233
|
+
const confidence = answer['confidence'];
|
|
234
|
+
return typeof confidence === 'number' && Number.isFinite(confidence)
|
|
235
|
+
? clamp(confidence, 0, 1)
|
|
236
|
+
: Math.max(...Object.values(probabilities));
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=openRouterDecision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openRouterDecision.js","sourceRoot":"","sources":["../../src/models/openRouterDecision.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EACH,YAAY,EAKZ,cAAc,EACd,UAAU,GAEb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,MAAM,eAAe,GAAG,MAAM,CAAC;AAO/B;;;;GAIG;AAEI,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,YAAY;;IAChD,6CAA6C;aACtB,qBAAgB,GAAG,2CAA2C,AAA9C,CAA+C;IAEtF,yDAAyD;aAClC,kBAAa,GAAG,sBAAsB,AAAzB,CAA0B;IAI9D,YAAY,MAAc,EAAE,WAAoB;QAC5C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,YAAY,GAAG,WAAW,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;YAC5D,CAAC,CAAC,WAAW,C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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QACX,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC;QAC7B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAC3B,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,kFAAkF;AAClF,SAAS,cAAc,CAAC,MAAkB,EAAE,aAAqC;IAC7E,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IACxC,OAAO,OAAO,UAAU,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;QAChE,CAAC,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ai-openrouter",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.2.0-edge.
|
|
4
|
+
"version": "6.2.0-edge.3",
|
|
5
5
|
"description": "MemberJunction Wrapper for OpenRouter AI inference services",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"author": "MemberJunction.com",
|
|
12
12
|
"license": "BUSL-1.1",
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@memberjunction/unit-testing": "6.2.0-edge.
|
|
14
|
+
"@memberjunction/unit-testing": "6.2.0-edge.3",
|
|
15
15
|
"ts-node-dev": "^2.0.0",
|
|
16
16
|
"typescript": "^5.9.3"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@memberjunction/ai": "6.2.0-edge.
|
|
20
|
-
"@memberjunction/ai-openai": "6.2.0-edge.
|
|
21
|
-
"@memberjunction/global": "6.2.0-edge.
|
|
19
|
+
"@memberjunction/ai": "6.2.0-edge.3",
|
|
20
|
+
"@memberjunction/ai-openai": "6.2.0-edge.3",
|
|
21
|
+
"@memberjunction/global": "6.2.0-edge.3"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|