mycomesh-consumer 0.1.35 → 0.1.36
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/package.json +1 -1
- package/src/consumer-runtime.mjs +5 -2
- package/src/consumer.mjs +1 -1
package/package.json
CHANGED
package/src/consumer-runtime.mjs
CHANGED
|
@@ -358,8 +358,11 @@ function normalizeInferenceOptions(endpoint, options) {
|
|
|
358
358
|
if (typeof options !== "object" || Array.isArray(options)) {
|
|
359
359
|
throw new Error("inference request options must be a JSON object");
|
|
360
360
|
}
|
|
361
|
+
const requestOptions = Object.fromEntries(
|
|
362
|
+
Object.entries(options).filter(([key]) => !RESPONSES_LOCAL_OPTION_FIELDS.has(key)),
|
|
363
|
+
);
|
|
361
364
|
if (endpoint !== "responses") {
|
|
362
|
-
if (Object.keys(
|
|
365
|
+
if (Object.keys(requestOptions).length) {
|
|
363
366
|
throw new Error("inference request options are supported only for responses");
|
|
364
367
|
}
|
|
365
368
|
return null;
|
|
@@ -369,7 +372,7 @@ function normalizeInferenceOptions(endpoint, options) {
|
|
|
369
372
|
if (unknown.length) throw new Error(`unsupported Responses request options: ${unknown.join(", ")}`);
|
|
370
373
|
const normalized = {};
|
|
371
374
|
for (const key of [...RESPONSES_REQUEST_OPTION_FIELDS].sort()) {
|
|
372
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
375
|
+
if (Object.prototype.hasOwnProperty.call(requestOptions, key)) normalized[key] = requestOptions[key];
|
|
373
376
|
}
|
|
374
377
|
return Object.keys(normalized).length ? normalized : null;
|
|
375
378
|
}
|
package/src/consumer.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
createConsumerServer,
|
|
12
12
|
} from "./consumer-runtime.mjs";
|
|
13
13
|
|
|
14
|
-
export const CONSUMER_RELEASE_VERSION = "0.1.
|
|
14
|
+
export const CONSUMER_RELEASE_VERSION = "0.1.36";
|
|
15
15
|
export const API_COMMANDS = new Set(["health", "models", "responses", "chat"]);
|
|
16
16
|
const API_VALUE_OPTIONS = new Set([
|
|
17
17
|
"--base-url",
|