Skip to content

✨ feat: possibility to enable or disable thinking with ollama#375

Merged
Raffaele Paolino (RPaolino) merged 1 commit into
mainfrom
ollama-thinking
May 22, 2026
Merged

✨ feat: possibility to enable or disable thinking with ollama#375
Raffaele Paolino (RPaolino) merged 1 commit into
mainfrom
ollama-thinking

Conversation

@marcorusso97

@marcorusso97 Marco Russo (marcorusso97) commented May 22, 2026

Copy link
Copy Markdown
Contributor

For the target, if it is an Ollama agent, in the HackAgent constructor we can now specify a flag named thinking, e.g.

agent = HackAgent(
        name=TARGET_MODEL,
        endpoint=OLLAMA_BASE,
        agent_type=AgentTypeEnum.OLLAMA,
        thinking=False,
    )

For other roles, i.e. judges, attacker etc, if they are Ollama agents, we can now specify a field named thinking, e.g.

JUDGES_LIST = [
    {
        "identifier": JUDGE_MODEL,
        "agent_type": AgentTypeEnum.OLLAMA,
        "endpoint": OLLAMA_BASE,
        "thinking": False,
        "api_key": os.getenv("OPENROUTER_API_KEY"),
        "type": "harmbench_variant",
    },
]

@marcorusso97 Marco Russo (marcorusso97) linked an issue May 22, 2026 that may be closed by this pull request
@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.85714% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
hackagent/attacks/shared/router_factory.py 91.66% 1 Missing ⚠️
hackagent/router/adapters/ollama.py 87.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@RPaolino Raffaele Paolino (RPaolino) merged commit be0ec0c into main May 22, 2026
22 checks passed
@RPaolino Raffaele Paolino (RPaolino) deleted the ollama-thinking branch May 22, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable/disable thinking with Ollama agents

2 participants