Skip to content
This repository was archived by the owner on Nov 14, 2026. It is now read-only.

Commit e7461b4

Browse files
authored
chore(release): prepare 0.36.0 (#80)
* feat(auth): add ALIBABA_CHINA_BASE_URL and base_url param to _apply_alibaba_config * feat(auth): probe China endpoint on 401 before failing Alibaba login * test(auth): add China-region fallback + workspace-key detection tests * feat(auth): detect sk-ws- workspace keys and give targeted endpoint guidance * feat(auth): interactive workspace endpoint prompt + update Alibaba model catalog - Prompt for workspace endpoint host in TUI when sk-ws- key is entered, eliminating the need to pre-set DASHSCOPE_BASE_URL for workspace keys - Add base_url param to login_alibaba_api_key for caller-supplied endpoint - Add qwen3.7-plus, qwen3-coder-plus, qwen3-coder-flash to catalog - Remove kimi-k2.5, glm-5, MiniMax-M2.5 (absent from live endpoint) - Correct qwen3.7-max context size to 1M (was 262k) * chore(release): prepare 0.36.0 * fix(llm): use enable_thinking for Qwen models on DashScope DashScope's OpenAI-compatible API uses extra_body={"enable_thinking": true/false} for Qwen thinking models. Sending reasoning_effort triggers RouteError: Service route not found (HTTP 500). Treat Qwen like Kimi K2/GLM: skip with_thinking() and send the provider-specific toggle instead. * fix(llm): use enable_thinking for all DashScope reasoning models Extend the Qwen-only fix to cover all models accessed via DashScope endpoints (kimi-k2.6, GLM, DeepSeek, etc.) using URL-based detection. * fix(llm): use Moonshot thinking format for kimi-k2.6 on DashScope kimi-k2.6 uses {"thinking": {"type": ...}} on all providers including DashScope workspace; enable_thinking is Qwen-only. Remove the DashScope exclusion from is_kimi_openai_legacy/is_glm_openai_legacy so the correct Moonshot body format is applied regardless of endpoint. * fix: harden Alibaba auth and agent guardrails * docs(agents): support local agent instructions
1 parent 4856060 commit e7461b4

24 files changed

Lines changed: 864 additions & 96 deletions

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ wheels/
1313
.vscode
1414
.env
1515
.env.local
16+
AGENTS.local
1617
/tests_local
1718
uv.toml
1819
.idea/*

‎AGENTS.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ This file is the root guidance for AI agents working in this repository. It is i
44
Pythinker sessions via `PYTHINKER_AGENTS_MD`; keep it durable, portable, and focused on rules
55
that should apply across many tasks.
66

7+
## Local-only instructions
8+
9+
If `AGENTS.local` exists at the repository root, read it after this file for machine-specific or
10+
private local instructions. `AGENTS.local` is intentionally gitignored; do not commit it or copy its
11+
contents into tracked files. Local instructions may add workflow details, but they must not weaken
12+
or override this repository's non-negotiable rules.
13+
714
## Mission
815

916
Pythinker CLI is a Python CLI agent for software engineering workflows. It supports an

‎CHANGELOG.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ GitHub Releases page; `0.8.0` is the new starting line.
1515

1616
## Unreleased
1717

18+
## 0.36.0 (2026-06-05)
19+
20+
- **Alibaba DashScope multi-region fallback.** Logging in with a China-region key (`dashscope.aliyuncs.com`) against the default US Virginia endpoint now auto-detects the mismatch and reconfigures for the correct endpoint rather than failing with a misleading "API key is wrong" error.
21+
- **Alibaba Token Plan compatibility (`sk-ws-`).** `/login alibaba` now requires the dedicated workspace Base URL shown in the Token Plan console instead of accepting a public `/models` response as credential validation. Dedicated workspace endpoints hide Kimi K2.6 when Alibaba advertises it without a working route, and use non-streaming Chat Completions for DeepSeek V3.2 because those endpoints return an empty SSE stream. Kimi requests on other Alibaba routes use DashScope's `enable_thinking` parameter.
22+
- **Alibaba model catalog refresh.** Added Qwen3.7 Plus (1M context), Qwen3 Coder Plus, and Qwen3 Coder Flash. Removed `kimi-k2.5`, `glm-5`, and `MiniMax-M2.5` (absent from the live endpoint). Corrected Qwen3.7 Max context window to 1M tokens.
23+
24+
Upgrade with `pythinker update`, `pip install --upgrade pythinker-code==0.36.0`, or use the native installer for your platform from the [Releases page](https://github.com/Pythoughts-labs/pythinker-code/releases/latest).
25+
1826
## 0.35.0 (2026-06-04)
1927

2028
- **Alibaba DashScope provider and MiniMax M3 catalog.** `/login alibaba` now configures Alibaba Cloud Model Studio / DashScope Token Plan models, including workspace-compatible endpoints and native GLM thinking behavior. MiniMax API-key login now defaults to MiniMax M3 with its larger context and multimodal capabilities.

‎README.md‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ It speaks the [**Agent Client Protocol (ACP)**](https://github.com/agentclientpr
5050
5151
---
5252

53-
## 🆕 What's New in 0.35.0
53+
## 🆕 What's New in 0.36.0
5454

55-
- **`/stats` usage dashboard.** New slash command opens an interactive TUI showing token and cost breakdown by provider/model across Today / This Week / Last Week / All Time. Powered by a static pricing table and a session collector that walks `~/.pythinker/sessions/` wire files.
56-
- **Z AI provider auth.** Login/logout via API key, model discovery, and OAuth selector wired into the TUI and `refresh_managed_models`.
57-
- **Moonshot provider auth.** Login/logout via API key, model discovery (Kimi K2.x catalog), OAuth selector wired into the TUI and `refresh_managed_models`.
55+
- **Alibaba DashScope multi-region fallback.** China-region keys now auto-detect the endpoint mismatch and reconfigure correctly instead of showing a misleading "API key is wrong" error.
56+
- **Alibaba Token Plan compatibility (`sk-ws-`).** `/login alibaba` now asks for the dedicated workspace endpoint, avoids unroutable Kimi entries on those endpoints, and uses DeepSeek V3.2's working non-streaming mode.
57+
- **Alibaba model catalog refresh.** Qwen3.7 Plus, Qwen3 Coder Plus, and Qwen3 Coder Flash added; deprecated `kimi-k2.5`, `glm-5`, and `MiniMax-M2.5` removed.
5858

59-
Upgrade with `pythinker update`, `pip install --upgrade pythinker-code==0.35.0`, or use the native installer for your platform from the [Releases page](https://github.com/Pythoughts-labs/pythinker-code/releases/latest).
59+
Upgrade with `pythinker update`, `pip install --upgrade pythinker-code==0.36.0`, or use the native installer for your platform from the [Releases page](https://github.com/Pythoughts-labs/pythinker-code/releases/latest).
6060

6161

6262
---
@@ -146,7 +146,7 @@ matches your OS — no Python, Node, or `uv` prerequisite.
146146

147147
| Platform | Recommended install | Artifact source |
148148
|---|---|---|
149-
| **🪟 Windows** | `irm https://pythinker.com/install.ps1 \| iex` | `PythinkerSetup-0.35.0.exe` from [Releases](https://github.com/Pythoughts-labs/pythinker-code/releases/latest) |
149+
| **🪟 Windows** | `irm https://pythinker.com/install.ps1 \| iex` | `PythinkerSetup-0.36.0.exe` from [Releases](https://github.com/Pythoughts-labs/pythinker-code/releases/latest) |
150150
| **<img src="https://img.shields.io/badge/-macOS-000000?style=flat-square&logo=apple&logoColor=white" alt="macOS"> / <img src="https://img.shields.io/badge/-Linux-FCC624?style=flat-square&logo=linux&logoColor=black" alt="Linux">** | `curl -fsSL https://pythinker.com/install.sh \| bash` | native tarball from [Releases](https://github.com/Pythoughts-labs/pythinker-code/releases/latest) |
151151
| **<img src="https://img.shields.io/badge/-macOS-000000?style=flat-square&logo=apple&logoColor=white" alt="macOS"> — Homebrew** | `brew install Pythoughts-labs/pythinker/pythinker-code` | auto-published Homebrew tap |
152152
| **🐳 Docker** | `docker run --rm -it ghcr.io/pythoughts-labs/pythinker-code` | GHCR multi-arch image |
@@ -174,7 +174,7 @@ pythinker # start the interactive TUI
174174

175175
### 🪟 Windows — native installer
176176

177-
`PythinkerSetup-0.35.0.exe` is a signed* Inno Setup wizard. Installs per-user
177+
`PythinkerSetup-0.36.0.exe` is a signed* Inno Setup wizard. Installs per-user
178178
into `%LOCALAPPDATA%\Programs\Pythinker`, registers `pythinker` on your user
179179
PATH (`HKCU\Environment`), broadcasts `WM_SETTINGCHANGE` so new shells see
180180
the change. **No UAC prompt.**
@@ -185,13 +185,13 @@ irm https://pythinker.com/install.ps1 | iex
185185
186186
# Or manually download the installer + checksum from the Releases page,
187187
# verify with Get-FileHash, then run:
188-
.\PythinkerSetup-0.35.0.exe
188+
.\PythinkerSetup-0.36.0.exe
189189
190190
# Open a fresh PowerShell
191191
pythinker --version
192192
```
193193

194-
**Per-machine install** (IT-managed boxes): `.\PythinkerSetup-0.35.0.exe /ALLUSERS`
194+
**Per-machine install** (IT-managed boxes): `.\PythinkerSetup-0.36.0.exe /ALLUSERS`
195195
installs to `%ProgramFiles%\Pythinker` and writes PATH to HKLM (requires admin).
196196

197197
**Upgrade:** `pythinker update` from inside the running app — it downloads
@@ -242,26 +242,26 @@ attached to every GitHub Release.
242242

243243
```sh
244244
# Debian / Ubuntu (x86_64)
245-
sudo dpkg -i pythinker-code_0.35.0_amd64.deb
245+
sudo dpkg -i pythinker-code_0.36.0_amd64.deb
246246
sudo apt-get install -f # only if dpkg reports missing deps
247247

248248
# Debian / Ubuntu (ARM64)
249-
sudo dpkg -i pythinker-code_0.35.0_arm64.deb
249+
sudo dpkg -i pythinker-code_0.36.0_arm64.deb
250250

251251
# Fedora / RHEL / openSUSE (x86_64)
252-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code-0.35.0.x86_64.rpm
253-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code-0.35.0.x86_64.rpm.sha256
254-
sha256sum -c pythinker-code-0.35.0.x86_64.rpm.sha256
252+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code-0.36.0.x86_64.rpm
253+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code-0.36.0.x86_64.rpm.sha256
254+
sha256sum -c pythinker-code-0.36.0.x86_64.rpm.sha256
255255
# Fedora / RHEL:
256-
sudo dnf install ./pythinker-code-0.35.0.x86_64.rpm
256+
sudo dnf install ./pythinker-code-0.36.0.x86_64.rpm
257257
# openSUSE:
258-
sudo zypper install ./pythinker-code-0.35.0.x86_64.rpm
258+
sudo zypper install ./pythinker-code-0.36.0.x86_64.rpm
259259

260260
# Fedora / RHEL (aarch64)
261-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code-0.35.0.aarch64.rpm
262-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code-0.35.0.aarch64.rpm.sha256
263-
sha256sum -c pythinker-code-0.35.0.aarch64.rpm.sha256
264-
sudo dnf install ./pythinker-code-0.35.0.aarch64.rpm
261+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code-0.36.0.aarch64.rpm
262+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code-0.36.0.aarch64.rpm.sha256
263+
sha256sum -c pythinker-code-0.36.0.aarch64.rpm.sha256
264+
sudo dnf install ./pythinker-code-0.36.0.aarch64.rpm
265265
```
266266

267267
Both packages drop a small `/usr/bin/pythinker` launcher that execs the real
@@ -270,8 +270,8 @@ binary under `/usr/lib/pythinker/`, so your `$PATH` stays tidy.
270270
**Verify before install:**
271271

272272
```sh
273-
sha256sum -c pythinker-code_0.35.0_amd64.deb.sha256 # Debian/Ubuntu
274-
sha256sum -c pythinker-code-0.35.0.x86_64.rpm.sha256 # Fedora/RHEL
273+
sha256sum -c pythinker-code_0.36.0_amd64.deb.sha256 # Debian/Ubuntu
274+
sha256sum -c pythinker-code-0.36.0.x86_64.rpm.sha256 # Fedora/RHEL
275275
```
276276

277277
**Upgrade:** download the new `.deb`/`.rpm` from Releases and `dpkg -i` /

‎docs/en/guides/getting-started.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ On Windows, run the PowerShell bootstrap. It downloads the native installer, ver
4444
irm https://pythinker.com/install.ps1 | iex
4545
```
4646

47-
You can also download `PythinkerSetup-0.35.0.exe` manually from the [latest release](https://github.com/Pythoughts-labs/pythinker-code/releases/latest).
47+
You can also download `PythinkerSetup-0.36.0.exe` manually from the [latest release](https://github.com/Pythoughts-labs/pythinker-code/releases/latest).
4848

4949
Verify the installation:
5050

‎docs/en/release-notes/breaking-changes.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This page documents breaking changes in Pythinker Code releases and provides mig
44

55
## Unreleased
66

7+
## 0.36.0 (2026-06-05)
8+
9+
No breaking changes. This release is compatible with 0.35.0 user configuration, native installs, and session data.
10+
711
## 0.35.0 (2026-06-04)
812

913
## 0.34.0 (2026-06-03)

‎docs/en/release-notes/changelog.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ GitHub Releases page; `0.8.0` is the new starting line.
1717

1818
## Unreleased
1919

20+
## 0.36.0 (2026-06-05)
21+
22+
- **Alibaba DashScope multi-region fallback.** Logging in with a China-region key (`dashscope.aliyuncs.com`) against the default US Virginia endpoint now auto-detects the mismatch and reconfigures for the correct endpoint rather than failing with a misleading "API key is wrong" error.
23+
- **Alibaba Token Plan compatibility (`sk-ws-`).** `/login alibaba` now requires the dedicated workspace Base URL shown in the Token Plan console instead of accepting a public `/models` response as credential validation. Dedicated workspace endpoints hide Kimi K2.6 when Alibaba advertises it without a working route, and use non-streaming Chat Completions for DeepSeek V3.2 because those endpoints return an empty SSE stream. Kimi requests on other Alibaba routes use DashScope's `enable_thinking` parameter.
24+
- **Alibaba model catalog refresh.** Added Qwen3.7 Plus (1M context), Qwen3 Coder Plus, and Qwen3 Coder Flash. Removed `kimi-k2.5`, `glm-5`, and `MiniMax-M2.5` (absent from the live endpoint). Corrected Qwen3.7 Max context window to 1M tokens.
25+
26+
Upgrade with `pythinker update`, `pip install --upgrade pythinker-code==0.36.0`, or use the native installer for your platform from the [Releases page](https://github.com/Pythoughts-labs/pythinker-code/releases/latest).
27+
2028
## 0.35.0 (2026-06-04)
2129

2230
- **Alibaba DashScope provider and MiniMax M3 catalog.** `/login alibaba` now configures Alibaba Cloud Model Studio / DashScope Token Plan models, including workspace-compatible endpoints and native GLM thinking behavior. MiniMax API-key login now defaults to MiniMax M3 with its larger context and multimodal capabilities.

‎packages/linux-installer/README.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ End-user install from the current GitHub Release:
88

99
```sh
1010
# Debian / Ubuntu
11-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code_0.35.0_amd64.deb
12-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code_0.35.0_amd64.deb.sha256
13-
sha256sum -c pythinker-code_0.35.0_amd64.deb.sha256
14-
sudo dpkg -i pythinker-code_0.35.0_amd64.deb
11+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code_0.36.0_amd64.deb
12+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code_0.36.0_amd64.deb.sha256
13+
sha256sum -c pythinker-code_0.36.0_amd64.deb.sha256
14+
sudo dpkg -i pythinker-code_0.36.0_amd64.deb
1515
sudo apt-get install -f # only needed if dependencies fail to resolve
1616

1717
# Fedora / RHEL / openSUSE
18-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code-0.35.0.x86_64.rpm
19-
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.35.0/pythinker-code-0.35.0.x86_64.rpm.sha256
20-
sha256sum -c pythinker-code-0.35.0.x86_64.rpm.sha256
21-
sudo dnf install ./pythinker-code-0.35.0.x86_64.rpm
18+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code-0.36.0.x86_64.rpm
19+
curl -LO https://github.com/Pythoughts-labs/pythinker-code/releases/download/v0.36.0/pythinker-code-0.36.0.x86_64.rpm.sha256
20+
sha256sum -c pythinker-code-0.36.0.x86_64.rpm.sha256
21+
sudo dnf install ./pythinker-code-0.36.0.x86_64.rpm
2222
# or, on openSUSE:
23-
sudo zypper install ./pythinker-code-0.35.0.x86_64.rpm
23+
sudo zypper install ./pythinker-code-0.36.0.x86_64.rpm
2424
```
2525

2626
The package drops a single executable at `/usr/bin/pythinker` and a license
@@ -36,17 +36,17 @@ file at `/usr/share/doc/pythinker-code/LICENSE`.
3636
## Build
3737

3838
```sh
39-
bash packages/linux-installer/build.sh 0.35.0
39+
bash packages/linux-installer/build.sh 0.36.0
4040
```
4141

4242
Outputs to `dist/`:
4343

44-
- `pythinker-code_0.35.0_amd64.deb`
45-
- `pythinker-code-0.35.0.x86_64.rpm`
44+
- `pythinker-code_0.36.0_amd64.deb`
45+
- `pythinker-code-0.36.0.x86_64.rpm`
4646

4747
The portable tarball used by `scripts/install-native.sh` is published by
4848
the existing `release-pythinker-cli.yml` workflow under the cargo-dist
49-
target-triple naming (e.g. `pythinker-0.35.0-x86_64-unknown-linux-gnu.tar.gz`).
49+
target-triple naming (e.g. `pythinker-0.36.0-x86_64-unknown-linux-gnu.tar.gz`).
5050

5151
## CI
5252

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pythinker-code"
3-
version = "0.35.0"
3+
version = "0.36.0"
44
description = "Pythinker — an agentic CLI developed by Pythoughts-labs."
55
readme = "README.md"
66
requires-python = ">=3.12"

‎src/pythinker_code/agents/default/code_reviewer.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ agent:
2626
- Build a review context packet: base ref/diff scope or Reviewflow feature IDs, changed behavior, likely tests, user-visible impact, valid evidence paths, omitted/truncated context, and validation evidence.
2727
- Flag only issues introduced or made reachable by the diff.
2828
- Prefer no finding over vague speculation. Every finding must cite concrete evidence and a failure mode.
29+
- Run the production guardrail gate before finalizing: check for cache stampedes, connection/resource leaks, missing boundary schemas, unhandled race conditions, naive retry loops, unbounded event callbacks/listeners, and IDOR/tenant-scope mistakes.
30+
- Treat missing `finally` cleanup, absent schema validation at trust boundaries, unprotected shared-state mutation, non-jittered immediate retries, or identity from mutable client parameters as reject-level findings when reachable in the changed code.
2931
3032
Freshness check (run BEFORE flagging third-party library or framework misuse):
3133
- For every third-party API, SDK call, framework primitive, or "best practice" the diff turns on, verify the current canonical usage. Prefer a context7 MCP query (e.g. `mcp__context7__query-docs` with the library id) when registered with the parent runtime; otherwise use `SearchWeb` to locate the official documentation and `FetchURL` to read the current page.

0 commit comments

Comments
 (0)