chore(release): prepare 0.36.0 - #80
Conversation
…del 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)
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughVersion 0.36.0: adds Alibaba DashScope region-aware endpoint handling with China fallback, workspace-scoped key support ( ChangesPythinker Code 0.36.0 Release and Alibaba DashScope Enhancements
Sequence DiagramsequenceDiagram
participant UI as UI (/login alibaba)
participant Auth as login_alibaba_api_key
participant Discovery as _discover_alibaba_models
participant DashScope as DashScope API
UI->>Auth: submit api_key (sk-*/sk-ws-) [+ optional base_url]
Auth->>Discovery: GET {primary_base_url}/models with api_key
Discovery->>DashScope: request models (primary)
DashScope-->>Discovery: 200 models / 401/403 / network error
alt 401/403 for non-workspace key and primary != China
Auth->>Discovery: probe {ALIBABA_CHINA_BASE_URL}/models
Discovery->>DashScope: request models (china)
DashScope-->>Discovery: 200 / error
Discovery-->>Auth: models or error
end
Auth-->>UI: apply config (provider base_url resolved) or emit workspace-key error
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/en/release-notes/changelog.md`:
- Around line 20-27: Revert the manual edits to
docs/en/release-notes/changelog.md (the autogenerated release notes) and
regenerate the file from the canonical source: update the root CHANGELOG.md with
the desired entry and then run the docs sync command (npm run sync from the
docs/ directory) so the generated changelog is rebuilt; do not directly edit
docs/en/release-notes/changelog.md to avoid future drift.
In `@src/pythinker_code/auth/alibaba.py`:
- Around line 271-341: When handling aiohttp.ClientResponseError for 401/403 in
the Alibaba auth flow, restrict the China-region probe so it only runs when the
primary_url is the default US endpoint (don’t probe when the user supplied a
custom base_url); call _discover_alibaba_models(resolved_key,
ALIBABA_CHINA_BASE_URL) only in that case, and if the China probe fails for any
non-auth reason (aiohttp.ClientError, TimeoutError, ValueError) or times out,
yield an OAuthEvent "error" and return instead of setting active_url = china_url
or falling through to _apply_alibaba_config; only set active_url = china_url and
assign models when _discover_alibaba_models succeeds (and keep the existing
behavior for explicit auth failures from the China probe where you yield an
error and return).
In `@tests/auth/test_alibaba_auth.py`:
- Around line 428-454: Update the test to exercise the explicit base_url
argument path: when calling login_alibaba_api_key in the test (function
login_alibaba_api_key is referenced), pass
base_url="ws-kopy0du82ky7144q.ap-southeast-1.maas.aliyuncs.com" (or add a second
test that does this) so the call verifies that the explicit base_url argument
takes precedence over DASHSCOPE_BASE_URL; keep the same fake_request monkeypatch
and assertions but ensure provider.base_url contains the workspace host returned
when base_url is passed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d0bdac17-f317-423d-9d54-2cd2b4c73a86
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (10)
CHANGELOG.mdREADME.mddocs/en/guides/getting-started.mddocs/en/release-notes/breaking-changes.mddocs/en/release-notes/changelog.mdpackages/linux-installer/README.mdpyproject.tomlsrc/pythinker_code/auth/alibaba.pysrc/pythinker_code/ui/shell/oauth.pytests/auth/test_alibaba_auth.py
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Extend the Qwen-only fix to cover all models accessed via DashScope endpoints (kimi-k2.6, GLM, DeepSeek, etc.) using URL-based detection.
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.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pythinker_code/llm.py`:
- Around line 389-390: The comment and code handling for DashScope-proxied
models is inconsistent: either update the comment to state that DeepSeek uses
enable_thinking like Qwen, or add explicit handling so DeepSeek gets the correct
request body. Locate the block that treats Qwen thinking models (references to
enable_thinking) in llm.py and either (A) change the comment to include DeepSeek
if it should receive enable_thinking, or (B) implement a new model-detection
helper (_is_deepseek_model) and add a branch that constructs the
DeepSeek-specific body (or sets enable_thinking) alongside the existing Qwen
handling so DeepSeek requests are formatted correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: e78d817d-cc2c-44f1-96cf-28bdf5a0f49a
📒 Files selected for processing (1)
src/pythinker_code/llm.py
Summary
CHANGELOG.mdRelated Issue
None.
Checklist
make check-pythinker-codemake test-pythinker-codenpm run syncfromdocs/Test Results
4427 passed, 6 skipped, 1 xfailed52 passed, 4 skippedin wire E2E122 passedin final focused verificationSummary by CodeRabbit
New Features
Documentation
Tests