pi-freeflow 1.1.1 → 1.1.3

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 CHANGED
@@ -166,4 +166,4 @@ cat ~/.pi/agent/pi-freeflow.log | tail -n 30
166
166
 
167
167
  ## 📄 License
168
168
 
169
- MIT © trefeon & verokes
169
+ MIT © trefeon
@@ -160,7 +160,8 @@ function isRetriableStatus(status: number): boolean {
160
160
  status === 408 ||
161
161
  status === 402 ||
162
162
  status === 403 ||
163
- status === 500
163
+ status === 500 ||
164
+ status === 400
164
165
  );
165
166
  }
166
167
 
@@ -931,10 +932,13 @@ function normalizeRequestBody(
931
932
  }
932
933
 
933
934
  // 2. Reasoning normalization
935
+ const modelId = typeof body.model === "string" ? body.model : "";
936
+ const isResponsesApi = modelId === "muse-spark-1.2-contributor-free";
937
+
934
938
  if (typeof body.reasoning_effort === "string") {
935
939
  const re = body.reasoning_effort.toLowerCase();
936
940
  if (re === "xhigh" || re === "max") {
937
- body.reasoning_effort = "max";
941
+ body.reasoning_effort = isResponsesApi ? "xhigh" : (modelId === "x-preview-f-free" ? "max" : "xhigh");
938
942
  } else if (re === "high" || re === "medium") {
939
943
  body.reasoning_effort = "high";
940
944
  } else if (re === "minimal") {
@@ -951,18 +955,21 @@ function normalizeRequestBody(
951
955
  delete r.effort;
952
956
  } else if (typeof r.effort === "string") {
953
957
  const re = r.effort.toLowerCase();
954
- if (re === "xhigh" || re === "max") r.effort = "max";
955
- else if (re === "high" || re === "medium") r.effort = "high";
956
- else if (re === "minimal") r.effort = "minimal";
957
- else r.effort = "low";
958
+ if (re === "xhigh" || re === "max") {
959
+ r.effort = "xhigh"; // OpenCode Zen Responses API strictly requires "xhigh"
960
+ } else if (re === "high" || re === "medium") {
961
+ r.effort = "high";
962
+ } else if (re === "minimal") {
963
+ r.effort = "minimal";
964
+ } else {
965
+ r.effort = "low";
966
+ }
958
967
  }
959
968
  }
960
969
 
961
970
  // 3. Max & Min tokens clamping (model-specific clamp + Vercel relay clamp)
962
- const modelId = typeof body.model === "string" ? body.model : "";
963
971
  const modelDef = MODEL_MAP.get(modelId);
964
972
  const modelMax = modelDef?.maxTokens ?? RELAY_MAX_TOKENS;
965
-
966
973
  const clampTokens = (val: number): number => {
967
974
  let clamped = val;
968
975
  if (!isKilo && clamped < 16) clamped = 16;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "pi-freeflow",
3
3
  "type": "module",
4
- "version": "1.1.1",
4
+ "version": "1.1.3",
5
5
  "description": "Personal multi-cloud rolling fallback relay for OpenCode Zen and KiloCode models in OMP/Pi",
6
6
  "keywords": [
7
7
  "pi-package",
8
8
  "pi-extension",
9
9
  "free-models"
10
10
  ],
11
- "author": "trefeon / verokes",
11
+ "author": "trefeon",
12
12
  "license": "MIT",
13
13
  "repository": {
14
14
  "type": "git",