Skip to content

Commit a53a2a7

Browse files
committed
chore(release): bump to 0.16.1
Patch release with the real fix for issue #12 (silent exit in CLI agent-mode when PENTEST_AI_LLM_PROVIDER is non-Anthropic). 0.16.0 shipped an adjacent OLLAMA_HOST factory fix but missed the actual root cause; 0.16.1 wires CLI agent-mode through the unified LLM factory so OPENAI_API_KEY / OLLAMA_HOST / PENTEST_AI_LLM_PROVIDER=ollama users actually work on Path 3 instead of being silently ignored. Verified end-to-end against a live local Ollama before tagging.
1 parent 5cf9daf commit a53a2a7

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22

33
All notable changes to ptai are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/), versioning follows [Semantic Versioning](https://semver.org/).
44

5+
## [0.16.1] - 2026-05-26
6+
7+
Patch release closing the silent-exit bug in CLI agent-mode that issue #12 reporters kept hitting. The 0.16.0 release had an earlier attempt at this fix (read the canonical `OLLAMA_HOST` env var instead of `OLLAMA_BASE_URL`); that change was correct but solved an adjacent bug, not the one users were experiencing.
8+
9+
### Fixed
10+
11+
- **CLI agent-mode now actually honors `PENTEST_AI_LLM_PROVIDER`** (`cli/main.py`, `engine/agents/anthropic_agent.py`, `engine/llm/factory.py`). The previous `ptai start` flow hardcoded `AsyncAnthropic()` regardless of which provider the user configured. Users who set `OPENAI_API_KEY` or `OLLAMA_HOST` (or both) saw `agent_mode: NNN action handlers registered`, then a spinner, then a silent exit — because the first Anthropic call failed under the spinner and the agent's exception handler returned a clean `finish` action. The CLI now constructs the LLM client via `engine.llm.factory.create_llm_client()`, which routes correctly through every supported provider:
12+
13+
```bash
14+
# OpenAI
15+
export OPENAI_API_KEY=sk-...
16+
ptai start http://target
17+
18+
# Local Ollama (configurable via OLLAMA_HOST)
19+
export PENTEST_AI_LLM_PROVIDER=ollama
20+
ptai start http://target
21+
22+
# No LLM, deterministic tools only
23+
ptai start http://target --no-llm
24+
```
25+
26+
Three sub-changes:
27+
- `cli/main.py` replaces `AsyncAnthropic()` with `create_llm_client()`.
28+
- `engine/agents/anthropic_agent.py` duck-types the client. If it exposes `.complete()` (the unified `LLMClient` from the factory), use that; otherwise fall back to the legacy `client.messages.create()` path so existing test fixtures keep working.
29+
- `engine/llm/factory.py` auto-detects provider from whichever API key is set when `PENTEST_AI_LLM_PROVIDER` isn't explicit. `ANTHROPIC_API_KEY` set → anthropic, `OPENAI_API_KEY` set → openai, neither set → openai default. Closes the "I set OPENAI_API_KEY in good faith, why is it routing to Anthropic" foot-gun.
30+
31+
Verified end-to-end against a live local Ollama running `qwen2.5-coder:7b`: factory routes to `OllamaProvider`, the unified `LLMClient.complete()` round-trips successfully, `AnthropicAgent.decide_next_action` returns a real `Action` instead of the silent `finish`-on-failure. Closes the silent-exit class for the issue #12 reporters.
32+
533
## [0.16.0] - 2026-05-26
634

735
Headline release closing 3 of 4 deal-breakers from the pentester-perspective audit shipped on 2026-05-24. **Every finding now carries cryptographically-hashed proof, blind-vulnerability classes are detectable via OOB callbacks, and `intensity=stealth` actually changes traffic shape.** Plus the foundations for the Caido / Burp / ZAP plugins coming in subsequent releases.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "ptai"
7-
version = "0.16.0"
7+
version = "0.16.1"
88
description = "Autonomous AI pentesting with 200+ tools, exploit chaining, PoC validation, and credential-safe MCP server"
99
readme = "README.md"
1010
license = {text = "MIT"}

0 commit comments

Comments
 (0)