feat(auth): add Alibaba DashScope provider - #78
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Alibaba (DashScope) OAuth provider with model discovery, upgrades MiniMax defaults to the M3 catalog with larger contexts and capabilities, and routes GLM/Kimi models to provider-specific thinking controls in create_llm. ChangesAlibaba DashScope and Model/Provider Enhancements
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 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 docstrings
🧪 Generate unit tests (beta)
Comment |
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 `@tests/auth/test_alibaba_auth.py`:
- Around line 181-184: The test currently patches the private helper
_discover_alibaba_models (via fake_discover + monkeypatch.setattr) which couples
the test to internals; instead stub the HTTP/session boundary used by that
helper (e.g., monkeypatch the aiohttp.ClientSession.request or .get used by
_discover_alibaba_models or use a library like aioresponses) to raise
aiohttp.ClientConnectionError, then drive the public login flow (the Alibaba
auth/login method under test) and assert observable outcomes (login events,
config changes) rather than inspecting or replacing _discover_alibaba_models;
update the other similar cases at the indicated ranges (203-211, 226-235,
252-264) the same way.
🪄 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: 381da6b8-7d24-4e3c-aea6-0595aae0669c
📒 Files selected for processing (9)
src/pythinker_code/auth/__init__.pysrc/pythinker_code/auth/alibaba.pysrc/pythinker_code/auth/minimax.pysrc/pythinker_code/llm.pysrc/pythinker_code/ui/shell/oauth.pytests/auth/test_alibaba_auth.pytests/auth/test_minimax_auth.pytests/auth/test_platforms.pytests/core/test_create_llm.py
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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 `@tests/auth/test_alibaba_auth.py`:
- Line 286: The test's assertion uses exact dict equality for kwargs["headers"],
which is fragile; update the assertion in tests/auth/test_alibaba_auth.py so it
only checks the Authorization header (e.g., assert
kwargs["headers"].get("Authorization") == "Bearer sk-test" or assert
"Authorization" in kwargs["headers"] and kwargs["headers"]["Authorization"] ==
"Bearer sk-test") instead of comparing the whole headers dict.
🪄 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: c7f1de2a-c1c9-479d-a8e8-a2bcd7d179ba
📒 Files selected for processing (2)
CHANGELOG.mdtests/auth/test_alibaba_auth.py
Summary
Verification
Summary by CodeRabbit
New Features
alibabamode for login/logoutImprovements
Tests