Skip to content

[Bug]: ollama/deepseek-v4-pro:cloud does not allow "max" in v2026.5.3-1 #77612

Closed

Description

@rriggs

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Attempting to use ollama/deepseek-v4-pro:cloud with /think max results in the following response:

Thinking level "max" is not supported for ollama/deepseek-v4-pro:cloud. Use one of: off, minimal, low, medium, high.

I see from #71584 that this was fixed, so I am calling this a regression. I have no evidence that the fix actually worked since I skipped a large chunk of updates.

After quite a bit of debugging, my agent and I have determined that the ollama plugin is never "activated" and never registers its profile, resulting in resolveActiveThinkingProvider() unable to find the ollama profile.

Workaround

set activation.startup = true in extensions/ollama/openclaw.plugin.json

This allows /think max to work as expected.

Steps to reproduce

  1. Start a local ollama instance.
  2. Authenticate the local olllama instance.
  3. ollama pull deepseek-v4-pro
  4. Start OpenClaw v2026.5.3-1 with an OLLAMA_API_KEY
  5. With the main agent, /think max

Expected behavior

Gateway responds with Thinking level set to max.

Actual behavior

Gateway response with Thinking level "max" is not supported for ollama/deepseek-v4-pro:cloud...

OpenClaw version

v2026.5.3-1

Operating system

Fedora 43

Install method

built from source with pnpm -- installed via pnpm link -g .

Model

deepseek-v4-pro

Provider / routing chain

openclaw->local_ollama->ollama_cloud

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Added debugging output during the resolution chain:

May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] resolveThinkingProfile called provider=ollama model=deepseek-v4-pro:cloud normalizedProvider=ollama catalogReasoning=undefined
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] looking for provider: ollama registry has 0 providers: []
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] found entry: false undefined has resolveThinkingProfile: false
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] pluginProfile=false levels=undefined
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] looking for provider: ollama registry has 0 providers: []
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] found entry: false undefined has resolveThinkingProfile: false
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] looking for provider: ollama registry has 0 providers: []
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] found entry: false undefined has resolveThinkingProfile: false
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] binaryDecision=undefined => BASE profile
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] result levels=[ 'off', 'minimal', 'low', 'medium', 'high' ]
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] looking for provider: ollama registry has 0 providers: []
May 04 17:18:37 emerald node[89709]: [THINKING-DEBUG] found entry: false undefined has resolveThinkingProfile: false


And with `activation.startup = true` in `extensions/ollama/openclaw.plugin.json`:

May 04 17:23:50 emerald node[90413]: [THINKING-DEBUG] resolveThinkingProfile called provider=ollama model=deepseek-v4-pro:cloud normalizedProvider=ollama catalogReasoning=true
May 04 17:23:50 emerald node[90413]: [THINKING-DEBUG] looking for provider: ollama registry has 3 providers: [ 'minimax', 'minimax-portal', 'ollama' ]
May 04 17:23:50 emerald node[90413]: [THINKING-DEBUG] found entry: true ollama has resolveThinkingProfile: true
May 04 17:23:50 emerald node[90413]: [THINKING-DEBUG] pluginProfile=true levels=[ 'off', 'low', 'medium', 'high', 'max' ]
May 04 17:23:50 emerald node[90413]: [THINKING-DEBUG] normalized levels=[ 'off', 'low', 'medium', 'high', 'max' ] count=5

Impact and severity

Affected: all ollama/deepseek-v4-pro users.
Severity: Medium - unable to set important model parameter
Frequency: Always
Consequence: full model performance is unavailable under OpenClaw

Additional information

No response

