omnius 1.0.354 → 1.0.355
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/index.js +18 -10
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -570895,25 +570895,24 @@ Your hypotheses MUST address this specific error, not generic causes.
|
|
|
570895
570895
|
return best && best.count >= 3 ? best : null;
|
|
570896
570896
|
}
|
|
570897
570897
|
/**
|
|
570898
|
-
* Backend adapter for AUXILIARY inference (adversary critiques,
|
|
570899
|
-
* extraction) — tool-less, think-off, JSON-shaped calls.
|
|
570900
|
-
*
|
|
570901
|
-
*
|
|
570902
|
-
*
|
|
570903
|
-
*
|
|
570904
|
-
*
|
|
570905
|
-
*
|
|
570898
|
+
* Backend adapter for AUXILIARY inference (adversary critiques, resolution
|
|
570899
|
+
* gate, branch extraction) — tool-less, think-off, JSON-shaped calls. Uses the
|
|
570900
|
+
* SAME inference backend the main agent loop uses — whatever provider the user
|
|
570901
|
+
* selected — and only ensures a JSON responseFormat for these structured
|
|
570902
|
+
* calls. Provider-specific quirks (e.g. Ollama /v1 + qwen3 returning an empty
|
|
570903
|
+
* reasoning-only response for tool-less think-off calls) are recovered INSIDE
|
|
570904
|
+
* the backend's own chatCompletion (empty-recovery → native /api/chat
|
|
570905
|
+
* fallback), so no caller here is Ollama-aware.
|
|
570906
570906
|
*/
|
|
570907
570907
|
_auxInferenceBackend() {
|
|
570908
570908
|
const b = this.backend;
|
|
570909
|
-
const useNative = typeof b.nativeOllamaChatCompletion === "function";
|
|
570910
570909
|
return {
|
|
570911
570910
|
chatCompletion: (req3) => {
|
|
570912
570911
|
const r2 = {
|
|
570913
570912
|
...req3,
|
|
570914
570913
|
responseFormat: req3.responseFormat ?? { type: "json_object" }
|
|
570915
570914
|
};
|
|
570916
|
-
return
|
|
570915
|
+
return b.chatCompletion(r2);
|
|
570917
570916
|
}
|
|
570918
570917
|
};
|
|
570919
570918
|
}
|
|
@@ -585983,6 +585982,15 @@ ${description}`
|
|
|
585983
585982
|
const justSuppressed = this._thinkSuppressed && this._thinkFailStreak === _OllamaAgenticBackend._thinkFailThreshold;
|
|
585984
585983
|
const shouldRetryThinkGuard = outcome !== null && effectiveThink === true && (justSuppressed || outcome === "empty_after_strip" || outcome === "unclosed_think");
|
|
585985
585984
|
if (shouldRetryThinkGuard || shouldRecoverFromEmpty) {
|
|
585985
|
+
if (shouldRecoverFromEmpty) {
|
|
585986
|
+
try {
|
|
585987
|
+
const _native = await this.nativeOllamaChatCompletion(request);
|
|
585988
|
+
const _nText = String(_native.choices?.[0]?.message?.content ?? "");
|
|
585989
|
+
if (_nText.trim().length >= 2)
|
|
585990
|
+
return _native;
|
|
585991
|
+
} catch {
|
|
585992
|
+
}
|
|
585993
|
+
}
|
|
585986
585994
|
const retryMessages = injectNoThinkDirective(requestMessages);
|
|
585987
585995
|
const retryBody = {
|
|
585988
585996
|
model: this.model,
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.355",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.355",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED