@yzj01/llm-router 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +257 -62
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +257 -62
- package/dist/index.js.map +1 -1
- package/dist/{proxy-CrRX9deF.d.ts → proxy-CpR5cxND.d.ts} +27 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -197,7 +197,32 @@ declare function hashRequestContent(content: string, toolNames?: string[]): stri
|
|
|
197
197
|
*/
|
|
198
198
|
declare function deriveSessionId(headers: Record<string, string | string[] | undefined>, messages: unknown[]): string | undefined;
|
|
199
199
|
|
|
200
|
-
declare const VERSION = "1.0.
|
|
200
|
+
declare const VERSION = "1.0.2";
|
|
201
|
+
/**
|
|
202
|
+
* `startProxy()` 实际运行时使用的完整限制集合。
|
|
203
|
+
*
|
|
204
|
+
* 这里把每个限制都解析成必填字段,避免请求处理路径再去分支判断默认值。
|
|
205
|
+
*/
|
|
206
|
+
type ProxyRuntimeLimits = {
|
|
207
|
+
/**
|
|
208
|
+
* 允许单个客户端请求体占用的最大 UTF-8 字节数。
|
|
209
|
+
*/
|
|
210
|
+
maxBodyBytes: number;
|
|
211
|
+
/**
|
|
212
|
+
* 允许客户端在请求体读取阶段占用连接的最长时间。
|
|
213
|
+
*/
|
|
214
|
+
bodyReadTimeoutMs: number;
|
|
215
|
+
/**
|
|
216
|
+
* 单次上游请求允许占用的最长时间。
|
|
217
|
+
*
|
|
218
|
+
* 超时后 proxy 会主动 abort 当前 fetch,并把它转换成面向客户端的 504。
|
|
219
|
+
*/
|
|
220
|
+
upstreamRequestTimeoutMs: number;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* 调用方可按需覆盖的运行时限制输入。
|
|
224
|
+
*/
|
|
225
|
+
type ProxyRuntimeLimitInput = Partial<ProxyRuntimeLimits>;
|
|
201
226
|
/**
|
|
202
227
|
* 启动本地 HTTP proxy 所需的全部输入。
|
|
203
228
|
*/
|
|
@@ -205,6 +230,7 @@ type ProxyOptions = {
|
|
|
205
230
|
config: RawConfig;
|
|
206
231
|
traceLogger?: TraceLogger;
|
|
207
232
|
session?: Partial<SessionConfig>;
|
|
233
|
+
runtimeLimits?: ProxyRuntimeLimitInput;
|
|
208
234
|
};
|
|
209
235
|
/**
|
|
210
236
|
* 已启动 proxy 的可关闭句柄。
|
package/openclaw.plugin.json
CHANGED