feat(ai): add Atlas Cloud provider support - #188
binyangzhu000-sudo wants to merge 2 commits into
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Single conflict in backend/ai/routes.py, and it was not in this branch's own subject matter: upstream rewrote _ensure_rate_limit_table's double-check from an early return into a nested if. This branch had only added a '# type: ignore[unreachable]' comment on that early return, and had also collapsed the _enforce_rate_limit 'async with' nesting — both incidental to adding an AI provider abstraction. Upstream's version is taken for that whole region, which also drops the unrelated reformatting this branch was carrying. The diff against main is now confined to what the PR is actually about: ai/provider.py, the three-line swap in routes.py from the inline Gemini client to generate_ai_response, and the accompanying config/test/lock entries. Verification: pytest backend/tests -> 3 passed; mypy clean on the two changed modules.
|
Synced with So upstream's version is taken for that whole region, which drops the unrelated reformatting along with it. The diff against Verification on the merged branch:
No conflicts remain. |
Summary
AI_PROVIDERadapter while keeping Gemini as the defaultFunctionCallResponseschema.env.exampleConfiguration
ATLAS_CLOUD_*aliases are also accepted for compatibility.Validation
uv run ruff format --check ai/provider.py ai/routes.py tests/test_ai_provider.pyuv run ruff check ai/provider.py ai/routes.py tests/test_ai_provider.pyuv run python -m unittest discover -s tests -p "test_*.py" -v(3 passed)uv run mypy .git diff --checkdeepseek-ai/deepseek-v4-prochat completion: HTTP 200; JSON output passedFunctionCallResponsevalidationNo README, logo, sponsor, credits, or partner changes.