@victor-software-house/pi-openai-proxy 4.7.0 → 4.7.1

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.
Files changed (2) hide show
  1. package/dist/index.mjs +15 -5
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1247,18 +1247,28 @@ const REASONING_EFFORT_MAP = {
1247
1247
  xhigh: "xhigh"
1248
1248
  };
1249
1249
  /**
1250
- * APIs where onPayload passthrough fields are not supported.
1251
- * These APIs use non-standard request formats that reject standard OpenAI fields.
1250
+ * APIs that use the OpenAI chat completions wire format and accept standard
1251
+ * passthrough fields (stop, seed, top_p, tool_choice, etc.) in the payload.
1252
+ *
1253
+ * Only these APIs receive injected fields via onPayload. All other APIs
1254
+ * (anthropic-messages, google-*, bedrock-*, openai-codex-responses) use
1255
+ * different payload schemas that reject unknown fields.
1252
1256
  */
1253
- const SKIP_PAYLOAD_PASSTHROUGH_APIS = new Set(["openai-codex-responses"]);
1257
+ const OPENAI_COMPLETIONS_COMPATIBLE_APIS = new Set([
1258
+ "openai-completions",
1259
+ "openai-responses",
1260
+ "azure-openai-responses",
1261
+ "mistral-conversations"
1262
+ ]);
1254
1263
  /**
1255
1264
  * Collect fields that need to be injected via onPayload.
1256
- * Skips passthrough for APIs that use non-standard request formats.
1265
+ * Only injects for APIs that use the OpenAI chat completions wire format.
1266
+ * Non-compatible APIs (Anthropic, Google, Bedrock, Codex) reject unknown fields.
1257
1267
  *
1258
1268
  * @internal Exported for unit testing only.
1259
1269
  */
1260
1270
  function collectPayloadFields(request, api) {
1261
- if (SKIP_PAYLOAD_PASSTHROUGH_APIS.has(api)) return;
1271
+ if (!OPENAI_COMPLETIONS_COMPATIBLE_APIS.has(api)) return;
1262
1272
  const fields = {};
1263
1273
  let hasFields = false;
1264
1274
  if (request.stop !== void 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@victor-software-house/pi-openai-proxy",
3
- "version": "4.7.0",
3
+ "version": "4.7.1",
4
4
  "description": "OpenAI-compatible HTTP proxy for pi's multi-provider model registry",
5
5
  "license": "MIT",
6
6
  "author": "Victor Software House",