Repository navigation
pi-python v0.9.1
This is a patch release. It has one fix: provider = "openai" now shows the thinking that a gateway streams as reasoning_content. Fixed has the details. The VS Code extension needs a new agent binary to get the fix, so it needs a new Release and a new VSIX. Changed has the new version numbers. Known issues says that the 0.9.0 list still holds.
Changed
- New version numbers (all Python packages, TUI):
pi-agent-core-lc,pi-agent-harness-lcandpi-agent-cli-lcgo from 0.9.0 to 0.9.1. The three pin each other with==, so install them at one version. Onlypi-agent-core-lchas a code change.pi-agent-harness-lcandpi-agent-cli-lcchange only their version and their pins, because PyPI skips a version that exists, and 0.9.0 of the two pins core==0.9.0. The four extension packages need the new core (pi-agent-core-lc>=0.9.1, andpi-dynamic-workflows-pyalsopi-agent-harness-lc>=0.9.1) and get new versions, because the publish step skips a version that PyPI has already:pi-web-access-py,pi-goal-x-pyandpi-dynamic-workflows-pygo from 0.6.0 to 0.6.1, andpi-mcp-pyfrom 0.4.0 to 0.4.1. They have no code change.zypi --versionand theagentInfoof the agent show 0.9.1 (the TUI cratespi-pager-binandpi-version, andtui/Cargo.lock, carry the same number). The TUI has no code change.
Fixed
provider = "openai"shows the thinking that a gateway streams (pi-agent-core): a gateway that serves a reasoning model (LiteLLM, vLLM, SiliconFlow, OpenRouter) puts the thinking indelta.reasoning_content(OpenRouter and newer vLLM:delta.reasoning).langchain_openai.ChatOpenAIdoes not read these fields, so the adapter never got any thinking and a client showed none: nothinking_deltaevent, nothinkingblock in the session file.ChatDeepSeekkeeps them, but thezycode-agentbinary (the VS Code extension, the registry archives) has nolangchain_deepseek, andprovider = "openai"with abase_urlis the one way to reach a gateway there. Found in the VS Code extension: sessions of one model withprovider = "deepseek"had thinking blocks, and sessions withprovider = "openai"had none. Theopenaiprovider now builds a small subclass ofChatOpenAI(adapters/openai_reasoning.py) that puts the thinking of a streamed chunk intoadditional_kwargs["reasoning_content"], asChatDeepSeekdoes, with the same two field names in the same order. A chunk with no such field is not touched, so api.openai.com does not change. The request does not change: the thinking is not sent back (provider = "deepseek"still does that on DeepSeek's own API), and athinkingblock of an earlier turn is left out of the request as before. A session that now holdsthinkingblocks replays withprovider = "openai"without error (test: the request of a history with thinking and a tool call). Tests:pi_agent_core/tests/test_openai_reasoning.py; with the change taken out, four of them fail, and the first turn of the stream test has atoolCallblock and nothinkingblock, as in the session files. Verified with a streamed answer through the realChatOpenAIclass and a fake HTTP client. Not verified: against a live gateway, and in a builtzycode-agentor a VSIX (the extension needs a new agent binary: a new Release and a new VSIX). A thinking that is not streamed (a call that is notastream) is not covered; the adapter always streams.
Known issues
The known issues of 0.9.0 still hold. This release changes none of them.