@plurnk/plurnk-providers 1.3.4 → 1.3.6
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/.env.defaults +41 -52
- package/README.md +44 -53
- package/SPEC.md +215 -354
- package/dist/AiSdkProvider.d.ts +78 -0
- package/dist/AiSdkProvider.d.ts.map +1 -0
- package/dist/AiSdkProvider.js +591 -0
- package/dist/AiSdkProvider.js.map +1 -0
- package/dist/Mock.d.ts +1 -1
- package/dist/Mock.d.ts.map +1 -1
- package/dist/Mock.js +1 -1
- package/dist/Mock.js.map +1 -1
- package/dist/OpenAICompat.d.ts +3 -5
- package/dist/OpenAICompat.d.ts.map +1 -1
- package/dist/OpenAICompat.js +44 -133
- package/dist/OpenAICompat.js.map +1 -1
- package/dist/Pool.d.ts +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +1 -1
- package/dist/Pool.js.map +1 -1
- package/dist/ProviderRegistry.d.ts.map +1 -1
- package/dist/ProviderRegistry.js +37 -24
- package/dist/ProviderRegistry.js.map +1 -1
- package/dist/aiSdkTransport.d.ts +52 -0
- package/dist/aiSdkTransport.d.ts.map +1 -0
- package/dist/aiSdkTransport.js +294 -0
- package/dist/aiSdkTransport.js.map +1 -0
- package/dist/catalogProvider.d.ts +15 -0
- package/dist/catalogProvider.d.ts.map +1 -0
- package/dist/catalogProvider.js +103 -0
- package/dist/catalogProvider.js.map +1 -0
- package/dist/compatibleProvider.d.ts +3 -0
- package/dist/compatibleProvider.d.ts.map +1 -0
- package/dist/compatibleProvider.js +146 -0
- package/dist/compatibleProvider.js.map +1 -0
- package/dist/discover.d.ts.map +1 -1
- package/dist/discover.js.map +1 -1
- package/dist/env.d.ts +1 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +13 -6
- package/dist/env.js.map +1 -1
- package/dist/index.d.ts +5 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/ollama.d.ts +3 -0
- package/dist/ollama.d.ts.map +1 -0
- package/dist/ollama.js +39 -0
- package/dist/ollama.js.map +1 -0
- package/dist/openai.d.ts +2 -4
- package/dist/openai.d.ts.map +1 -1
- package/dist/openai.js +1 -2
- package/dist/openai.js.map +1 -1
- package/dist/sdkModels.d.ts +13 -0
- package/dist/sdkModels.d.ts.map +1 -0
- package/dist/sdkModels.js +153 -0
- package/dist/sdkModels.js.map +1 -0
- package/dist/standardProviders.d.ts +0 -1
- package/dist/standardProviders.d.ts.map +1 -1
- package/dist/standardProviders.js +9 -11
- package/dist/standardProviders.js.map +1 -1
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +20 -9
- package/dist/telemetry.js.map +1 -1
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/usage.d.ts +1 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +4 -2
- package/dist/usage.js.map +1 -1
- package/package.json +19 -8
- package/src/{OpenAICompat.test.ts → AiSdkProvider.test.ts} +202 -177
- package/src/{OpenAICompat.ts → AiSdkProvider.ts} +89 -144
- package/src/Mock.test.ts +3 -3
- package/src/Mock.ts +1 -1
- package/src/Pool.test.ts +3 -3
- package/src/Pool.ts +1 -1
- package/src/ProviderRegistry.test.ts +40 -27
- package/src/ProviderRegistry.ts +35 -24
- package/src/aiSdkTransport.test.ts +253 -0
- package/src/aiSdkTransport.ts +369 -0
- package/src/boundaries.test.ts +2 -2
- package/src/catalogProvider.test.ts +100 -0
- package/src/catalogProvider.ts +151 -0
- package/src/compatibleProvider.test.ts +44 -0
- package/src/compatibleProvider.ts +205 -0
- package/src/discover.test.ts +12 -12
- package/src/discover.ts +3 -6
- package/src/env.ts +14 -6
- package/src/index.ts +7 -11
- package/src/ollama.ts +63 -0
- package/src/openai.ts +2 -8
- package/src/sdkModels.test.ts +47 -0
- package/src/sdkModels.ts +194 -0
- package/src/telemetry.test.ts +17 -10
- package/src/telemetry.ts +22 -14
- package/src/types.ts +10 -13
- package/src/usage.test.ts +8 -10
- package/src/usage.ts +7 -3
- package/src/openaiStream.ts +0 -310
- package/src/standardProviders.test.ts +0 -949
- package/src/standardProviders.ts +0 -635
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
// PLURNK adapter over an AI SDK language model. Implements the universal generate()
|
|
2
|
+
// spine — signal merging, the SSE call, usage mapping, finishReason
|
|
3
|
+
// normalization, response assembly — that every sibling had duplicated.
|
|
4
|
+
//
|
|
5
|
+
// Composition, not inheritance: an official AI SDK language model supplies the
|
|
6
|
+
// ordinary vendor protocol. The compatible URL path remains only for PLURNK
|
|
7
|
+
// extensions and local endpoint probes the SDK cannot represent.
|
|
8
|
+
import { executeAiSdkModel, executeOpenAICompatible } from "./aiSdkTransport.js";
|
|
9
|
+
import { toProviderError, ProviderError } from "./telemetry.js";
|
|
10
|
+
import { validateGbnf } from "@plurnk/gbnf";
|
|
11
|
+
import { emitWarningOnce } from "./warnings.js";
|
|
12
|
+
// #539: drop trailing occurrences of a server-rendered EOG marker. llama-server
|
|
13
|
+
// under --special renders EOS as literal text, so a raw-EOS-ended turn carries a
|
|
14
|
+
// trailing <eos> the grammar never sanctioned. Trailing-only + exact-match, so it
|
|
15
|
+
// can never eat body content (a body ending in the literal marker isn't producible
|
|
16
|
+
// under the grammar, and is vanishingly rare unconstrained).
|
|
17
|
+
const stripTrailingSpecial = (content, marker) => {
|
|
18
|
+
if (marker.length === 0)
|
|
19
|
+
return content;
|
|
20
|
+
let out = content;
|
|
21
|
+
while (out.endsWith(marker))
|
|
22
|
+
out = out.slice(0, -marker.length);
|
|
23
|
+
return out;
|
|
24
|
+
};
|
|
25
|
+
// Shared budget→effort breakpoints (xai and google had identical copies).
|
|
26
|
+
export const effortFromBudget = (budget) => {
|
|
27
|
+
if (budget <= 1000)
|
|
28
|
+
return "low";
|
|
29
|
+
if (budget <= 4000)
|
|
30
|
+
return "medium";
|
|
31
|
+
return "high";
|
|
32
|
+
};
|
|
33
|
+
// chars/2 upper bound (see ./tokenizers.ts) — overcounts safely, never under.
|
|
34
|
+
const heuristicTokens = (text) => (text.length === 0 ? 0 : Math.ceil(text.length / 2));
|
|
35
|
+
// Body keys the provider owns — a caller's `sampling` passthrough may not set
|
|
36
|
+
// these. Two families (#477 audit):
|
|
37
|
+
// transport/managed — grammar transport, the stream/JSON choice, slot pinning,
|
|
38
|
+
// data capture (SPEC §8: backend-specific fields never cross the contract);
|
|
39
|
+
// contract invariants — `n` (atomic single completion: choices[0] is the
|
|
40
|
+
// response; n>1 = paid, dropped output), the tool-calling family (tools-in-
|
|
41
|
+
// body doctrine, §2: native tool_calls return null content = a broken turn),
|
|
42
|
+
// modalities/audio (text-only contract), prediction (decode semantics, not
|
|
43
|
+
// sampling), and the token caps (the envelope is the managed maxTokens —
|
|
44
|
+
// sampling must not bypass the consumer's #425 cap).
|
|
45
|
+
// Sampling intent (temperature, top_p, penalties, stop, seed, logit_bias) and
|
|
46
|
+
// platform knobs (user, service_tier, prompt_cache_*, safety_identifier,
|
|
47
|
+
// metadata, store, verbosity) pass through; the managed floors spread UNDER
|
|
48
|
+
// sampling stay deliberately caller-overridable.
|
|
49
|
+
const RESERVED_BODY_KEYS = new Set([
|
|
50
|
+
"model", "messages", "stream", "stream_options", "grammar", "response_format", "id_slot", "logprobs", "top_logprobs",
|
|
51
|
+
"n", "tools", "tool_choice", "functions", "function_call", "parallel_tool_calls",
|
|
52
|
+
"modalities", "audio", "prediction", "max_tokens", "max_completion_tokens",
|
|
53
|
+
"prompt_cache_key",
|
|
54
|
+
]);
|
|
55
|
+
// Render a non-accept verdict into a terse, factual grammar_unenforced message
|
|
56
|
+
// (SPEC §12 message policy: no guidance prose). `reject` names the diverging code
|
|
57
|
+
// point + what the grammar would have accepted; `incomplete` names the valid-prefix
|
|
58
|
+
// length that never reached a terminal state.
|
|
59
|
+
const describeUnenforced = (v) => {
|
|
60
|
+
if (v.status === "reject") {
|
|
61
|
+
const expected = v.expected.length > 0
|
|
62
|
+
? v.expected.map((e) => `${e.rule} accepts ${e.accepts}`).join(", ")
|
|
63
|
+
: "end of input";
|
|
64
|
+
return `grammar not enforced: output rejected by the transported grammar at code point ${v.pos} (${JSON.stringify(v.char)}); expected ${expected}`;
|
|
65
|
+
}
|
|
66
|
+
return `grammar not enforced: output is an incomplete match of the transported grammar — a valid prefix of ${v.pos} code points that never terminated`;
|
|
67
|
+
};
|
|
68
|
+
export default class AiSdkProvider {
|
|
69
|
+
#model;
|
|
70
|
+
#url;
|
|
71
|
+
#languageModel;
|
|
72
|
+
#fetchTimeoutMs;
|
|
73
|
+
#streamIdleTimeoutMs;
|
|
74
|
+
#headers;
|
|
75
|
+
#fetch;
|
|
76
|
+
#hasApiKey = false;
|
|
77
|
+
#apiKeyRejectedMessage;
|
|
78
|
+
#eosText;
|
|
79
|
+
#contextWindow;
|
|
80
|
+
#reasoning;
|
|
81
|
+
#temperature;
|
|
82
|
+
#repeatPenalty;
|
|
83
|
+
#frequencyPenalty;
|
|
84
|
+
#dryMultiplier;
|
|
85
|
+
#dryBase;
|
|
86
|
+
#dryAllowedLength;
|
|
87
|
+
#repeatLastN;
|
|
88
|
+
#reasoningStyle;
|
|
89
|
+
#countTokens;
|
|
90
|
+
#calculateCost;
|
|
91
|
+
#source;
|
|
92
|
+
#grammarStyle;
|
|
93
|
+
#promptCacheKey;
|
|
94
|
+
#serviceTier;
|
|
95
|
+
#gbnfDebug;
|
|
96
|
+
#streaming;
|
|
97
|
+
#firstPartyMetadata;
|
|
98
|
+
#supportsSlotPinning;
|
|
99
|
+
#slotCount;
|
|
100
|
+
#retryAttempts;
|
|
101
|
+
#topLogprobs;
|
|
102
|
+
#reasoningReserve;
|
|
103
|
+
#completionReserve;
|
|
104
|
+
#tuningFloors;
|
|
105
|
+
#rawBody;
|
|
106
|
+
#servedModel;
|
|
107
|
+
#requiresMaxTokens;
|
|
108
|
+
// Optional capability (SPEC §2): exact tokenization served by the backend's
|
|
109
|
+
// own vocab. Assigned in the constructor ONLY when the config carries a
|
|
110
|
+
// tokenizeUrl (llama-server), so `provider.tokenize === undefined` remains
|
|
111
|
+
// the honest capability signal for every other backend.
|
|
112
|
+
tokenize;
|
|
113
|
+
constructor(config) {
|
|
114
|
+
this.#model = config.model;
|
|
115
|
+
this.#url = config.url;
|
|
116
|
+
this.#languageModel = config.languageModel;
|
|
117
|
+
if ((this.#url === undefined) === (this.#languageModel === undefined)) {
|
|
118
|
+
throw new Error(`${config.source ?? "provider"}: configure exactly one AI SDK model or OpenAI-compatible URL`);
|
|
119
|
+
}
|
|
120
|
+
this.#fetchTimeoutMs = config.fetchTimeoutMs;
|
|
121
|
+
this.#streamIdleTimeoutMs = config.streamIdleTimeoutMs;
|
|
122
|
+
this.#headers = config.headers ?? {};
|
|
123
|
+
this.#fetch = config.fetch ?? ((input, init) => globalThis.fetch(input, init));
|
|
124
|
+
this.#contextWindow = config.contextWindow ?? null;
|
|
125
|
+
this.#reasoning = config.reasoning;
|
|
126
|
+
// Loud guard: an out-of-date consumer (stale plugin dist) omitting the
|
|
127
|
+
// required tuning fields must fail at construction, not silently send
|
|
128
|
+
// undefined sampling on every grammar request.
|
|
129
|
+
if (typeof config.temperature !== "number" || typeof config.repeatPenalty !== "number") {
|
|
130
|
+
throw new Error(`${config.source ?? "provider"}: AiSdkProviderConfig requires temperature + repeatPenalty (PLURNK_PROVIDERS_TEMPERATURE / _REPEAT_PENALTY)`);
|
|
131
|
+
}
|
|
132
|
+
this.#temperature = config.temperature;
|
|
133
|
+
this.#repeatPenalty = config.repeatPenalty;
|
|
134
|
+
this.#frequencyPenalty = typeof config.frequencyPenalty === "number" ? config.frequencyPenalty : 0;
|
|
135
|
+
this.#dryMultiplier = config.dryMultiplier;
|
|
136
|
+
this.#dryBase = config.dryBase;
|
|
137
|
+
this.#dryAllowedLength = config.dryAllowedLength;
|
|
138
|
+
this.#repeatLastN = config.repeatLastN;
|
|
139
|
+
this.#retryAttempts = config.retryAttempts;
|
|
140
|
+
this.#reasoningStyle = config.reasoningStyle ?? "none";
|
|
141
|
+
this.#countTokens = config.countTokens ?? heuristicTokens;
|
|
142
|
+
this.#calculateCost = config.calculateCost ?? (() => 0);
|
|
143
|
+
this.#source = config.source ?? "provider";
|
|
144
|
+
this.#grammarStyle = config.grammarStyle ?? "none";
|
|
145
|
+
this.#promptCacheKey = config.promptCacheKey ?? false;
|
|
146
|
+
this.#serviceTier = config.serviceTier;
|
|
147
|
+
this.#gbnfDebug = config.gbnfDebug ?? false;
|
|
148
|
+
this.#streaming = config.streaming ?? true;
|
|
149
|
+
this.#firstPartyMetadata = config.firstPartyMetadata ?? false;
|
|
150
|
+
this.#apiKeyRejectedMessage = config.apiKeyRejectedMessage;
|
|
151
|
+
this.#eosText = config.eosText;
|
|
152
|
+
this.#hasApiKey = "Authorization" in this.#headers;
|
|
153
|
+
this.#supportsSlotPinning = config.supportsSlotPinning ?? false;
|
|
154
|
+
this.#slotCount = config.slotCount ?? null;
|
|
155
|
+
this.#topLogprobs = config.topLogprobs ?? null;
|
|
156
|
+
this.#reasoningReserve = config.reasoningReserve;
|
|
157
|
+
this.#completionReserve = config.completionReserve;
|
|
158
|
+
this.#tuningFloors = config.tuningFloors ?? true;
|
|
159
|
+
this.#rawBody = config.rawBody ?? false;
|
|
160
|
+
this.#servedModel = config.servedModel;
|
|
161
|
+
this.#requiresMaxTokens = config.requiresMaxTokens;
|
|
162
|
+
const { tokenizeUrl } = config;
|
|
163
|
+
if (tokenizeUrl !== undefined) {
|
|
164
|
+
this.tokenize = async (text) => {
|
|
165
|
+
const res = await this.#fetch(tokenizeUrl, {
|
|
166
|
+
method: "POST",
|
|
167
|
+
headers: { "Content-Type": "application/json", ...this.#headers },
|
|
168
|
+
body: JSON.stringify({ content: text }),
|
|
169
|
+
signal: AbortSignal.timeout(this.#fetchTimeoutMs),
|
|
170
|
+
});
|
|
171
|
+
if (!res.ok)
|
|
172
|
+
throw new Error(`${this.#source}: tokenize endpoint returned ${res.status}`);
|
|
173
|
+
const { tokens } = (await res.json());
|
|
174
|
+
if (!Array.isArray(tokens) || !tokens.every((t) => typeof t === "number")) {
|
|
175
|
+
throw new Error(`${this.#source}: tokenize endpoint returned no token array`);
|
|
176
|
+
}
|
|
177
|
+
return tokens;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
get contextWindow() { return this.#contextWindow; }
|
|
182
|
+
// #507: envelope reserves — absolute pins stand alone; percentages need the
|
|
183
|
+
// detected window; null = underivable (no claim for core's no-cap path).
|
|
184
|
+
#resolveReserve(spec) {
|
|
185
|
+
if (spec === undefined)
|
|
186
|
+
return null;
|
|
187
|
+
if ("tokens" in spec)
|
|
188
|
+
return spec.tokens;
|
|
189
|
+
return this.#contextWindow === null ? null : Math.round(spec.percent * this.#contextWindow);
|
|
190
|
+
}
|
|
191
|
+
get reasoningReserve() { return this.#resolveReserve(this.#reasoningReserve); }
|
|
192
|
+
get completionReserve() { return this.#resolveReserve(this.#completionReserve); }
|
|
193
|
+
get model() { return this.#model; }
|
|
194
|
+
// #37: backend's self-reported served id; undefined when unprobed/unknown.
|
|
195
|
+
get servedModel() { return this.#servedModel; }
|
|
196
|
+
// #43: resolved "decodes unbounded without a cap" fact; undefined = no claim.
|
|
197
|
+
get requiresMaxTokens() { return this.#requiresMaxTokens; }
|
|
198
|
+
// Resolved capability (#34): will a transported grammar actually constrain
|
|
199
|
+
// this backend's decode? Introspectable so a consumer can verify the rails
|
|
200
|
+
// are LIVE without spending a generation on a forcing-grammar probe.
|
|
201
|
+
get constrainsOutput() { return this.#grammarStyle !== "none"; }
|
|
202
|
+
countTokens(text) { return this.#countTokens(text); }
|
|
203
|
+
calculateCost(usage) { return this.#calculateCost(usage); }
|
|
204
|
+
// Maps the reasoning INTENT (off | adaptive | on+budget, #33) to the
|
|
205
|
+
// backend's wire mechanism — including under a transported grammar. The #32
|
|
206
|
+
// clamp (force reasoning_effort "none" under response_format) is LIFTED:
|
|
207
|
+
// canary-verified live that fireworks masks ONLY the content channel — the
|
|
208
|
+
// reasoning channel rides beside it unmasked, and the plurnk grammar's
|
|
209
|
+
// reasoning?/preplan regions absorb any in-band spillover. The old measured
|
|
210
|
+
// failures (low→cycles, high→spirals) were pre-max_tokens-cap; with a bounded
|
|
211
|
+
// cap the matrix ACCEPTs across efforts (reasoning-rails matrix
|
|
212
|
+
// F9). Clamping was the root of the plan-less regression (service#331).
|
|
213
|
+
#reasoningBody() {
|
|
214
|
+
const { mode, budget } = this.#reasoning;
|
|
215
|
+
const on = mode !== "off";
|
|
216
|
+
switch (this.#reasoningStyle) {
|
|
217
|
+
// Native-channel styles. "template" ALWAYS emits — the explicit
|
|
218
|
+
// enable_thinking:false is the only working off-switch on llama-server
|
|
219
|
+
// (§13). Activation only; budget is enforced by the box's
|
|
220
|
+
// --reasoning-budget launch flag (per-request numerics ignored, F7).
|
|
221
|
+
//
|
|
222
|
+
// #488 postmortem: intent maps IDENTICALLY under a transported
|
|
223
|
+
// grammar. The brief rails-win-the-channel clamp (enable_thinking
|
|
224
|
+
// forced false under a grammar) is REVERTED — specimens proved the
|
|
225
|
+
// SANCTIONED think block is the protection, not the hazard: the
|
|
226
|
+
// server auto-gates the grammar around it and content decodes
|
|
227
|
+
// constrained (26-run baseline green; zero grammar rejects across
|
|
228
|
+
// the #488 "railless" specimens). Closing the channel starved a
|
|
229
|
+
// reasoning-tuned model into ESCAPING mid-content into the raw
|
|
230
|
+
// thought channel — discarded server-side, decode unconstrained,
|
|
231
|
+
// 12,288 tokens billed for 1,033 visible chars. The escape is
|
|
232
|
+
// surfaced instead (vanished-token telemetry + meta rail state).
|
|
233
|
+
case "template": return { chat_template_kwargs: { enable_thinking: on } };
|
|
234
|
+
case "think": return on ? { think: true } : {};
|
|
235
|
+
case "include_reasoning": return on ? { include_reasoning: true } : {};
|
|
236
|
+
// effort tiers from the budget; off/adaptive omit the field (the
|
|
237
|
+
// API's default depth is its adaptive).
|
|
238
|
+
case "effort": return mode === "on" ? { reasoning_effort: effortFromBudget(budget) } : {};
|
|
239
|
+
// Fireworks enum: OFF is sent EXPLICITLY ("none") — omission leaves a
|
|
240
|
+
// reason-by-default model (DeepSeek V4: default 'high') reasoning (#30).
|
|
241
|
+
// ADAPTIVE omits the field: the backend's own default posture IS the
|
|
242
|
+
// adaptive semantics, and the literal "adaptive" is MiniMax-M3-only —
|
|
243
|
+
// fireworks 400s it for every other model (wire-verified, #403; the
|
|
244
|
+
// 1.0.2 adaptive default refused to boot on it). V4 gotcha: integer
|
|
245
|
+
// efforts 400.
|
|
246
|
+
case "effort_explicit": return mode === "off"
|
|
247
|
+
? { reasoning_effort: "none" }
|
|
248
|
+
: mode === "on" ? { reasoning_effort: effortFromBudget(budget) } : {};
|
|
249
|
+
// Anthropic compat: explicit thinking object. off → disabled; on →
|
|
250
|
+
// enabled with budget_tokens; adaptive → omit (the API default).
|
|
251
|
+
case "anthropic": return mode === "off"
|
|
252
|
+
? { thinking: { type: "disabled" } }
|
|
253
|
+
: mode === "on" ? { thinking: { type: "enabled", budget_tokens: budget } } : {};
|
|
254
|
+
case "none": return {};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// Per-run slot affinity (#11): the consumer passes WHICH run this is; the
|
|
258
|
+
// provider owns WHICH slot serves it. Sticky per workerId, round-robin across
|
|
259
|
+
// new runs (distinct runs → distinct slots while slots last), LRU-bounded
|
|
260
|
+
// bookkeeping so a long-lived daemon never grows the map unboundedly —
|
|
261
|
+
// an evicted-and-returning run simply re-pins, worst case one cold prefill.
|
|
262
|
+
#runSlots = new Map();
|
|
263
|
+
#nextSlot = 0;
|
|
264
|
+
#slotBody(workerId) {
|
|
265
|
+
if (!this.#supportsSlotPinning || this.#slotCount === null || this.#slotCount < 1)
|
|
266
|
+
return {};
|
|
267
|
+
let slot = this.#runSlots.get(workerId);
|
|
268
|
+
if (slot === undefined) {
|
|
269
|
+
slot = this.#nextSlot++ % this.#slotCount;
|
|
270
|
+
if (this.#runSlots.size >= this.#slotCount * 8) {
|
|
271
|
+
this.#runSlots.delete(this.#runSlots.keys().next().value);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
this.#runSlots.delete(workerId); // re-insert to refresh LRU recency
|
|
276
|
+
}
|
|
277
|
+
this.#runSlots.set(workerId, slot);
|
|
278
|
+
return { id_slot: slot };
|
|
279
|
+
}
|
|
280
|
+
// Optional local llama-server GBNF transport (SPEC §13). Unsupported
|
|
281
|
+
// backends receive no grammar-related field.
|
|
282
|
+
#grammarBody(grammar) {
|
|
283
|
+
if (grammar === undefined)
|
|
284
|
+
return {};
|
|
285
|
+
switch (this.#grammarStyle) {
|
|
286
|
+
// Greedy decoding under hard constraint loops without a repeat-penalty
|
|
287
|
+
// floor (#9, SPEC §13) — llama.cpp spells it `repeat_penalty`.
|
|
288
|
+
case "llamacpp": return { grammar, repeat_penalty: this.#repeatPenalty };
|
|
289
|
+
case "none": return {};
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
// Anti-degeneration DEFAULT on EVERY request (#426), keyed to the backend's wire
|
|
293
|
+
// convention - NOT grammar-bound. GBNF is a local constraint, so a cloud
|
|
294
|
+
// alias runs the sampler bare: firefast (deepseek/fireworks) ran 4/86 bench turns
|
|
295
|
+
// straight to the token cap on pure looped repetition (run52). Ships next to
|
|
296
|
+
// temperature so caller `sampling` can tune it; the grammar path re-asserts it as a
|
|
297
|
+
// managed FLOOR in #grammarBody. llama.cpp takes the repeat_penalty
|
|
298
|
+
// MULTIPLIER; the plain cloud path ("none") can't, so it gets
|
|
299
|
+
// frequency_penalty - OpenAI-standard, accepted by every OpenAI-compat backend (verified
|
|
300
|
+
// live: together/deepinfra/fireworks; it is OpenAI's own param, so real OpenAI takes it too).
|
|
301
|
+
#repetitionPenaltyBody() {
|
|
302
|
+
switch (this.#grammarStyle) {
|
|
303
|
+
// #567: repeat_penalty + optional DRY (repeated-SEQUENCE penalty) + a wider
|
|
304
|
+
// repeat_last_n window — the loop-breaking tools a llama.cpp backend serves.
|
|
305
|
+
// Each rides only when its operator knob is set; absent = the box's default.
|
|
306
|
+
case "llamacpp": return {
|
|
307
|
+
repeat_penalty: this.#repeatPenalty,
|
|
308
|
+
...(this.#repeatLastN !== undefined ? { repeat_last_n: this.#repeatLastN } : {}),
|
|
309
|
+
...(this.#dryMultiplier !== undefined && this.#dryMultiplier > 0 ? {
|
|
310
|
+
dry_multiplier: this.#dryMultiplier,
|
|
311
|
+
...(this.#dryBase !== undefined ? { dry_base: this.#dryBase } : {}),
|
|
312
|
+
...(this.#dryAllowedLength !== undefined ? { dry_allowed_length: this.#dryAllowedLength } : {}),
|
|
313
|
+
} : {}),
|
|
314
|
+
};
|
|
315
|
+
case "none": return this.#frequencyPenalty > 0 ? { frequency_penalty: this.#frequencyPenalty } : {};
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
// First-party telemetry headers (SPEC §5): forwarded ONLY when the spec
|
|
319
|
+
// opted in (the plurnk endpoint). The gate is here, not at the call site, so
|
|
320
|
+
// attributions/client/strikes can never reach a third-party backend even if
|
|
321
|
+
// the consumer passes them to the wrong provider. Empty values emit no header
|
|
322
|
+
// — EXCEPT strikes, where 0 is a real value (clean streak) distinct from
|
|
323
|
+
// absent (consumer didn't report); contract per plurnk-service#313. Strikes
|
|
324
|
+
// ride HTTP headers only — the packet never carries them (the model must
|
|
325
|
+
// never see strike state; engine accounting is not a metric to game).
|
|
326
|
+
#metadataHeaders(attributions, client, strikes, workerId, primaryWorkerId, workspaceId, loop, turn) {
|
|
327
|
+
if (!this.#firstPartyMetadata)
|
|
328
|
+
return {};
|
|
329
|
+
const h = {};
|
|
330
|
+
if (attributions !== undefined && attributions.length > 0)
|
|
331
|
+
h["Plurnk-Attribution"] = JSON.stringify(attributions);
|
|
332
|
+
if (client !== undefined && client.length > 0)
|
|
333
|
+
h["Plurnk-Client"] = client;
|
|
334
|
+
if (strikes !== undefined && Number.isInteger(strikes) && strikes >= 0)
|
|
335
|
+
h["Plurnk-Strikes"] = String(strikes);
|
|
336
|
+
// Worker identity (#26, wire-name completed #486/#511): the opaque workerId
|
|
337
|
+
// the consumer already supplies, forwarded so the endpoint can key
|
|
338
|
+
// per-worker affinity/telemetry — same gate as every first-party signal.
|
|
339
|
+
h["Plurnk-Worker-Id"] = workerId;
|
|
340
|
+
// Root worker of the lineage (#522): the no-parent ancestor of this turn's
|
|
341
|
+
// worker tree. The consumer classifies primary-vs-spawned by equality
|
|
342
|
+
// (primaryWorkerId == workerId ⇒ the primary/root worker). The provider
|
|
343
|
+
// EMITS what the consumer supplies and never invents a primary; the
|
|
344
|
+
// consumer's contract is to stamp it EVERY turn (including the primary's
|
|
345
|
+
// own, where it equals workerId). Absence is the consumer's violation for
|
|
346
|
+
// the endpoint to surface, not a provider default.
|
|
347
|
+
if (primaryWorkerId !== undefined && primaryWorkerId.length > 0)
|
|
348
|
+
h["Plurnk-Worker-Primary"] = primaryWorkerId;
|
|
349
|
+
// Turn coordinate (#404, extends #26 per #391): workspace/loop/turn, the
|
|
350
|
+
// daemon-side sequence the endpoint can never scrape from the wire.
|
|
351
|
+
// Coordinates are 1-based — 0 is not a real value, so no strikes-style
|
|
352
|
+
// zero exception; absent/empty/0 emits no header.
|
|
353
|
+
if (workspaceId !== undefined && workspaceId.length > 0)
|
|
354
|
+
h["Plurnk-Workspace-Id"] = workspaceId;
|
|
355
|
+
if (loop !== undefined && Number.isInteger(loop) && loop >= 1)
|
|
356
|
+
h["Plurnk-Loop"] = String(loop);
|
|
357
|
+
if (turn !== undefined && Number.isInteger(turn) && turn >= 1)
|
|
358
|
+
h["Plurnk-Turn"] = String(turn);
|
|
359
|
+
return h;
|
|
360
|
+
}
|
|
361
|
+
// Enforcement verification (SPEC §13). When a grammar was actually transported
|
|
362
|
+
// (grammarStyle !== "none"), the backend MUST have constrained the output;
|
|
363
|
+
// some silently drop the grammar field or mislabel the channel, and without
|
|
364
|
+
// this check we would return unconstrained output as if enforced. STRICT: any
|
|
365
|
+
// non-accept verdict (reject, or an incomplete/never-terminated match) is a
|
|
366
|
+
// grammar_unenforced failure. A grammar our own validator can't parse — even
|
|
367
|
+
// though the backend accepted it (a port-vs-llama.cpp gap) — is a non-fatal
|
|
368
|
+
// verify gap: warn, don't fail a transport that may have worked. This is a
|
|
369
|
+
// conformance check against the grammar we already hold, NOT a plurnk-DSL
|
|
370
|
+
// parse (§8) — it stays grammar-generic and backend-agnostic.
|
|
371
|
+
// Validate output against the grammar. Returns the verdict, or null on the
|
|
372
|
+
// verify GAP — a grammar our own validator can't parse (a port-vs-llama.cpp
|
|
373
|
+
// gap): warn, don't manufacture a conflict from a check that didn't run.
|
|
374
|
+
#grammarVerdict(grammar, content) {
|
|
375
|
+
try {
|
|
376
|
+
return validateGbnf(grammar, content);
|
|
377
|
+
}
|
|
378
|
+
catch (cause) {
|
|
379
|
+
// Once per (code, message) — #40: this fires PER TURN otherwise.
|
|
380
|
+
emitWarningOnce(`${this.#source}: could not verify grammar enforcement — the transported grammar did not parse in @plurnk/gbnf (${cause.message})`, "PLURNK_GRAMMAR_UNVERIFIABLE");
|
|
381
|
+
return null;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
// PLURNK_PROVIDERS_GBNF_DEBUG (SPEC §13): validate the supplied GBNF locally and fail
|
|
385
|
+
// hard if it's malformed, BEFORE any wire call — and the grammar is NOT
|
|
386
|
+
// transported, so the request runs unconstrained. A debug aid to catch invalid
|
|
387
|
+
// grammars (e.g. while editing the plurnk grammar) without a model round-trip;
|
|
388
|
+
// off in production. `validateGbnf(grammar, "")` parses the grammar + resolves
|
|
389
|
+
// its root, throwing iff the grammar itself is invalid (the empty input's
|
|
390
|
+
// verdict is irrelevant — we only care that parsing succeeded).
|
|
391
|
+
#assertGrammarValid(grammar) {
|
|
392
|
+
try {
|
|
393
|
+
validateGbnf(grammar, "");
|
|
394
|
+
}
|
|
395
|
+
catch (cause) {
|
|
396
|
+
throw new Error(`grammar validation (PLURNK_PROVIDERS_GBNF_DEBUG): invalid GBNF — ${cause.message}`, { cause });
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// Per-turn metadata bag (#23): pass the backend's non-standard top-level fields
|
|
400
|
+
// through verbatim. Providers do not reinterpret vendor currency or account
|
|
401
|
+
// metadata; a monetary value carries its own amount and currency.
|
|
402
|
+
#buildMeta(chunkMetadata) {
|
|
403
|
+
const meta = { ...chunkMetadata };
|
|
404
|
+
return Object.keys(meta).length > 0 ? meta : undefined;
|
|
405
|
+
}
|
|
406
|
+
// Caller-supplied OpenAI-compat sampling params (temperature, top_p, top_k,
|
|
407
|
+
// penalties, stop, seed, …) merged UNDER the managed body: model, messages,
|
|
408
|
+
// reasoning, grammar (+ its repeat-penalty floor), max_tokens and slot always
|
|
409
|
+
// win, and reserved transport/protocol keys are stripped so the passthrough
|
|
410
|
+
// can't smuggle a grammar, a stream toggle, or a backend slot (SPEC §8).
|
|
411
|
+
#samplingBody(sampling) {
|
|
412
|
+
if (sampling === undefined)
|
|
413
|
+
return {};
|
|
414
|
+
const out = {};
|
|
415
|
+
for (const [k, v] of Object.entries(sampling))
|
|
416
|
+
if (!RESERVED_BODY_KEYS.has(k))
|
|
417
|
+
out[k] = v;
|
|
418
|
+
return out;
|
|
419
|
+
}
|
|
420
|
+
async generate({ messages, workerId, primaryWorkerId, signal, grammar, maxTokens, attributions, client, strikes, workspaceId, loop, turn, sampling }) {
|
|
421
|
+
// Boundary validation (SPEC §2): the worker identity is required.
|
|
422
|
+
if (workerId === undefined || workerId.length === 0)
|
|
423
|
+
throw new Error("generate: workerId is required — the worker's stable, opaque identity");
|
|
424
|
+
// Reject before any wire call when already aborted (SPEC §10.8).
|
|
425
|
+
signal?.throwIfAborted();
|
|
426
|
+
// Grammar handling (SPEC §13). PLURNK_PROVIDERS_GBNF_DEBUG validates the supplied
|
|
427
|
+
// grammar locally and throws on a malformed one, then WITHHOLDS it so the
|
|
428
|
+
// model generates UNCONSTRAINED — and the free output is still verified
|
|
429
|
+
// against the grammar (below), surfacing exactly where the model's natural
|
|
430
|
+
// output and the grammar conflict. Otherwise the grammar is sent when the
|
|
431
|
+
// backend supports it (grammarStyle !== "none").
|
|
432
|
+
const wantGrammar = grammar !== undefined && this.#grammarStyle !== "none";
|
|
433
|
+
if (wantGrammar && this.#gbnfDebug)
|
|
434
|
+
this.#assertGrammarValid(grammar);
|
|
435
|
+
const sendGrammar = wantGrammar && !this.#gbnfDebug ? grammar : undefined;
|
|
436
|
+
// Assembly order = precedence: the family's sampling DEFAULTS
|
|
437
|
+
// (PLURNK_PROVIDERS_TEMPERATURE — universal, #30 measured it on grammar
|
|
438
|
+
// paths and the name promises every request) < the caller's `sampling`
|
|
439
|
+
// < the managed fields, which always win.
|
|
440
|
+
const body = {
|
|
441
|
+
// #507: floors suppressed on router-owned-tuning providers (plurnk) —
|
|
442
|
+
// the router's per-model tuning must not be overridden by client floors.
|
|
443
|
+
...(this.#tuningFloors ? { temperature: this.#temperature, ...this.#repetitionPenaltyBody() } : {}),
|
|
444
|
+
...this.#samplingBody(sampling),
|
|
445
|
+
...(this.#serviceTier !== undefined ? { service_tier: this.#serviceTier } : {}),
|
|
446
|
+
model: this.#model,
|
|
447
|
+
messages,
|
|
448
|
+
...this.#reasoningBody(),
|
|
449
|
+
...this.#grammarBody(sendGrammar),
|
|
450
|
+
...(maxTokens !== undefined ? { max_tokens: maxTokens } : {}),
|
|
451
|
+
// #36: request per-token logprobs only when enabled (managed field —
|
|
452
|
+
// reserved from caller sampling; the env flag is the single control).
|
|
453
|
+
...(this.#topLogprobs !== null ? { logprobs: true, top_logprobs: this.#topLogprobs } : {}),
|
|
454
|
+
...this.#slotBody(workerId),
|
|
455
|
+
// #518: prompt-cache affinity -- workerId as the OpenAI-standard
|
|
456
|
+
// prompt_cache_key routes a worker's turns to one serverless replica so
|
|
457
|
+
// its stable prefix caches (managed; reserved from caller sampling).
|
|
458
|
+
...(this.#promptCacheKey ? { prompt_cache_key: workerId } : {}),
|
|
459
|
+
};
|
|
460
|
+
// Per-request headers = static auth/routing + any first-party telemetry.
|
|
461
|
+
const metaHeaders = this.#metadataHeaders(attributions, client, strikes, workerId, primaryWorkerId, workspaceId, loop, turn);
|
|
462
|
+
const headers = Object.keys(metaHeaders).length > 0 ? { ...this.#headers, ...metaHeaders } : this.#headers;
|
|
463
|
+
let raw;
|
|
464
|
+
try {
|
|
465
|
+
raw = this.#languageModel === undefined
|
|
466
|
+
? await executeOpenAICompatible({
|
|
467
|
+
url: this.#url,
|
|
468
|
+
model: this.#model,
|
|
469
|
+
headers,
|
|
470
|
+
body,
|
|
471
|
+
messages,
|
|
472
|
+
signal,
|
|
473
|
+
fetch: this.#fetch,
|
|
474
|
+
fetchTimeoutMs: this.#fetchTimeoutMs,
|
|
475
|
+
streamIdleTimeoutMs: this.#streamIdleTimeoutMs,
|
|
476
|
+
retryAttempts: this.#retryAttempts,
|
|
477
|
+
streaming: this.#streaming,
|
|
478
|
+
captureRawBody: this.#rawBody,
|
|
479
|
+
})
|
|
480
|
+
: await executeAiSdkModel({
|
|
481
|
+
languageModel: this.#languageModel,
|
|
482
|
+
headers,
|
|
483
|
+
messages,
|
|
484
|
+
signal,
|
|
485
|
+
fetchTimeoutMs: this.#fetchTimeoutMs,
|
|
486
|
+
streamIdleTimeoutMs: this.#streamIdleTimeoutMs,
|
|
487
|
+
retryAttempts: this.#retryAttempts,
|
|
488
|
+
streaming: this.#streaming,
|
|
489
|
+
captureRawBody: this.#rawBody,
|
|
490
|
+
temperature: this.#tuningFloors
|
|
491
|
+
? (typeof sampling?.temperature === "number" ? sampling.temperature : this.#temperature)
|
|
492
|
+
: typeof sampling?.temperature === "number" ? sampling.temperature : undefined,
|
|
493
|
+
topP: typeof sampling?.top_p === "number" ? sampling.top_p : undefined,
|
|
494
|
+
topK: typeof sampling?.top_k === "number" ? sampling.top_k : undefined,
|
|
495
|
+
presencePenalty: typeof sampling?.presence_penalty === "number" ? sampling.presence_penalty : undefined,
|
|
496
|
+
frequencyPenalty: typeof sampling?.frequency_penalty === "number"
|
|
497
|
+
? sampling.frequency_penalty
|
|
498
|
+
: this.#tuningFloors && this.#frequencyPenalty > 0 ? this.#frequencyPenalty : undefined,
|
|
499
|
+
stopSequences: typeof sampling?.stop === "string"
|
|
500
|
+
? [sampling.stop]
|
|
501
|
+
: Array.isArray(sampling?.stop) && sampling.stop.every((value) => typeof value === "string")
|
|
502
|
+
? sampling.stop
|
|
503
|
+
: undefined,
|
|
504
|
+
seed: typeof sampling?.seed === "number" ? sampling.seed : undefined,
|
|
505
|
+
maxOutputTokens: maxTokens,
|
|
506
|
+
reasoning: this.#reasoning.mode === "off"
|
|
507
|
+
? "none"
|
|
508
|
+
: this.#reasoning.mode === "adaptive"
|
|
509
|
+
? "provider-default"
|
|
510
|
+
: effortFromBudget(this.#reasoning.budget),
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
catch (err) {
|
|
514
|
+
if (signal?.aborted)
|
|
515
|
+
throw err;
|
|
516
|
+
const pe = toProviderError(err, this.#source);
|
|
517
|
+
if ((pe.status === 401 || pe.status === 403) && this.#hasApiKey && this.#apiKeyRejectedMessage !== undefined) {
|
|
518
|
+
throw new ProviderError(this.#source, "unauthorized", this.#apiKeyRejectedMessage, { status: pe.status, cause: err });
|
|
519
|
+
}
|
|
520
|
+
throw pe;
|
|
521
|
+
}
|
|
522
|
+
// #539: llama-server --special renders EOG tokens as text, so a turn ending
|
|
523
|
+
// via raw EOS carries a trailing <eos> the grammar never sanctioned - it both
|
|
524
|
+
// false-rejects the rail verdict and leaks a control token into the packet.
|
|
525
|
+
// Strip the server-reported eos_token from the tail ONCE, before the verdict
|
|
526
|
+
// grades it and before it reaches assistant/packet. rawBody keeps the verbatim
|
|
527
|
+
// wire text for forensics.
|
|
528
|
+
if (this.#eosText !== undefined)
|
|
529
|
+
raw.content = stripTrailingSpecial(raw.content, this.#eosText);
|
|
530
|
+
// Grammar conformance (§13): bytes always flow; the verdict is an
|
|
531
|
+
// observation. Same check whether the grammar was transported
|
|
532
|
+
// (sendGrammar) or withheld (PLURNK_PROVIDERS_GBNF_DEBUG filter mode) — a
|
|
533
|
+
// non-accept verdict attaches a grammar_unenforced telemetry event
|
|
534
|
+
// (message + divergence position) and the response returns normally.
|
|
535
|
+
// Discard/retry/escalate/self-correct is the consumer's policy.
|
|
536
|
+
let telemetry;
|
|
537
|
+
let railsMeta;
|
|
538
|
+
const usage = raw.usage;
|
|
539
|
+
const observedGrammar = sendGrammar ?? (wantGrammar && this.#gbnfDebug ? grammar : undefined);
|
|
540
|
+
if (observedGrammar !== undefined) {
|
|
541
|
+
const verdict = this.#grammarVerdict(observedGrammar, raw.content);
|
|
542
|
+
if (verdict !== null && verdict.status !== "accept") {
|
|
543
|
+
telemetry = [{ source: this.#source, kind: "grammar_unenforced", message: describeUnenforced(verdict), position: verdict.pos }];
|
|
544
|
+
}
|
|
545
|
+
// #488 per-request loud state: rail attachment + conformance verdict
|
|
546
|
+
// ride `meta` into the consumer's turn row, so a drill reads rail
|
|
547
|
+
// presence PER TURN from the run db instead of inferring it from
|
|
548
|
+
// output shape (the #488 misdiagnosis, twice).
|
|
549
|
+
railsMeta = { railsAttached: sendGrammar !== undefined, railsVerdict: verdict?.status ?? "unverifiable" };
|
|
550
|
+
// #488 channel-escape detector (the run105 class): completion tokens
|
|
551
|
+
// billed far beyond every visible channel mean the decode ESCAPED into
|
|
552
|
+
// a server-discarded reasoning block mid-emission — unconstrained,
|
|
553
|
+
// invisible, billed (12,288 billed vs 1,033 chars visible, live).
|
|
554
|
+
// countTokens OVERCOUNTS text (chars/2 upper bound), so billed
|
|
555
|
+
// exceeding visible-plus-slack is real vanishing, not estimator noise.
|
|
556
|
+
const visible = this.#countTokens(raw.content) + this.#countTokens(raw.reasoning);
|
|
557
|
+
if (sendGrammar !== undefined && usage.completion > visible + 64) {
|
|
558
|
+
(telemetry ??= []).push({
|
|
559
|
+
source: this.#source,
|
|
560
|
+
kind: "grammar_unenforced",
|
|
561
|
+
message: `decode escaped the grammar: ${usage.completion} completion tokens billed but only ~${visible} visible across content+reasoning — the balance ran unconstrained in a discarded reasoning channel`,
|
|
562
|
+
position: [...raw.content].length,
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
const builtMeta = this.#buildMeta(raw.metadata);
|
|
567
|
+
const meta = railsMeta !== undefined ? { ...builtMeta, ...railsMeta } : builtMeta;
|
|
568
|
+
const logprobs = raw.logprobs.length > 0 ? raw.logprobs : undefined;
|
|
569
|
+
const meanLogprob = logprobs !== undefined
|
|
570
|
+
? logprobs.reduce((sum, token) => sum + token.logprob, 0) / logprobs.length
|
|
571
|
+
: undefined;
|
|
572
|
+
return {
|
|
573
|
+
assistant: {
|
|
574
|
+
content: raw.content,
|
|
575
|
+
reasoning: raw.reasoning.length > 0 ? raw.reasoning : null,
|
|
576
|
+
...(raw.reasoningEncrypted.length > 0
|
|
577
|
+
? { reasoningEncrypted: raw.reasoningEncrypted }
|
|
578
|
+
: {}),
|
|
579
|
+
usage,
|
|
580
|
+
finishReason: raw.finishReason,
|
|
581
|
+
model: raw.model,
|
|
582
|
+
...(logprobs !== undefined ? { logprobs, meanLogprob } : {}),
|
|
583
|
+
},
|
|
584
|
+
assistantRaw: raw,
|
|
585
|
+
...(raw.rawBody !== undefined ? { rawBody: raw.rawBody } : {}),
|
|
586
|
+
...(meta !== undefined ? { meta } : {}),
|
|
587
|
+
...(telemetry !== undefined ? { telemetry } : {}),
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
//# sourceMappingURL=AiSdkProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AiSdkProvider.js","sourceRoot":"","sources":["../src/AiSdkProvider.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,oEAAoE;AACpE,wEAAwE;AACxE,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,iEAAiE;AAIjE,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,OA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AAC,CAAC,SAAS,CAAC;QAEhB,OAAO;YACH,SAAS,EAAE;gBACP,OAAO,EAAE,GAAG,CAAC,OAAO;gBACpB,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;gBAC1D,GAAG,CAAC,GAAG,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC;oBACjC,CAAC,CAAC,EAAE,kBAAkB,EAAE,GAAG,CAAC,kBAAkB,EAAE;oBAChD,CAAC,CAAC,EAAE,CAAC;gBACT,KAAK;gBACL,YAAY,EAAE,GAAG,CAAC,YAAY;gBAC9B,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC/D;YACD,YAAY,EAAE,GAAG;YACjB,GAAG,CAAC,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvC,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACpD,CAAC;IACN,CAAC;CACJ"}
|
package/dist/Mock.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export default class Mock implements Provider {
|
|
|
34
34
|
get completionReserve(): number | null;
|
|
35
35
|
get model(): string;
|
|
36
36
|
countTokens(text: string): number;
|
|
37
|
-
|
|
37
|
+
calculateCost(_usage: ProviderUsage): number;
|
|
38
38
|
generate({ signal }: {
|
|
39
39
|
messages: ChatMessage[];
|
|
40
40
|
workerId?: string;
|