@plurnk/plurnk-providers 1.16.5 → 1.18.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/.env.defaults +87 -200
- package/README.md +2 -1
- package/SPEC.md +73 -66
- package/dist/AiSdkProvider.d.ts +0 -1
- package/dist/AiSdkProvider.d.ts.map +1 -1
- package/dist/AiSdkProvider.js +25 -55
- package/dist/AiSdkProvider.js.map +1 -1
- package/dist/AiSdkRequestBody.d.ts +0 -1
- package/dist/AiSdkRequestBody.d.ts.map +1 -1
- package/dist/AiSdkRequestBody.js +1 -17
- package/dist/AiSdkRequestBody.js.map +1 -1
- package/dist/LeadingReasoning.d.ts +16 -0
- package/dist/LeadingReasoning.d.ts.map +1 -0
- package/dist/LeadingReasoning.js +81 -0
- package/dist/LeadingReasoning.js.map +1 -0
- package/dist/aiSdkTransport.d.ts +7 -0
- package/dist/aiSdkTransport.d.ts.map +1 -1
- package/dist/aiSdkTransport.js +19 -5
- package/dist/aiSdkTransport.js.map +1 -1
- package/dist/catalogProvider.d.ts +3 -1
- package/dist/catalogProvider.d.ts.map +1 -1
- package/dist/catalogProvider.js +24 -18
- package/dist/catalogProvider.js.map +1 -1
- package/dist/compatibleProvider.d.ts.map +1 -1
- package/dist/compatibleProvider.js +0 -3
- package/dist/compatibleProvider.js.map +1 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +0 -1
- package/dist/env.js.map +1 -1
- package/dist/errors.d.ts +6 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +46 -15
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/providerError.d.ts +1 -1
- package/dist/providerError.d.ts.map +1 -1
- package/dist/providerError.js +3 -0
- package/dist/providerError.js.map +1 -1
- package/dist/sdkModels.d.ts +1 -13
- package/dist/sdkModels.d.ts.map +1 -1
- package/dist/sdkModels.js +2 -94
- package/dist/sdkModels.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +18 -9
- package/dist/usage.js.map +1 -1
- package/docs/models.md +90 -0
- package/package.json +6 -6
- package/src/AiSdkProvider.test.ts +99 -38
- package/src/AiSdkProvider.ts +24 -78
- package/src/AiSdkRequestBody.ts +1 -16
- package/src/LeadingReasoning.test.ts +34 -0
- package/src/LeadingReasoning.ts +87 -0
- package/src/ProviderRegistry.test.ts +19 -1
- package/src/aiSdkTransport.test.ts +56 -0
- package/src/aiSdkTransport.ts +31 -5
- package/src/boundaries.test.ts +1 -0
- package/src/catalogProvider.test.ts +110 -20
- package/src/catalogProvider.ts +40 -18
- package/src/compatibleProvider.ts +0 -3
- package/src/env.test.ts +1 -0
- package/src/env.ts +1 -2
- package/src/errors.test.ts +58 -7
- package/src/errors.ts +55 -18
- package/src/index.ts +2 -2
- package/src/providerError.ts +4 -0
- package/src/sdkModels.test.ts +1 -42
- package/src/sdkModels.ts +1 -123
- package/src/types.ts +8 -10
- package/src/usage.ts +23 -15
package/.env.defaults
CHANGED
|
@@ -1,178 +1,112 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# $XDG_CONFIG_HOME/plurnk/.env or ./.env. A key
|
|
7
|
-
# claimed by two packages crashes boot naming both.
|
|
8
|
-
#
|
|
9
|
-
# EVERY PLURNK_PROVIDERS_* knob is per-alias-scopable: PLURNK_PROVIDERS_<KNOB>_<alias> wins over
|
|
10
|
-
# the bare name (suffix case-folds; SPEC §4). Set lines are the floor; commented lines are values
|
|
11
|
-
# whose UNSET state is meaningful (derive/auto/off, or a required secret) - uncomment to pin.
|
|
12
|
-
#
|
|
13
|
-
# Models.dev supplies cataloged providers' SDK package, endpoint, credential names,
|
|
14
|
-
# and model facts. {§model-fact-resolution} defines precedence per fact; there is
|
|
15
|
-
# no live price fetch. Secret VALUES never belong here.
|
|
1
|
+
# @plurnk/plurnk-providers — models, generation, and transport.
|
|
2
|
+
# Per-model knobs accept _<alias> overrides; nonempty overrides win, alias case-insensitively.
|
|
3
|
+
# Provider declarations (PROVIDER_<NAME>_*) apply to that provider, not one alias.
|
|
4
|
+
# Models.dev supplies known endpoints, credential names, limits, capabilities, and prices.
|
|
5
|
+
# Active lines are defaults. Commented lines are optional examples, not loaded values.
|
|
16
6
|
|
|
17
|
-
# ---
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
|
|
7
|
+
# --- Model selection ---
|
|
8
|
+
# PLURNK_MODEL accepts an exact provider/model route or a declared alias.
|
|
9
|
+
# The model id may contain "/". Aliases provide reusable endpoint/tuning scopes.
|
|
10
|
+
# PLURNK_MODEL_cloud=openrouter/qwen/qwen3-coder
|
|
11
|
+
# PLURNK_MODEL_local=openai/model-name-from-endpoint
|
|
12
|
+
# PLURNK_BASEURL_local=http://127.0.0.1:8080/v1
|
|
13
|
+
# PLURNK_MODEL=cloud
|
|
14
|
+
# PLURNK_MODEL=google/gemini-3-flash
|
|
23
15
|
|
|
24
|
-
# ---
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
# capped by known model output limits. REASONING_BUDGET is an optional subset of that
|
|
28
|
-
# total; leave it unset for provider-adaptive depth. Both are alias-scopable.
|
|
16
|
+
# --- Capacity ---
|
|
17
|
+
# Total output envelope INCLUDING reasoning: positive tokens or context percentage in (0,100).
|
|
18
|
+
# Known model limits cap it. Must leave input capacity; the context budget is derived, not set here.
|
|
29
19
|
PLURNK_PROVIDERS_OUTPUT_BUDGET=35%
|
|
20
|
+
# Optional reasoning subset of output, using the same units; must be smaller than total output.
|
|
21
|
+
# Unset/empty = provider-adaptive budget, not reasoning off.
|
|
30
22
|
# PLURNK_PROVIDERS_REASONING_BUDGET=8192
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
# PLURNK_PROVIDERS_COST=input=0.22,output=0.66,reasoning=0.66,cacheRead=0.007
|
|
23
|
+
# Total context cap, tokens; unset = live endpoint capacity, then Models.dev, otherwise unknown.
|
|
24
|
+
# A cap can reduce known capacity or declare unknown capacity; it cannot enlarge known limits.
|
|
25
|
+
# PLURNK_PROVIDERS_CONTEXT_WINDOW=200000
|
|
35
26
|
|
|
36
|
-
# ---
|
|
37
|
-
# off | adaptive | low | medium | high.
|
|
38
|
-
# adaptive
|
|
39
|
-
# provider's supported high posture. Alias-scoped values seed a worker once.
|
|
27
|
+
# --- Reasoning ---
|
|
28
|
+
# off | adaptive | low | medium | high | xhigh | max. Seed for durable Worker reasoning.
|
|
29
|
+
# adaptive uses native dynamic reasoning where supported, otherwise the supported high posture.
|
|
40
30
|
PLURNK_PROVIDERS_REASONING=adaptive
|
|
41
|
-
|
|
42
|
-
#
|
|
43
|
-
# from request-side reasoning activation. The portable floor trusts only
|
|
44
|
-
# structured provider/SDK reasoning fields and leaves visible content verbatim.
|
|
45
|
-
# Set think-tags only on an alias whose exact model/endpoint contract emits one
|
|
46
|
-
# leading <think> envelope; it is never inferred from generic reasoning capability.
|
|
31
|
+
# Response interpretation: verbatim = trust structured reasoning fields; think-tags = extract one
|
|
32
|
+
# leading <think> envelope. Select only for an endpoint that emits it; independent of activation.
|
|
47
33
|
PLURNK_PROVIDERS_REASONING_RESPONSE_STYLE=verbatim
|
|
48
|
-
# PLURNK_PROVIDERS_REASONING_RESPONSE_STYLE_cfds1=think-tags
|
|
49
34
|
|
|
50
|
-
# ---
|
|
51
|
-
#
|
|
52
|
-
# temperature and no repeat_penalty — the provider's or model's own defaults
|
|
53
|
-
# govern. Set a value (usually per-alias) only from measurement; the reference
|
|
54
|
-
# blocks below carry each local model's measured numbers.
|
|
35
|
+
# --- Sampling ---
|
|
36
|
+
# Temperature; empty = omit, retaining the provider's sampling default.
|
|
55
37
|
PLURNK_PROVIDERS_TEMPERATURE=
|
|
38
|
+
# Repetition penalty; empty = omit. Values above 1 can penalize required verbatim repetition.
|
|
56
39
|
PLURNK_PROVIDERS_REPEAT_PENALTY=
|
|
57
|
-
#
|
|
58
|
-
# optional cloud anti-degeneration tuning. API acceptance
|
|
59
|
-
# permits the field to ride but does not establish its semantic effect, and provider
|
|
60
|
-
# implementations differ. The portable floor is off; enable per alias only from
|
|
61
|
-
# provider documentation or a controlled behavioral experiment.
|
|
40
|
+
# Frequency penalty; 0 = off. Support and effect depend on the endpoint.
|
|
62
41
|
PLURNK_PROVIDERS_FREQUENCY_PENALTY=0
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
42
|
+
# Repeat-penalty window, tokens; unset = endpoint default.
|
|
43
|
+
# PLURNK_PROVIDERS_REPEAT_LAST_N=512
|
|
44
|
+
# llama.cpp DRY repeated-sequence penalty; 0 = off. Nonzero can distort required exact copying.
|
|
45
|
+
PLURNK_PROVIDERS_DRY_MULTIPLIER=0
|
|
46
|
+
# DRY exponential base; unset/empty = endpoint default.
|
|
47
|
+
# PLURNK_PROVIDERS_DRY_BASE=
|
|
48
|
+
# DRY unpenalized sequence length, tokens; unset/empty = endpoint default.
|
|
49
|
+
# PLURNK_PROVIDERS_DRY_ALLOWED_LENGTH=
|
|
50
|
+
|
|
51
|
+
# --- Cache and billing ---
|
|
52
|
+
# Stable Worker affinity on supported routes: 1 = on; 0 = off. Unknown routes get no guessed field.
|
|
70
53
|
PLURNK_PROVIDERS_CACHE_AFFINITY=1
|
|
71
|
-
# Explicit cache writes
|
|
72
|
-
#
|
|
73
|
-
# routes; off requests no explicit cache write. Provider-default lifetime is 5m.
|
|
54
|
+
# Explicit cache writes: stable-system = reusable system boundary on supported Claude routes;
|
|
55
|
+
# off = no explicit writes. This is distinct from affinity and can affect billing.
|
|
74
56
|
PLURNK_PROVIDERS_CACHE_WRITE_POLICY=stable-system
|
|
75
|
-
#
|
|
76
|
-
#
|
|
77
|
-
#
|
|
78
|
-
#
|
|
79
|
-
#
|
|
80
|
-
# tradeoff; DRY_BASE_<alias> and DRY_ALLOWED_LENGTH_<alias> tune that opt-in.
|
|
81
|
-
PLURNK_PROVIDERS_DRY_MULTIPLIER=0
|
|
82
|
-
# PLURNK_PROVIDERS_DRY_BASE_<alias>=
|
|
83
|
-
# PLURNK_PROVIDERS_DRY_ALLOWED_LENGTH_<alias>=
|
|
84
|
-
# REPEAT_LAST_N widens the older repeat_penalty window past the box's default.
|
|
85
|
-
# Set it per alias only from measured model behavior.
|
|
86
|
-
# PLURNK_PROVIDERS_REPEAT_LAST_N_<alias>=512
|
|
57
|
+
# Provider service tier; unset = provider default. Usually set per alias: routing can change cost.
|
|
58
|
+
# PLURNK_PROVIDERS_SERVICE_TIER_myfireworks=priority
|
|
59
|
+
# USD per million tokens, merged over Models.dev rates; omitted categories retain catalog values.
|
|
60
|
+
# Supported keys: input, output, reasoning, cacheRead, cacheWrite. This is estimation, not billing truth.
|
|
61
|
+
# PLURNK_PROVIDERS_COST=input=0.22,output=0.66,reasoning=0.66,cacheRead=0.007
|
|
87
62
|
|
|
88
|
-
# --- Connectivity
|
|
89
|
-
#
|
|
90
|
-
# and retry delay. Zero disables this outer deadline; caller cancellation still
|
|
91
|
-
# spans the operation. The floor leaves all four ten-minute attempts plus normal
|
|
92
|
-
# backoff available under the three-retry floor.
|
|
63
|
+
# --- Connectivity (milliseconds; each deadline accepts 0 = off) ---
|
|
64
|
+
# Logical generation deadline, including physical attempts and retry delays.
|
|
93
65
|
PLURNK_PROVIDERS_OPERATION_TIMEOUT=2700000
|
|
94
|
-
#
|
|
95
|
-
# per-attempt deadline without changing the operation deadline.
|
|
66
|
+
# Deadline per physical generation attempt.
|
|
96
67
|
PLURNK_PROVIDERS_FETCH_TIMEOUT=600000
|
|
97
|
-
#
|
|
98
|
-
# Transport metadata and empty deltas do not satisfy it. The portable floor
|
|
99
|
-
# allows endpoints that intentionally buffer a full attempt; tighten per alias
|
|
100
|
-
# from measured time-to-first-content. Zero disables it.
|
|
68
|
+
# Wait from stream start to first semantic content; metadata/empty deltas do not count.
|
|
101
69
|
PLURNK_PROVIDERS_FIRST_CONTENT_TIMEOUT=180000
|
|
102
|
-
# Maximum silence
|
|
103
|
-
# begins. Zero disables it. Both content deadlines consume the ordinary retry
|
|
104
|
-
# budget when they expire.
|
|
70
|
+
# Maximum silence between semantic content chunks after content begins.
|
|
105
71
|
PLURNK_PROVIDERS_STREAM_IDLE_TIMEOUT=120000
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
# X-Should-Retry:true; 0 = surface even those at once. Every other failure (5xx, deadlines, network) surfaces on
|
|
109
|
-
# the first attempt — the engine's {§provider-recovery} owns re-issue and park.
|
|
72
|
+
# Retries for 429, Retry-After, or X-Should-Retry:true; 0 = none. Other failures return immediately
|
|
73
|
+
# to Core's separate recovery window. Retry-After takes precedence over backoff.
|
|
110
74
|
PLURNK_PROVIDERS_RETRY_ATTEMPTS=3
|
|
111
|
-
# Maximum characters
|
|
112
|
-
# public Problem detail. Structured failure facts are not truncated.
|
|
75
|
+
# Maximum upstream diagnostic characters in public errors; structured facts remain complete.
|
|
113
76
|
PLURNK_PROVIDERS_ERROR_DETAIL_LIMIT=512
|
|
114
|
-
|
|
115
|
-
# --- Endpoint probe (#34) ---
|
|
116
|
-
# GET /v1/models at construction (context window + llama-server fingerprint). One failure
|
|
117
|
-
# must never decide capability: ATTEMPTS retries with DELAY(ms) backoff base.
|
|
77
|
+
# Local endpoint /v1/models probe attempts (capacity and llama-server detection).
|
|
118
78
|
PLURNK_PROVIDERS_PROBE_ATTEMPTS=3
|
|
79
|
+
# Initial probe backoff, ms.
|
|
119
80
|
PLURNK_PROVIDERS_PROBE_DELAY=250
|
|
120
81
|
|
|
121
|
-
# ---
|
|
122
|
-
#
|
|
123
|
-
# transport is detected or pinned. Cloud and endpoint-managed model settings do
|
|
124
|
-
# not use this knob.
|
|
125
|
-
# Rails on a weak model need a recency reminder or turns death-march to the
|
|
126
|
-
# token ceiling ({§gbnf-forced-march}): put in the Recap footer (core
|
|
127
|
-
# PLURNK_SERVICE_RECAP) a line such as
|
|
128
|
-
# YOU MUST begin with `## PLAN0` and end with `### SEND0 [status code]`
|
|
129
|
-
# PLURNK_PROVIDERS_GBNF=plurnk.qwen.gbnf
|
|
130
|
-
# Debug toggle: validate but withhold a configured local GBNF, then report the
|
|
131
|
-
# unconstrained output's divergence. Development aid; leave unset in production.
|
|
132
|
-
# PLURNK_PROVIDERS_GBNF_DEBUG=0
|
|
133
|
-
|
|
134
|
-
# --- Window ({§model-fact-resolution}) ---
|
|
135
|
-
# Effective total context envelope. Unset derives natural capacity from a live endpoint probe
|
|
136
|
-
# (n_ctx) or models.dev, else null (surfaced once via PLURNK_CONTEXT_UNKNOWN). A configured
|
|
137
|
-
# value is a final hard cap on known capacity or declares the envelope when unknown. Model-facing
|
|
138
|
-
# curation pressure is separate consumer policy.
|
|
139
|
-
# PLURNK_PROVIDERS_CONTEXT_WINDOW=200000
|
|
140
|
-
|
|
141
|
-
# --- llama-server detection pin (#34) ---
|
|
142
|
-
# Unset = auto-detect from the /v1/models fingerprint. 1 = pin llama-server capabilities
|
|
143
|
-
# (grammar transport, slot pinning, /tokenize) WITHOUT trusting the probe; 0 = force plain
|
|
144
|
-
# remote even when the fingerprint matches. Usually per-alias: _<alias>.
|
|
82
|
+
# --- Local endpoints and grammar ---
|
|
83
|
+
# llama-server: unset = detect; 1 = pin capabilities; 0 = force plain compatible transport.
|
|
145
84
|
# PLURNK_PROVIDERS_LLAMA_SERVER=1
|
|
85
|
+
# Path of an operator-written GBNF grammar carried verbatim to a llama-server route; unset/0 = none.
|
|
86
|
+
# The service ships no grammar profile; a bare name is an error. Per alias: PLURNK_PROVIDERS_GBNF_<alias>.
|
|
87
|
+
# PLURNK_PROVIDERS_GBNF=~/.config/plurnk/my-rail.gbnf
|
|
146
88
|
|
|
147
|
-
# ---
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
-
# on response.rawBody (keeps sampling_logprob/token_id/bytes the digest drops).
|
|
153
|
-
# PLURNK_PROVIDERS_TOP_LOGPROBS_myscraper=3
|
|
154
|
-
# PLURNK_PROVIDERS_RAWBODY_myscraper=1
|
|
89
|
+
# --- Evidence capture ---
|
|
90
|
+
# OpenAI top_logprobs: off/unset = none; 0 = chosen token only; N > 0 = alternatives.
|
|
91
|
+
# PLURNK_PROVIDERS_TOP_LOGPROBS=3
|
|
92
|
+
# Retain raw wire body: unset/empty/0 = off; other values = on. Usually isolate to one capture alias.
|
|
93
|
+
# PLURNK_PROVIDERS_RAWBODY=1
|
|
155
94
|
|
|
156
|
-
# --- Provider declarations
|
|
157
|
-
#
|
|
158
|
-
#
|
|
159
|
-
#
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
# package defaults never redefine a cataloged NPM, BASE_URL, or credential name.
|
|
165
|
-
# Fireworks reasoners default on when reasoning_effort is omitted; explicit
|
|
166
|
-
# "none" is its off switch. This is a declared wire exception, not a registry.
|
|
95
|
+
# --- Provider declarations ---
|
|
96
|
+
# Override known facts or declare an uncataloged provider. NAME is the route's provider segment.
|
|
97
|
+
# API_KEY_ENV names a variable, never its secret value.
|
|
98
|
+
# PLURNK_PROVIDERS_PROVIDER_ACME_NPM=@ai-sdk/openai-compatible
|
|
99
|
+
# PLURNK_PROVIDERS_PROVIDER_ACME_BASE_URL=https://api.acme.example/v1
|
|
100
|
+
# PLURNK_PROVIDERS_PROVIDER_ACME_API_KEY_ENV=ACME_API_KEY
|
|
101
|
+
# Reasoning wire adaptations that are not expressed by catalog metadata:
|
|
102
|
+
# Fireworks requires an explicit off effort; Cloudflare graded models require an effort.
|
|
167
103
|
PLURNK_PROVIDERS_PROVIDER_FIREWORKS_AI_REASONING_STYLE=effort_explicit
|
|
168
|
-
# Cloudflare graded reasoners require an effort value; Models.dev supplies each
|
|
169
|
-
# route's exact vocabulary and routes without graded control use their default.
|
|
170
104
|
PLURNK_PROVIDERS_PROVIDER_CLOUDFLARE_WORKERS_AI_REASONING_STYLE=effort_required
|
|
171
|
-
#
|
|
172
|
-
# (comma-separated: none, minimal, low, medium, high, xhigh, max); the daemon adds none.
|
|
105
|
+
# Additional supported Cloudflare effort values, comma-separated; empty = Models.dev only.
|
|
173
106
|
PLURNK_PROVIDERS_PROVIDER_CLOUDFLARE_WORKERS_AI_REASONING_EFFORTS=
|
|
174
|
-
# Direct DeepSeek
|
|
107
|
+
# Direct DeepSeek thinking activation and effort.
|
|
175
108
|
PLURNK_PROVIDERS_PROVIDER_DEEPSEEK_REASONING_STYLE=thinking_effort
|
|
109
|
+
# Uncataloged compatible providers: SDK, endpoint, and credential-variable name.
|
|
176
110
|
PLURNK_PROVIDERS_PROVIDER_BAICHUAN_NPM=@ai-sdk/openai-compatible
|
|
177
111
|
PLURNK_PROVIDERS_PROVIDER_BAICHUAN_BASE_URL=https://api.baichuan-ai.com/v1
|
|
178
112
|
PLURNK_PROVIDERS_PROVIDER_BAICHUAN_API_KEY_ENV=BAICHUAN_API_KEY
|
|
@@ -180,61 +114,14 @@ PLURNK_PROVIDERS_PROVIDER_QIANFAN_NPM=@ai-sdk/openai-compatible
|
|
|
180
114
|
PLURNK_PROVIDERS_PROVIDER_QIANFAN_BASE_URL=https://qianfan.baidubce.com/v2
|
|
181
115
|
PLURNK_PROVIDERS_PROVIDER_QIANFAN_API_KEY_ENV=QIANFAN_API_KEY
|
|
182
116
|
|
|
183
|
-
# ---
|
|
184
|
-
#
|
|
185
|
-
# contain "/"). PLURNK_MODEL accepts that exact route or a declared alias. An
|
|
186
|
-
# alias is useful when the route needs a reusable name, endpoint, or scoped tuning.
|
|
187
|
-
# Operator-specific, no default - the examples are commented.
|
|
188
|
-
# PLURNK_MODEL_gemma=openai/macher.gguf
|
|
189
|
-
# PLURNK_MODEL_opus=anthropic/claude-opus-4-8
|
|
190
|
-
# PLURNK_MODEL_sonnet=openrouter/anthropic/claude-sonnet-latest
|
|
191
|
-
# PLURNK_MODEL=gemma
|
|
192
|
-
# PLURNK_MODEL=google/gemini-3-flash
|
|
193
|
-
#
|
|
194
|
-
# PLURNK_BASEURL_<alias> - bind an endpoint to ONE alias (the only way to run N self-hosted
|
|
195
|
-
# boxes of one provider: openai=llama.cpp/vLLM, ollama). WINS over the provider's *_BASE_URL;
|
|
196
|
-
# a dangling override fails hard.
|
|
197
|
-
# PLURNK_MODEL_HAZEL1=openai/qwen2.5-coder
|
|
198
|
-
# PLURNK_BASEURL_HAZEL1=http://hazel1:8080/v1
|
|
199
|
-
# PLURNK_MODEL_NOOK=ollama/qwen2.5-coder
|
|
200
|
-
# PLURNK_BASEURL_NOOK=http://nook:11434
|
|
201
|
-
|
|
202
|
-
# The compatible `openai` and first-party `plurnk` adapters are intentionally
|
|
203
|
-
# local contracts rather than catalog declarations. OpenAI defaults to its
|
|
204
|
-
# canonical endpoint; override it per alias for llama-server or vLLM.
|
|
117
|
+
# --- Compatible and first-party endpoints ---
|
|
118
|
+
# OpenAI-compatible fallback endpoint; PLURNK_BASEURL_<alias> overrides it for one declared alias.
|
|
205
119
|
OPENAI_BASE_URL=https://api.openai.com/v1
|
|
206
|
-
#
|
|
120
|
+
# First-party Plurnk endpoint; authentication uses optional PLURNK_API_KEY in the operator environment.
|
|
207
121
|
PLURNK_BASE_URL=https://plurnk.ai/v1
|
|
208
|
-
# PLURNK_BASE_URL=http://plurnksnr2kihuukt6v22ko72r34dxeatbsfhgow3hvnlw6btanxphad.onion/v1 # Tor
|
|
209
122
|
|
|
210
|
-
# ---
|
|
211
|
-
#
|
|
212
|
-
|
|
213
|
-
#
|
|
214
|
-
|
|
215
|
-
# template switch on the openai-compatible provider, and a thinking budget must ride or the
|
|
216
|
-
# model may skip its thought channel entirely (2026-08-26: empty channel, twelve-op shotgun).
|
|
217
|
-
# Gemma model-card sampling: temperature 1.0, top_k 64, top_p 0.95 (top_k/top_p are server flags).
|
|
218
|
-
# PLURNK_MODEL_rtxgemma=openai/<gguf name exactly as /v1/models lists it>
|
|
219
|
-
# PLURNK_PROVIDERS_PROVIDER_OPENAI_REASONING_STYLE=template
|
|
220
|
-
# PLURNK_PROVIDERS_GBNF_rtxgemma=plurnk.gemma.gbnf
|
|
221
|
-
# PLURNK_PROVIDERS_REASONING_BUDGET_rtxgemma=4096
|
|
222
|
-
# PLURNK_PROVIDERS_OUTPUT_BUDGET_rtxgemma=8192 # a runaway SEND body ends here (~40 s), not at 35% of the context
|
|
223
|
-
# PLURNK_PROVIDERS_TEMPERATURE_rtxgemma=1.0
|
|
224
|
-
# PLURNK_PROVIDERS_REPEAT_PENALTY_rtxgemma=1.0 # the grammar demands exact repetition; a penalty above 1.0 fights it
|
|
225
|
-
#
|
|
226
|
-
# qwen 3.8 (llama-server, rail plurnk.qwen.gbnf — <think> syntax; Qwen template profile #243).
|
|
227
|
-
# Qwen model-card sampling, thinking mode: temperature 0.6, top_p 0.95, top_k 20, min_p 0;
|
|
228
|
-
# never greedy; presence_penalty 0-2 against repetition (top_p/top_k/min_p are server flags).
|
|
229
|
-
# PLURNK_MODEL_qwen38=openai/<gguf name exactly as /v1/models lists it>
|
|
230
|
-
# PLURNK_PROVIDERS_PROVIDER_OPENAI_REASONING_STYLE=template
|
|
231
|
-
# PLURNK_PROVIDERS_GBNF_qwen38=plurnk.qwen.gbnf
|
|
232
|
-
# Reasoning disposition rides into the Qwen3.8 chat template as its own variable. The template
|
|
233
|
-
# knows three rungs: xhigh (its default; 'high' is an alias) injects "consider plausible
|
|
234
|
-
# alternatives" and dilates to any cap; medium injects nothing; low injects "brief and focused".
|
|
235
|
-
# Measured 2026-09-01 on a packet severed at 16k under xhigh: medium decided in ~560 tokens.
|
|
236
|
-
# PLURNK_PROVIDERS_REASONING_qwen38=medium
|
|
237
|
-
# PLURNK_PROVIDERS_REASONING_BUDGET_qwen38=4096
|
|
238
|
-
# PLURNK_PROVIDERS_OUTPUT_BUDGET_qwen38=8192
|
|
239
|
-
# PLURNK_PROVIDERS_TEMPERATURE_qwen38=0.6
|
|
240
|
-
# PLURNK_PROVIDERS_REPEAT_PENALTY_qwen38=1.0
|
|
123
|
+
# --- OpenRouter application attribution ---
|
|
124
|
+
# Public application URL; empty suppresses attribution, including the title.
|
|
125
|
+
OPENROUTER_HTTP_REFERER=https://github.com/plurnk/plurnk-service
|
|
126
|
+
# Application display name, sent only with a nonempty URL.
|
|
127
|
+
OPENROUTER_APP_TITLE=Plurnk
|
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@ Ordinary provider behavior is intentionally not reimplemented here:
|
|
|
12
12
|
- PLURNK owns aliases, generation envelopes, normalized usage and errors,
|
|
13
13
|
evidence capture, first-party metadata, and local endpoint capabilities.
|
|
14
14
|
|
|
15
|
-
See
|
|
15
|
+
See [SPEC.md](SPEC.md) for the contract, [the model guide](docs/models.md) for
|
|
16
|
+
configuration relationships, and [.env.defaults](.env.defaults) for every knob.
|
|
16
17
|
The package-owned `PLURNK_PROVIDERS_ERROR_DETAIL_LIMIT` bounds upstream
|
|
17
18
|
diagnostic text in public provider Problems.
|
|
18
19
|
|
package/SPEC.md
CHANGED
|
@@ -164,9 +164,9 @@ because PLURNK grammar did not accept it.
|
|
|
164
164
|
adapter opens one durable identity through it immediately before each physical
|
|
165
165
|
I/O and settles that identity with the resulting
|
|
166
166
|
`ProviderRequestAccounting`. This applies to generation retries and capacity
|
|
167
|
-
failover
|
|
167
|
+
failover. The
|
|
168
168
|
observer is a durability sink, not an alternate evidence representation; the
|
|
169
|
-
same ordered records remain on the final generation
|
|
169
|
+
same ordered records remain on the final generation result or
|
|
170
170
|
error.
|
|
171
171
|
|
|
172
172
|
§provider-reasoning-observer When a consumer supplies `observeReasoning`, the
|
|
@@ -208,7 +208,14 @@ explicit alias-scoped response style:
|
|
|
208
208
|
| `think-tags` | `<think>reasoning` with no close, including a capped turn. | The complete post-open tail becomes reasoning; content is empty. |
|
|
209
209
|
|
|
210
210
|
Tag projection never runs when readable structured reasoning is already
|
|
211
|
-
present. Streamed and buffered transports
|
|
211
|
+
present. Streamed and buffered transports use the same leading-envelope parser.
|
|
212
|
+
An enabled tagged projection delivers readable deltas as content chunks arrive,
|
|
213
|
+
holding only incomplete delimiter prefixes; it does not wait for the closing
|
|
214
|
+
tag or response completion. An unfinished closing prefix is literal reasoning
|
|
215
|
+
at EOF. Constrained template calls that retain the grammar sentence use the
|
|
216
|
+
same path for `<think>\n…</think>` and `<|channel>thought\n…<channel|>`.
|
|
217
|
+
Observation resets for each physical request and completed reasoning is not
|
|
218
|
+
replayed. Neither the internal working copy nor its curation supplies this stream.
|
|
212
219
|
When the upstream reports only combined output usage, that value remains
|
|
213
220
|
`outputTokens` and its unavailable text/reasoning detail stays absent. The
|
|
214
221
|
adapter never apportions tokens from character lengths.
|
|
@@ -265,6 +272,12 @@ the `reasoning.max_tokens` form — the only dial a budget_tokens-only route
|
|
|
265
272
|
understands; a fixed policy keeps the `effort` form, and `off` suppresses the
|
|
266
273
|
budget.
|
|
267
274
|
|
|
275
|
+
`catalogReasoningPolicies` projects that same admission calculation from catalog
|
|
276
|
+
facts and provider-wide environment declarations without constructing a model,
|
|
277
|
+
requiring credentials, or performing provider I/O.
|
|
278
|
+
Admission respects the installed projection: native SDK fixed efforts exclude
|
|
279
|
+
`max`; the OpenRouter model-settings projection also excludes `xhigh`.
|
|
280
|
+
|
|
268
281
|
Models.dev's route-specific `reasoning_options` is the capability authority for
|
|
269
282
|
what the daemon offers on its own; the daemon never adds vendor behaviour absent
|
|
270
283
|
from the catalog. The operator may declare efforts a provider's reasoning routes
|
|
@@ -280,17 +293,12 @@ explicit compatible adapter owns the wire projection:
|
|
|
280
293
|
| --- | --- | --- |
|
|
281
294
|
| `reasoning: false` | No reasoning request | `off` |
|
|
282
295
|
| `reasoning_options: []` | Provider default | None |
|
|
283
|
-
| `effort.values` | Native dynamic mechanism, otherwise strongest transportable positive value |
|
|
296
|
+
| `effort.values` | Native dynamic mechanism, otherwise strongest transportable positive value | Transportable fixed members of {§reasoning-policy-wire}; `off` only when `none` is transportable |
|
|
284
297
|
| `toggle` | Native or explicitly declared activation, otherwise provider default | `off` only when that transport owns the toggle wire |
|
|
285
298
|
| `budget_tokens` | Does not select policy | None; an adapter may use its bounds when projecting the independent budget |
|
|
286
299
|
| No catalog entry | Explicit adapter declaration | Only the declaration's exact subset |
|
|
287
300
|
| Operator-declared efforts | Join the catalog's `effort.values` for that provider's reasoning routes | Their exact members, under the transport rule above |
|
|
288
301
|
|
|
289
|
-
The OpenRouter adapter reads neither the generic `reasoning` call setting nor
|
|
290
|
-
provider options for its request; a fixed policy and `off` are represented in
|
|
291
|
-
its model settings (`reasoning: { effort }`, `off` as `none`), and `adaptive`
|
|
292
|
-
sends no reasoning setting on that route.
|
|
293
|
-
|
|
294
302
|
Models.dev identifies the route's controls but not a provider-specific toggle
|
|
295
303
|
or budget field name. The adapter supplies that last-mile mechanism; it never
|
|
296
304
|
invents a cataloged effort value.
|
|
@@ -383,25 +391,6 @@ the global provider configuration. Declared aliases retain their provenance,
|
|
|
383
391
|
endpoint override, and alias-scoped tuning.
|
|
384
392
|
`PLURNK_BASEURL_<alias>` is a per-alias endpoint override.
|
|
385
393
|
|
|
386
|
-
§provider-embedding-resolution Embedding-model construction uses the same
|
|
387
|
-
provider identity, endpoint precedence, credential declaration, environment
|
|
388
|
-
expansion, and readiness predicate as generation-model construction. The
|
|
389
|
-
public resolver returns an AI SDK `EmbeddingModelV4` plus the canonical
|
|
390
|
-
provider/model identity; it does not own dimensions, token windows,
|
|
391
|
-
query/document policy, or vector-space identity. Those are embedding-profile
|
|
392
|
-
facts ({§mimetype-embedding-profile}).
|
|
393
|
-
|
|
394
|
-
| Catalog package | Embedding adapter |
|
|
395
|
-
| --- | --- |
|
|
396
|
-
| AI SDK package with an embedding-model constructor | Its official embedding model. |
|
|
397
|
-
| `@ai-sdk/openai-compatible` | Standard `/embeddings` model using the cataloged or declared base URL and credential. |
|
|
398
|
-
| AI SDK package without embedding support | Precise unsupported-capability failure before transport. |
|
|
399
|
-
|
|
400
|
-
Cloudflare, Fireworks, and a declared local OpenAI-compatible server therefore
|
|
401
|
-
share one adapter family; OpenRouter uses its official SDK embedding surface.
|
|
402
|
-
Provider construction performs no request and never infers model facts from a
|
|
403
|
-
probe.
|
|
404
|
-
|
|
405
394
|
§model-catalog-readiness **Catalog readiness and construction share one local
|
|
406
395
|
configuration predicate.** For each Models.dev provider, readiness evaluates
|
|
407
396
|
the same effective credential names, endpoint template coordinates, base-URL
|
|
@@ -520,12 +509,12 @@ A provider plugin:
|
|
|
520
509
|
§provider-grammar-transport A plugin whose backend accepts a llama.cpp-style
|
|
521
510
|
GBNF grammar may declare `plurnk.grammarStyle: "llamacpp"` beside its kind and
|
|
522
511
|
name; the discovery records it and the adapted Provider carries the capability,
|
|
523
|
-
so an operator
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
admission.
|
|
512
|
+
so an operator's grammar file ({§operator-grammar}) rides the wire exactly as
|
|
513
|
+
on a probed llama-server. Absence or `"none"` keeps the grammar off the wire;
|
|
514
|
+
any other value fails discovery loudly. The declaration is the plugin author's
|
|
515
|
+
fact about their backend; the transport evidence on each response
|
|
516
|
+
({§provider-grammar-evidence}) is where a wrong declaration shows, never by
|
|
517
|
+
degrading admission.
|
|
529
518
|
|
|
530
519
|
PLURNK adapts the returned language model. The plugin does not implement the
|
|
531
520
|
PLURNK `Provider`, read PLURNK tuning knobs, or reproduce transport policy.
|
|
@@ -628,6 +617,20 @@ normal value. Retry exhaustion is preserved as `attempts` and
|
|
|
628
617
|
`retryExhausted`, and the resulting Problem is not marked retryable after the
|
|
629
618
|
provider has consumed its automatic retry budget.
|
|
630
619
|
|
|
620
|
+
§provider-failure-cause **The wrapper's cause is evidence, bounded.** The SDK
|
|
621
|
+
reports every processing failure of a 2xx body with one message ("Failed to
|
|
622
|
+
process successful response") and keeps what happened as `cause`. A normalized
|
|
623
|
+
Problem carries that cause as a bounded classification — `cause.causeKind` is
|
|
624
|
+
`transport_terminated` (the body ended under a successful status),
|
|
625
|
+
`invalid_json`, `schema_invalid`, `invalid_response_data`, or `internal`, with
|
|
626
|
+
the cause's error name and one bounded line of its message — so forensics can
|
|
627
|
+
tell an interrupted stream from a malformed body without the kind changing:
|
|
628
|
+
classification of the Problem (`providerKind`, retryability, accounting) is
|
|
629
|
+
untouched by this evidence. The SDK's parse and validation messages embed the
|
|
630
|
+
payload, so those two report shape (character count, the validator's issue
|
|
631
|
+
line), never response text; no headers, credentials, stack frames, or body
|
|
632
|
+
dumps enter any Problem. Covered by `errors.test.ts` (#593).
|
|
633
|
+
|
|
631
634
|
§provider-capacity-failure A proven exact preflight overflow and an upstream
|
|
632
635
|
context rejection normalize to `ProviderError(kind="capacity_exceeded")` and
|
|
633
636
|
an RFC 9457 status 413. `capacityStage` is `preflight` or `upstream`; a
|
|
@@ -677,7 +680,7 @@ deadline:
|
|
|
677
680
|
| Layer | Operator knob | Boundary | Expiry |
|
|
678
681
|
| --- | --- | --- | --- |
|
|
679
682
|
| Operation | `PLURNK_PROVIDERS_OPERATION_TIMEOUT` | Complete logical call, including every attempt and retry delay. | Final `deadline_exceeded` Problem at 504 with `timeoutPhase=operation`; never retried. Enforced as a race, not only the advisory signal, so a wedged transport that never observes the abort cannot hang the loop past the deadline (#505); a well-behaved transport unwinds within a short grace and settles its own attempt evidence first. |
|
|
680
|
-
| Attempt | `PLURNK_PROVIDERS_FETCH_TIMEOUT` | One physical generation request, including response consumption. | Surfaced `network_failure` with `timeoutPhase=attempt`; never transport-retried (#479) — the consumer's recovery owns re-issue.
|
|
683
|
+
| Attempt | `PLURNK_PROVIDERS_FETCH_TIMEOUT` | One physical generation request, including response consumption. | Surfaced `network_failure` with `timeoutPhase=attempt`; never transport-retried (#479) — the consumer's recovery owns re-issue. |
|
|
681
684
|
| First content | `PLURNK_PROVIDERS_FIRST_CONTENT_TIMEOUT` | Response-stream start through first semantic model content; metadata, empty deltas, and transport activity do not satisfy it. | Surfaced `network_failure` with `timeoutPhase=first_content`; never transport-retried (#479). |
|
|
682
685
|
| Stream idle | `PLURNK_PROVIDERS_STREAM_IDLE_TIMEOUT` | Silence between semantic content chunks after content begins. | Surfaced `network_failure` with `timeoutPhase=stream_idle`; never transport-retried (#479). |
|
|
683
686
|
|
|
@@ -708,6 +711,13 @@ ordinary 5xx surface on the first failure as consumer-recoverable kinds; one
|
|
|
708
711
|
retry authority — the consumer's own provider-recovery machinery — owns
|
|
709
712
|
re-issue, backoff, and park above the transport.
|
|
710
713
|
|
|
714
|
+
§provider-request-rejection An HTTP 4xx rejection not classified as authorization,
|
|
715
|
+
quota, capacity, grammar, rate limit, or transient transport failure is
|
|
716
|
+
`request_rejected`: preserve the upstream status and detail, with `retryable: false`.
|
|
717
|
+
It is not an `invalid_response`; that kind describes a malformed successful
|
|
718
|
+
response. Consumers terminate a rejected request with its exact Problem rather
|
|
719
|
+
than retrying unchanged input or assigning response-contract strikes.
|
|
720
|
+
|
|
711
721
|
### §provider-interrupted-attempt Provider-declared interruption
|
|
712
722
|
|
|
713
723
|
A successful transport response can still declare that inference did not
|
|
@@ -726,37 +736,21 @@ completed exchange.
|
|
|
726
736
|
## §10 Grammar
|
|
727
737
|
|
|
728
738
|
GBNF is a local llama-server capability, not a generic provider expectation.
|
|
729
|
-
The consumer chooses whether to supply a grammar
|
|
730
|
-
rewrites
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
`
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
the
|
|
744
|
-
an empty body therefore remains observable. An endpoint that projects despite
|
|
745
|
-
that request supplies no independent evidence. For an unsplit response, `input`
|
|
746
|
-
is `content` and `contentStart` is zero.
|
|
747
|
-
|
|
748
|
-
§gbnf-forced-march **A grammar masks end-of-generation until the sentence completes — pair rails on a weak model with a recency reminder.** llama-server admits EOG only in a grammar-accepting state, so a model whose intended emission diverges from the required turn shape cannot stop: each masked substitution drifts it further from the terminal, and the request runs to the token ceiling and dies as a length cut (measured 2026-09-01, #477 — the thought budget fires and throughput is unaffected; the march is the grammar's one failure mode, and the weaker the model, the likelier the divergence that triggers it). When enabling a GBNF rail for a model that does not reliably hold the frame shape, put the shape command where recency helps — the operator's Recap footer (core `PLURNK_SERVICE_RECAP`) — for example:
|
|
749
|
-
|
|
750
|
-
```text
|
|
751
|
-
YOU MUST begin with `## PLAN0` and end with `### SEND0 [status code]`
|
|
752
|
-
```
|
|
753
|
-
|
|
754
|
-
A model that emits valid frames freehand needs neither the rail nor the reminder.
|
|
755
|
-
|
|
756
|
-
§gbnf-response-observation The provider transports and represents; it does not grade its own enforcement.
|
|
757
|
-
The consumer validates `grammarEvidence.input` outside the enforcer's failure
|
|
758
|
-
domain. `PLURNK_PROVIDERS_GBNF_DEBUG` still validates grammar syntax before the
|
|
759
|
-
call and sets `transported: false` for the unconstrained comparison.
|
|
739
|
+
The consumer chooses whether to supply a grammar and reads it from the
|
|
740
|
+
operator's own file; the provider never creates, ships, rewrites, validates, or
|
|
741
|
+
grades one (#588). Transport is `{§provider-grammar-transport}`.
|
|
742
|
+
|
|
743
|
+
§provider-grammar-evidence When a grammar-capable adapter receives a grammar,
|
|
744
|
+
`ProviderResponse` carries `grammarEvidence: { input, contentStart, transported }`.
|
|
745
|
+
`input` is the exact pre-projection sentence represented by the response,
|
|
746
|
+
`contentStart` is its Unicode-code-point offset to `assistant.content`, and
|
|
747
|
+
`transported` says whether the grammar was actually sent. Active llama-server
|
|
748
|
+
template reasoning requests the unprojected sentence, records it, and then
|
|
749
|
+
separates its leading enclosure; an empty body therefore remains observable. An
|
|
750
|
+
endpoint that projects despite that request supplies no independent evidence.
|
|
751
|
+
For an unsplit response, `input` is `content` and `contentStart` is zero. This
|
|
752
|
+
is transport evidence so a digest can prove a run was constrained; nothing in
|
|
753
|
+
the service issues a verdict on it.
|
|
760
754
|
|
|
761
755
|
## §11 Evidence and metadata
|
|
762
756
|
|
|
@@ -771,6 +765,19 @@ When enabled, raw per-token model logprob is canonical; alternatives are
|
|
|
771
765
|
preserved when returned. Raw body/chunks preserve wire evidence the normalized
|
|
772
766
|
record omits.
|
|
773
767
|
|
|
768
|
+
§provider-usage-refusal **The provider's bookkeeping is not the exchange.** Usage
|
|
769
|
+
normalization is exact and refuses counters that contradict each other (a
|
|
770
|
+
reasoning detail larger than its output aggregate, a total that disagrees with
|
|
771
|
+
its parts). A refusal is not a request failure: the response is delivered, its
|
|
772
|
+
accounting row carries no `usage` and a cost of kind `unknown` with the reason
|
|
773
|
+
(never an invented, clamped, or zero counter), and the transport record keeps
|
|
774
|
+
`usageRefusal` — the normalizer's reason beside the counters exactly as the
|
|
775
|
+
wire reported them — so the digest can read what the provider said. The same
|
|
776
|
+
holds for the usage inside failure evidence. Before this rule a contradictory
|
|
777
|
+
counter turned a complete response into a retryable `network_failure` and lost
|
|
778
|
+
the response (#580). Covered by `aiSdkTransport.test.ts` and
|
|
779
|
+
`AiSdkProvider.test.ts`.
|
|
780
|
+
|
|
774
781
|
§provider-encrypted-reasoning **Readable reasoning and encrypted reasoning are
|
|
775
782
|
separate.** Encrypted payload bytes remain opaque and are never decoded. The
|
|
776
783
|
provider boundary distinguishes preserved detail evidence from derived entity
|
package/dist/AiSdkProvider.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ export type AiSdkProviderConfig = {
|
|
|
54
54
|
systemCacheProviderOptions?: AiSdkProviderOptions;
|
|
55
55
|
reasoningResponseProviderOptions?: AiSdkProviderOptions;
|
|
56
56
|
serviceTier?: string;
|
|
57
|
-
gbnfDebug?: boolean;
|
|
58
57
|
streaming?: boolean;
|
|
59
58
|
firstPartyMetadata?: boolean;
|
|
60
59
|
apiKeyRejectedMessage?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiSdkProvider.d.ts","sourceRoot":"","sources":["../src/AiSdkProvider.ts"],"names":[],"mappings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