@animalabs/membrane 0.5.55 → 0.5.63
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/dist/formatters/native.d.ts.map +1 -1
- package/dist/formatters/native.js +11 -0
- package/dist/formatters/native.js.map +1 -1
- package/dist/membrane.d.ts +10 -0
- package/dist/membrane.d.ts.map +1 -1
- package/dist/membrane.js +118 -13
- package/dist/membrane.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +83 -2
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/openai-compatible.d.ts.map +1 -1
- package/dist/providers/openai-compatible.js +3 -0
- package/dist/providers/openai-compatible.js.map +1 -1
- package/dist/providers/openai-completions.d.ts.map +1 -1
- package/dist/providers/openai-completions.js +57 -3
- package/dist/providers/openai-completions.js.map +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +3 -0
- package/dist/providers/openai.js.map +1 -1
- package/dist/types/provider.d.ts +9 -0
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/request.d.ts +10 -0
- package/dist/types/request.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/formatters/native.ts +10 -0
- package/src/membrane.ts +129 -13
- package/src/providers/anthropic.ts +87 -3
- package/src/providers/openai-compatible.ts +4 -0
- package/src/providers/openai-completions.ts +58 -2
- package/src/providers/openai.ts +4 -0
- package/src/types/provider.ts +10 -0
- package/src/types/request.ts +12 -1
package/src/types/provider.ts
CHANGED
|
@@ -215,6 +215,9 @@ export interface ProviderRequest {
|
|
|
215
215
|
/** Frequency penalty */
|
|
216
216
|
frequencyPenalty?: number;
|
|
217
217
|
|
|
218
|
+
/** Repetition penalty (multiplicative, vLLM/HuggingFace style) */
|
|
219
|
+
repetitionPenalty?: number;
|
|
220
|
+
|
|
218
221
|
/** Stop sequences */
|
|
219
222
|
stopSequences?: string[];
|
|
220
223
|
|
|
@@ -232,6 +235,13 @@ export interface ProviderRequestOptions {
|
|
|
232
235
|
idleTimeoutMs?: number;
|
|
233
236
|
/** Called with the raw API request body right before fetch */
|
|
234
237
|
onRequest?: (rawRequest: unknown) => void;
|
|
238
|
+
/**
|
|
239
|
+
* Wrap native thinking deltas in <thinking>...</thinking> tags on the
|
|
240
|
+
* onChunk stream. Used by the XML formatter path so its tag-based parser
|
|
241
|
+
* tracks thinking blocks; without this, native thinking content streams
|
|
242
|
+
* indistinguishably from visible text.
|
|
243
|
+
*/
|
|
244
|
+
wrapThinkingTags?: boolean;
|
|
235
245
|
}
|
|
236
246
|
|
|
237
247
|
export interface ProviderResponse {
|
package/src/types/request.ts
CHANGED
|
@@ -30,11 +30,22 @@ export interface GenerationConfig {
|
|
|
30
30
|
|
|
31
31
|
/** Frequency penalty (provider-specific) */
|
|
32
32
|
frequencyPenalty?: number;
|
|
33
|
-
|
|
33
|
+
|
|
34
|
+
/** Repetition penalty — multiplicative (vLLM/HuggingFace style, typically 1.0-1.2) */
|
|
35
|
+
repetitionPenalty?: number;
|
|
36
|
+
|
|
34
37
|
/** Enable thinking/reasoning mode */
|
|
35
38
|
thinking?: {
|
|
36
39
|
enabled: boolean;
|
|
37
40
|
budgetTokens?: number;
|
|
41
|
+
/** Thinking type for the API: 'enabled' (default, explicit budget) or 'adaptive' (model-managed) */
|
|
42
|
+
type?: 'enabled' | 'adaptive';
|
|
43
|
+
/**
|
|
44
|
+
* Controls how thinking content is returned: 'summarized' (readable summary)
|
|
45
|
+
* or 'omitted' (empty thinking field, signature only). Models like Fable 5 /
|
|
46
|
+
* Opus 4.7+ default to 'omitted' — set 'summarized' to receive thinking text.
|
|
47
|
+
*/
|
|
48
|
+
display?: 'summarized' | 'omitted';
|
|
38
49
|
};
|
|
39
50
|
|
|
40
51
|
/** Image generation config (Gemini) */
|