omnius 1.0.544 → 1.0.545

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 CHANGED
@@ -609852,19 +609852,22 @@ ${description}`
609852
609852
  const responseText2 = firstChoice ? String(firstChoice.message?.content ?? "") : "";
609853
609853
  const outcome = this.recordThinkOutcome(responseText2, effectiveThink === true);
609854
609854
  const independentOutcome = effectiveThink !== true ? classifyThinkOutcome(responseText2) : null;
609855
- const shouldRecoverFromEmpty = request.disableEmptyContentRecovery !== true && responseFormat !== void 0 && independentOutcome !== null && (independentOutcome === "empty_after_strip" || independentOutcome === "unclosed_think");
609855
+ const emptyIndependentOutcome = independentOutcome === "empty_after_strip" || independentOutcome === "unclosed_think";
609856
+ const expectsVisibleContent = responseFormat !== void 0 || (request.tools ?? []).length === 0;
609857
+ const shouldProbeNativeOnEmpty = expectsVisibleContent && emptyIndependentOutcome;
609858
+ const shouldRecoverFromEmpty = request.disableEmptyContentRecovery !== true && shouldProbeNativeOnEmpty;
609856
609859
  const justSuppressed = this._thinkSuppressed && this._thinkFailStreak === _OllamaAgenticBackend._thinkFailThreshold;
609857
609860
  const shouldRetryThinkGuard = outcome !== null && effectiveThink === true && (justSuppressed || outcome === "empty_after_strip" || outcome === "unclosed_think");
609858
- if (shouldRetryThinkGuard || shouldRecoverFromEmpty) {
609859
- if (shouldRecoverFromEmpty) {
609860
- try {
609861
- const _native = await this.nativeOllamaChatCompletion(request);
609862
- const _nText = String(_native.choices?.[0]?.message?.content ?? "");
609863
- if (_nText.trim().length >= 2)
609864
- return _native;
609865
- } catch {
609866
- }
609861
+ if (shouldProbeNativeOnEmpty) {
609862
+ try {
609863
+ const _native = await this.nativeOllamaChatCompletion(request);
609864
+ const _nText = String(_native.choices?.[0]?.message?.content ?? "");
609865
+ if (_nText.trim().length >= 2)
609866
+ return _native;
609867
+ } catch {
609867
609868
  }
609869
+ }
609870
+ if (shouldRetryThinkGuard || shouldRecoverFromEmpty) {
609868
609871
  const retryMessages = injectNoThinkDirective(requestMessages);
609869
609872
  const retryBody = {
609870
609873
  model: this.model,
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.544",
3
+ "version": "1.0.545",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.544",
9
+ "version": "1.0.545",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.544",
3
+ "version": "1.0.545",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",