Activity

  1. clawsweeper commented on May 5, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve.

    Summary
    Keep open: the regression is source-reproducible on current main because Ollama is startup-lazy and its lightweight provider-policy artifact does not expose the thinking profile that includes max, so validation can still fall back to base levels.

    Reproducibility: yes. source-reproducible: current main can fall through to the base thinking levels when Ollama is not active because the lightweight Ollama policy artifact lacks resolveThinkingProfile. I did not run a live Ollama/Fedora session.

    Next step
    This is a narrow provider-policy regression with clear affected files and validation, and it does not require a product decision or new config option.

    Review details

    Best possible solution:

    Keep Ollama startup-lazy and add a startup-safe Ollama resolveThinkingProfile policy artifact, with regression coverage proving max is accepted when the full plugin registry is not active.

    Do we have a high-confidence way to reproduce the issue?

    Yes, source-reproducible: current main can fall through to the base thinking levels when Ollama is not active because the lightweight Ollama policy artifact lacks resolveThinkingProfile. I did not run a live Ollama/Fedora session.

    Is this the best way to solve the issue?

    Yes, the narrow maintainable fix is to expose the existing Ollama thinking profile through the lightweight provider-policy artifact; changing activation.onStartup to true would mask the issue and weaken the startup-lazy boundary.

    Acceptance criteria:

    • pnpm test extensions/ollama/provider-policy-api.test.ts src/gateway/session-utils.test.ts src/gateway/sessions-patch.test.ts src/auto-reply/thinking.test.ts
    • pnpm exec oxfmt --check --threads=1 extensions/ollama/provider-policy-api.ts extensions/ollama/provider-policy-api.test.ts src/gateway/session-utils.test.ts src/gateway/sessions-patch.test.ts src/auto-reply/thinking.test.ts CHANGELOG.md
    • pnpm check:changed

    What I checked:

    Likely related people:

    • steipete: Current local blame/log metadata attributes the Ollama manifest, full Ollama thinking hook, and lightweight provider-policy artifact wiring in this checkout to Peter Steinberger, and recent plugin startup/discovery commits are in the same area. (role: likely follow-up owner; confidence: high; commits: 76e0bcd2ded3, b2096d19ec; files: extensions/ollama/openclaw.plugin.json, extensions/ollama/index.ts, extensions/ollama/provider-policy-api.ts)

    Remaining risk / open question:

    • No live Fedora/Ollama gateway session was run in this read-only pass, so the exact user-facing reply is source-reproducible rather than live-reproduced.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 25db482cc651.

    Re-review progress:

  2. slyersray commented on May 5, 2026

    @slyersray

    @vincentkoc 这是一个回归问题,影响了 ollama/deepseek-v4-pro:cloud 模型的 功能。根本原因是插件未在启动时激活。

  3. rriggs commented on May 5, 2026

    @rriggs
    Author

    The following patch fixes the problem. Created by DeepSeek V4 Pro Max. Reviewed by me.

    diff --git a/extensions/ollama/provider-policy-api.ts b/extensions/ollama/provider-policy-api.ts
    index 433e296f18..1a48c144b7 100644
    --- a/extensions/ollama/provider-policy-api.ts
    +++ b/extensions/ollama/provider-policy-api.ts
    @@ -1,4 +1,8 @@
     import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-types";
    +import type {
    +  ProviderDefaultThinkingPolicyContext,
    +  ProviderThinkingProfile,
    +} from "openclaw/plugin-sdk/provider-thinking-types";
     import { OLLAMA_DEFAULT_BASE_URL } from "./src/defaults.js";
     
     type OllamaProviderConfigDraft = Partial<ModelProviderConfig>;
    @@ -38,3 +42,30 @@ export function normalizeConfig({
     
       return next;
     }
    +
    +/**
    + * Thinking profile for Ollama models.
    + *
    + * When a model's catalog entry has reasoning: true, expose the full thinking
    + * ladder up to max. Non-reasoning models only get off.
    + *
    + * This runs via the bundled public-artifact path, so it is available even
    + * when the Ollama plugin is configured with onStartup: false.
    + */
    +export function resolveThinkingProfile({
    +  reasoning,
    +}: ProviderDefaultThinkingPolicyContext): ProviderThinkingProfile | null {
    +  if (reasoning !== true) {
    +    return { levels: [{ id: "off" }], defaultLevel: "off" };
    +  }
    +  return {
    +    levels: [
    +      { id: "off" },
    +      { id: "low" },
    +      { id: "medium" },
    +      { id: "high" },
    +      { id: "max" },
    +    ],
    +    defaultLevel: "off",
    +  };
    +}
  4. added a commit that references this issue on May 5, 2026
    7a9efc1
  5. locked as resolved and limited conversation to collaborators on May 8, 2026
  6. added 2 commits that reference this issue on May 20, 2026
    12960b7
    326866a
  7. added a commit that references this issue on May 24, 2026
    b806f3e
  8. added a commit that references this issue on Jun 2, 2026
    302db2f
  9. added a commit that references this issue on Jun 10, 2026
    a2898cc
  10. added 2 commits that reference this issue on Sep 11, 2026
    1857759
    9bcdb24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions