@relayplane/proxy 1.8.5 → 1.8.7
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/config.d.ts +92 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +26 -0
- package/dist/config.js.map +1 -1
- package/dist/cross-provider-cascade.d.ts +137 -0
- package/dist/cross-provider-cascade.d.ts.map +1 -0
- package/dist/cross-provider-cascade.js +258 -0
- package/dist/cross-provider-cascade.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/ollama.d.ts +264 -0
- package/dist/ollama.d.ts.map +1 -0
- package/dist/ollama.js +510 -0
- package/dist/ollama.js.map +1 -0
- package/dist/rate-limiter.d.ts +87 -9
- package/dist/rate-limiter.d.ts.map +1 -1
- package/dist/rate-limiter.js +262 -28
- package/dist/rate-limiter.js.map +1 -1
- package/dist/standalone-proxy.d.ts +1 -1
- package/dist/standalone-proxy.d.ts.map +1 -1
- package/dist/standalone-proxy.js +334 -28
- package/dist/standalone-proxy.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
* @packageDocumentation
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.mapCloudModelToOllama = exports.convertOllamaStreamChunk = exports.convertOllamaResponse = exports.buildOllamaRequest = exports.convertMessagesToOllama = exports.forwardToOllamaStream = exports.forwardToOllama = exports.resolveOllamaModel = exports.shouldRouteToOllama = exports.clearOllamaHealthCache = exports.checkOllamaHealthCached = exports.checkOllamaHealth = exports.proxyStatsCollector = exports.defaultLogger = exports.resolveConfig = exports.StatusReporter = exports.StatsCollector = exports.probeHealth = exports.handleHealthRequest = exports.ProcessManager = exports.RelayPlaneMiddleware = exports.CircuitBreaker = exports.printTelemetryDisclosure = exports.getTelemetryPath = exports.clearTelemetry = exports.getTelemetryStats = exports.getLocalTelemetry = exports.clearAuditBuffer = exports.getAuditBuffer = exports.isOfflineMode = exports.setOfflineMode = exports.isAuditMode = exports.setAuditMode = exports.estimateCost = exports.inferTaskType = exports.recordTelemetry = exports.getConfigPath = exports.getConfigDir = exports.getApiKey = exports.setApiKey = exports.getDeviceId = exports.disableTelemetry = exports.enableTelemetry = exports.isTelemetryEnabled = exports.markFirstRunComplete = exports.isFirstRun = exports.updateConfig = exports.saveConfig = exports.loadConfig = exports.startProxy = void 0;
|
|
23
|
+
exports.createSandboxedProxyServer = exports.createProxyServer = exports.ProxyServer = exports.CLOUD_TO_OLLAMA_MODEL_MAP = exports.OLLAMA_DEFAULTS = void 0;
|
|
23
24
|
// Standalone proxy (requires only @relayplane/core)
|
|
24
25
|
var standalone_proxy_js_1 = require("./standalone-proxy.js");
|
|
25
26
|
Object.defineProperty(exports, "startProxy", { enumerable: true, get: function () { return standalone_proxy_js_1.startProxy; } });
|
|
@@ -75,6 +76,22 @@ Object.defineProperty(exports, "defaultLogger", { enumerable: true, get: functio
|
|
|
75
76
|
// Proxy stats collector (from standalone proxy)
|
|
76
77
|
var standalone_proxy_js_2 = require("./standalone-proxy.js");
|
|
77
78
|
Object.defineProperty(exports, "proxyStatsCollector", { enumerable: true, get: function () { return standalone_proxy_js_2.proxyStatsCollector; } });
|
|
79
|
+
// Ollama local model provider
|
|
80
|
+
var ollama_js_1 = require("./ollama.js");
|
|
81
|
+
Object.defineProperty(exports, "checkOllamaHealth", { enumerable: true, get: function () { return ollama_js_1.checkOllamaHealth; } });
|
|
82
|
+
Object.defineProperty(exports, "checkOllamaHealthCached", { enumerable: true, get: function () { return ollama_js_1.checkOllamaHealthCached; } });
|
|
83
|
+
Object.defineProperty(exports, "clearOllamaHealthCache", { enumerable: true, get: function () { return ollama_js_1.clearOllamaHealthCache; } });
|
|
84
|
+
Object.defineProperty(exports, "shouldRouteToOllama", { enumerable: true, get: function () { return ollama_js_1.shouldRouteToOllama; } });
|
|
85
|
+
Object.defineProperty(exports, "resolveOllamaModel", { enumerable: true, get: function () { return ollama_js_1.resolveOllamaModel; } });
|
|
86
|
+
Object.defineProperty(exports, "forwardToOllama", { enumerable: true, get: function () { return ollama_js_1.forwardToOllama; } });
|
|
87
|
+
Object.defineProperty(exports, "forwardToOllamaStream", { enumerable: true, get: function () { return ollama_js_1.forwardToOllamaStream; } });
|
|
88
|
+
Object.defineProperty(exports, "convertMessagesToOllama", { enumerable: true, get: function () { return ollama_js_1.convertMessagesToOllama; } });
|
|
89
|
+
Object.defineProperty(exports, "buildOllamaRequest", { enumerable: true, get: function () { return ollama_js_1.buildOllamaRequest; } });
|
|
90
|
+
Object.defineProperty(exports, "convertOllamaResponse", { enumerable: true, get: function () { return ollama_js_1.convertOllamaResponse; } });
|
|
91
|
+
Object.defineProperty(exports, "convertOllamaStreamChunk", { enumerable: true, get: function () { return ollama_js_1.convertOllamaStreamChunk; } });
|
|
92
|
+
Object.defineProperty(exports, "mapCloudModelToOllama", { enumerable: true, get: function () { return ollama_js_1.mapCloudModelToOllama; } });
|
|
93
|
+
Object.defineProperty(exports, "OLLAMA_DEFAULTS", { enumerable: true, get: function () { return ollama_js_1.OLLAMA_DEFAULTS; } });
|
|
94
|
+
Object.defineProperty(exports, "CLOUD_TO_OLLAMA_MODEL_MAP", { enumerable: true, get: function () { return ollama_js_1.CLOUD_TO_OLLAMA_MODEL_MAP; } });
|
|
78
95
|
// Advanced proxy server (requires @relayplane/ledger, @relayplane/auth-gate, etc.)
|
|
79
96
|
var server_js_1 = require("./server.js");
|
|
80
97
|
Object.defineProperty(exports, "ProxyServer", { enumerable: true, get: function () { return server_js_1.ProxyServer; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG
|
|
1
|
+
{"version":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4C;AAAnC,0GAAA,aAAa,OAAA;AAGtB,gDAAgD;AAChD,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,8BAA8B;AAC9B,yCAeqB;AAdnB,8GAAA,iBAAiB,OAAA;AACjB,oHAAA,uBAAuB,OAAA;AACvB,mHAAA,sBAAsB,OAAA;AACtB,gHAAA,mBAAmB,OAAA;AACnB,+GAAA,kBAAkB,OAAA;AAClB,4GAAA,eAAe,OAAA;AACf,kHAAA,qBAAqB,OAAA;AACrB,oHAAA,uBAAuB,OAAA;AACvB,+GAAA,kBAAkB,OAAA;AAClB,kHAAA,qBAAqB,OAAA;AACrB,qHAAA,wBAAwB,OAAA;AACxB,kHAAA,qBAAqB,OAAA;AACrB,4GAAA,eAAe,OAAA;AACf,sHAAA,yBAAyB,OAAA;AAU3B,mFAAmF;AACnF,yCAAyF;AAAhF,wGAAA,WAAW,OAAA;AAAE,8GAAA,iBAAiB,OAAA;AAAE,uHAAA,0BAA0B,OAAA"}
|
package/dist/ollama.d.ts
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ollama Local Model Provider
|
|
3
|
+
*
|
|
4
|
+
* Routes requests to a local Ollama instance for cost-free inference.
|
|
5
|
+
* Handles API format translation between OpenAI-compatible and Ollama's
|
|
6
|
+
* native /api/chat endpoint.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Configurable base URL (default: http://localhost:11434)
|
|
10
|
+
* - Model availability detection with graceful fallback
|
|
11
|
+
* - Complexity-based routing (route "simple" tasks to local models)
|
|
12
|
+
* - OpenAI-compatible response format translation
|
|
13
|
+
* - Streaming support (SSE)
|
|
14
|
+
* - Health checking for availability
|
|
15
|
+
*
|
|
16
|
+
* Ollama API reference: https://github.com/ollama/ollama/blob/main/docs/api.md
|
|
17
|
+
*
|
|
18
|
+
* @packageDocumentation
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Ollama provider configuration.
|
|
22
|
+
*
|
|
23
|
+
* Example in ~/.relayplane/config.json:
|
|
24
|
+
* ```json
|
|
25
|
+
* {
|
|
26
|
+
* "providers": {
|
|
27
|
+
* "ollama": {
|
|
28
|
+
* "baseUrl": "http://localhost:11434",
|
|
29
|
+
* "models": ["llama3.2", "codestral"],
|
|
30
|
+
* "routeWhen": {
|
|
31
|
+
* "complexity": ["simple"]
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* }
|
|
35
|
+
* }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export interface OllamaProviderConfig {
|
|
39
|
+
/** Base URL for the Ollama API (default: http://localhost:11434) */
|
|
40
|
+
baseUrl?: string;
|
|
41
|
+
/** List of available/preferred model names */
|
|
42
|
+
models?: string[];
|
|
43
|
+
/** Routing conditions: when to use Ollama instead of cloud providers */
|
|
44
|
+
routeWhen?: {
|
|
45
|
+
/** Complexity levels that should be routed to Ollama (e.g., ["simple"]) */
|
|
46
|
+
complexity?: string[];
|
|
47
|
+
/** Task types that should be routed to Ollama (e.g., ["question_answering"]) */
|
|
48
|
+
taskTypes?: string[];
|
|
49
|
+
};
|
|
50
|
+
/** Timeout in milliseconds for Ollama requests (default: 120000 = 2 min) */
|
|
51
|
+
timeoutMs?: number;
|
|
52
|
+
/** Default model to use when none specified (default: first in models list) */
|
|
53
|
+
defaultModel?: string;
|
|
54
|
+
/** Enable Ollama provider (default: true when configured) */
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
}
|
|
57
|
+
/** Default Ollama configuration values */
|
|
58
|
+
export declare const OLLAMA_DEFAULTS: {
|
|
59
|
+
readonly baseUrl: "http://localhost:11434";
|
|
60
|
+
readonly timeoutMs: 120000;
|
|
61
|
+
readonly models: string[];
|
|
62
|
+
readonly enabled: true;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Ollama /api/chat request body
|
|
66
|
+
* @see https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-chat-completion
|
|
67
|
+
*/
|
|
68
|
+
interface OllamaChatRequest {
|
|
69
|
+
model: string;
|
|
70
|
+
messages: Array<{
|
|
71
|
+
role: string;
|
|
72
|
+
content: string;
|
|
73
|
+
}>;
|
|
74
|
+
stream: boolean;
|
|
75
|
+
options?: {
|
|
76
|
+
temperature?: number;
|
|
77
|
+
num_predict?: number;
|
|
78
|
+
top_p?: number;
|
|
79
|
+
top_k?: number;
|
|
80
|
+
};
|
|
81
|
+
tools?: unknown[];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Ollama /api/chat response
|
|
85
|
+
*/
|
|
86
|
+
interface OllamaChatResponse {
|
|
87
|
+
model: string;
|
|
88
|
+
message: {
|
|
89
|
+
role: string;
|
|
90
|
+
content: string;
|
|
91
|
+
tool_calls?: Array<{
|
|
92
|
+
function: {
|
|
93
|
+
name: string;
|
|
94
|
+
arguments: Record<string, unknown>;
|
|
95
|
+
};
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
done: boolean;
|
|
99
|
+
total_duration?: number;
|
|
100
|
+
load_duration?: number;
|
|
101
|
+
prompt_eval_count?: number;
|
|
102
|
+
eval_count?: number;
|
|
103
|
+
eval_duration?: number;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Ollama streaming chunk (NDJSON)
|
|
107
|
+
*/
|
|
108
|
+
interface OllamaStreamChunk {
|
|
109
|
+
model: string;
|
|
110
|
+
message: {
|
|
111
|
+
role: string;
|
|
112
|
+
content: string;
|
|
113
|
+
};
|
|
114
|
+
done: boolean;
|
|
115
|
+
total_duration?: number;
|
|
116
|
+
prompt_eval_count?: number;
|
|
117
|
+
eval_count?: number;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Result of an Ollama health/availability check
|
|
121
|
+
*/
|
|
122
|
+
export interface OllamaHealthResult {
|
|
123
|
+
available: boolean;
|
|
124
|
+
models: string[];
|
|
125
|
+
error?: string;
|
|
126
|
+
responseTimeMs?: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Check if the Ollama server is running and list available models.
|
|
130
|
+
* Non-blocking, with a short timeout.
|
|
131
|
+
*/
|
|
132
|
+
export declare function checkOllamaHealth(baseUrl?: string, timeoutMs?: number): Promise<OllamaHealthResult>;
|
|
133
|
+
/**
|
|
134
|
+
* Determine whether a request should be routed to Ollama based on config.
|
|
135
|
+
*
|
|
136
|
+
* @param config - Ollama provider configuration
|
|
137
|
+
* @param complexity - Classified complexity of the request (simple/moderate/complex)
|
|
138
|
+
* @param taskType - Inferred task type
|
|
139
|
+
* @param model - Requested model name (may match an Ollama model)
|
|
140
|
+
*
|
|
141
|
+
* @returns true if the request should be routed to Ollama
|
|
142
|
+
*/
|
|
143
|
+
export declare function shouldRouteToOllama(config: OllamaProviderConfig, complexity?: string, taskType?: string, model?: string): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Resolve the Ollama model name from a requested model string.
|
|
146
|
+
*
|
|
147
|
+
* - "ollama/llama3.2" → "llama3.2"
|
|
148
|
+
* - "llama3.2" (if in models list) → "llama3.2"
|
|
149
|
+
* - Unknown model → defaultModel or first in models list
|
|
150
|
+
*/
|
|
151
|
+
export declare function resolveOllamaModel(requestedModel: string, config: OllamaProviderConfig): string;
|
|
152
|
+
/**
|
|
153
|
+
* Convert OpenAI-format messages to Ollama format.
|
|
154
|
+
*
|
|
155
|
+
* Ollama messages are simpler:
|
|
156
|
+
* - role: "system" | "user" | "assistant"
|
|
157
|
+
* - content: string (no array / multimodal blocks in base API)
|
|
158
|
+
* - Tool calls are passed through for models that support them
|
|
159
|
+
*/
|
|
160
|
+
export declare function convertMessagesToOllama(messages: Array<{
|
|
161
|
+
role: string;
|
|
162
|
+
content: string | unknown;
|
|
163
|
+
[key: string]: unknown;
|
|
164
|
+
}>): Array<{
|
|
165
|
+
role: string;
|
|
166
|
+
content: string;
|
|
167
|
+
}>;
|
|
168
|
+
/**
|
|
169
|
+
* Build an Ollama /api/chat request body from an OpenAI-compatible request.
|
|
170
|
+
*/
|
|
171
|
+
export declare function buildOllamaRequest(model: string, messages: Array<{
|
|
172
|
+
role: string;
|
|
173
|
+
content: string | unknown;
|
|
174
|
+
[key: string]: unknown;
|
|
175
|
+
}>, stream: boolean, options?: {
|
|
176
|
+
temperature?: number;
|
|
177
|
+
max_tokens?: number;
|
|
178
|
+
tools?: unknown[];
|
|
179
|
+
}): OllamaChatRequest;
|
|
180
|
+
/**
|
|
181
|
+
* Convert an Ollama /api/chat response to OpenAI chat completion format.
|
|
182
|
+
*/
|
|
183
|
+
export declare function convertOllamaResponse(ollamaData: OllamaChatResponse, requestedModel: string): Record<string, unknown>;
|
|
184
|
+
/**
|
|
185
|
+
* Convert Ollama NDJSON streaming chunk to OpenAI SSE format.
|
|
186
|
+
*/
|
|
187
|
+
export declare function convertOllamaStreamChunk(chunk: OllamaStreamChunk, messageId: string, isFirst: boolean): string | null;
|
|
188
|
+
/**
|
|
189
|
+
* Forward a non-streaming request to Ollama and return the response
|
|
190
|
+
* translated to OpenAI format.
|
|
191
|
+
*/
|
|
192
|
+
export declare function forwardToOllama(model: string, messages: Array<{
|
|
193
|
+
role: string;
|
|
194
|
+
content: string | unknown;
|
|
195
|
+
[key: string]: unknown;
|
|
196
|
+
}>, options?: {
|
|
197
|
+
temperature?: number;
|
|
198
|
+
max_tokens?: number;
|
|
199
|
+
tools?: unknown[];
|
|
200
|
+
baseUrl?: string;
|
|
201
|
+
timeoutMs?: number;
|
|
202
|
+
}): Promise<{
|
|
203
|
+
success: boolean;
|
|
204
|
+
data?: Record<string, unknown>;
|
|
205
|
+
usage?: {
|
|
206
|
+
prompt_tokens: number;
|
|
207
|
+
completion_tokens: number;
|
|
208
|
+
total_tokens: number;
|
|
209
|
+
};
|
|
210
|
+
error?: {
|
|
211
|
+
code: string;
|
|
212
|
+
message: string;
|
|
213
|
+
status: number;
|
|
214
|
+
retryable: boolean;
|
|
215
|
+
};
|
|
216
|
+
latencyMs: number;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* Forward a streaming request to Ollama.
|
|
220
|
+
* Returns a readable stream of OpenAI-format SSE events.
|
|
221
|
+
*
|
|
222
|
+
* Ollama streams NDJSON (newline-delimited JSON), which we convert
|
|
223
|
+
* to OpenAI SSE (data: {...}\n\n) on the fly.
|
|
224
|
+
*/
|
|
225
|
+
export declare function forwardToOllamaStream(model: string, messages: Array<{
|
|
226
|
+
role: string;
|
|
227
|
+
content: string | unknown;
|
|
228
|
+
[key: string]: unknown;
|
|
229
|
+
}>, options?: {
|
|
230
|
+
temperature?: number;
|
|
231
|
+
max_tokens?: number;
|
|
232
|
+
tools?: unknown[];
|
|
233
|
+
baseUrl?: string;
|
|
234
|
+
timeoutMs?: number;
|
|
235
|
+
}): Promise<{
|
|
236
|
+
success: boolean;
|
|
237
|
+
stream?: AsyncGenerator<string, void, unknown>;
|
|
238
|
+
error?: {
|
|
239
|
+
code: string;
|
|
240
|
+
message: string;
|
|
241
|
+
status: number;
|
|
242
|
+
retryable: boolean;
|
|
243
|
+
};
|
|
244
|
+
}>;
|
|
245
|
+
/**
|
|
246
|
+
* Check Ollama health with caching to avoid excessive probing.
|
|
247
|
+
*/
|
|
248
|
+
export declare function checkOllamaHealthCached(baseUrl?: string): Promise<OllamaHealthResult>;
|
|
249
|
+
/**
|
|
250
|
+
* Clear the health cache (useful for testing or after config changes).
|
|
251
|
+
*/
|
|
252
|
+
export declare function clearOllamaHealthCache(): void;
|
|
253
|
+
/**
|
|
254
|
+
* Map cloud model names to reasonable Ollama equivalents.
|
|
255
|
+
* Used when falling back to Ollama from a cloud provider.
|
|
256
|
+
*/
|
|
257
|
+
export declare const CLOUD_TO_OLLAMA_MODEL_MAP: Record<string, string>;
|
|
258
|
+
/**
|
|
259
|
+
* Map a cloud model name to an Ollama model.
|
|
260
|
+
* Returns the configured default or a reasonable fallback.
|
|
261
|
+
*/
|
|
262
|
+
export declare function mapCloudModelToOllama(cloudModel: string, config: OllamaProviderConfig): string;
|
|
263
|
+
export {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