|
2 | 2 |
|
3 | 3 | All notable changes to ptai are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/), versioning follows [Semantic Versioning](https://semver.org/). |
4 | 4 |
|
| 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 | + |
5 | 33 | ## [0.16.0] - 2026-05-26 |
6 | 34 |
|
7 | 35 | 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. |
|
0 commit comments