docs: add Atlas Cloud provider integration guide#2145
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more β On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
π WalkthroughWalkthroughAdds Atlas Cloud as a new supported provider by introducing a Python example script that configures a ChangesAtlas Cloud Provider Addition
Estimated code review effortπ― 1 (Trivial) | β±οΈ ~3 minutes Suggested labels
Poem
π₯ Pre-merge checks | β 5β Passed checks (5 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. β¨ Finishing Touchesπ§ͺ Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot Do a thorough review of this PR. Read ALL existing reviewer comments above from Qodo, Coderabbit, and Gemini first β incorporate their findings. Review areas:
|
There was a problem hiding this comment.
Code Review
This pull request adds support and documentation for Atlas Cloud as a provider, updating the README and adding a new usage example. The review feedback points out that the llm parameter in Agent is deprecated and should be replaced with the model parameter to avoid deprecation warnings.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| llm={ | ||
| # Prefix with "openai/" so LiteLLM routes through the OpenAI-compatible path | ||
| "model": "openai/deepseek-ai/deepseek-v4-pro", | ||
| "api_base": "https://api.atlascloud.ai/v1", | ||
| "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key | ||
| }, |
There was a problem hiding this comment.
The llm parameter is deprecated in praisonaiagents in favor of model. To align with the modern API and avoid deprecation warnings, use the model parameter to pass the configuration dictionary.
| llm={ | |
| # Prefix with "openai/" so LiteLLM routes through the OpenAI-compatible path | |
| "model": "openai/deepseek-ai/deepseek-v4-pro", | |
| "api_base": "https://api.atlascloud.ai/v1", | |
| "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key | |
| }, | |
| model={ | |
| # Prefix with "openai/" so LiteLLM routes through the OpenAI-compatible path | |
| "model": "openai/deepseek-ai/deepseek-v4-pro", | |
| "api_base": "https://api.atlascloud.ai/v1", | |
| "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key | |
| }, |
| Setup: | ||
| export OPENAI_API_KEY=<your-atlas-cloud-key> # e.g. apikey-xxxxxxxx | ||
| # or pass api_key="..." directly in the llm dict below |
There was a problem hiding this comment.
Using
OPENAI_API_KEY to hold an Atlas Cloud key is confusing and dangerous: a developer who already has OPENAI_API_KEY set to a real OpenAI credential will silently send that key to Atlas Cloud (or, if they follow the setup instruction literally, they'll overwrite their OpenAI key). A dedicated env var avoids the collision entirely.
| Setup: | |
| export OPENAI_API_KEY=<your-atlas-cloud-key> # e.g. apikey-xxxxxxxx | |
| # or pass api_key="..." directly in the llm dict below | |
| Setup: | |
| export ATLAS_CLOUD_API_KEY=<your-atlas-cloud-key> # e.g. apikey-xxxxxxxx | |
| # or pass api_key="..." directly in the llm dict below |
| # Prefix with "openai/" so LiteLLM routes through the OpenAI-compatible path | ||
| "model": "openai/deepseek-ai/deepseek-v4-pro", | ||
| "api_base": "https://api.atlascloud.ai/v1", | ||
| "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key |
There was a problem hiding this comment.
The
api_key lookup should use the dedicated ATLAS_CLOUD_API_KEY env var to match the updated setup instruction and avoid silently picking up a real OpenAI key from the environment.
| "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key | |
| "api_key": os.environ.get("ATLAS_CLOUD_API_KEY"), # your Atlas Cloud key |
There was a problem hiding this comment.
π§Ή Nitpick comments (1)
examples/python/providers/atlascloud/atlascloud_example.py (1)
21-30: π§Ή Nitpick | π΅ Trivial | β‘ Quick winFail fast when the Atlas Cloud key is missing
At Line 28,
os.environ.get("OPENAI_API_KEY")can beNone, which defers failure to the first API call. Add an explicit check so the example fails with a clear setup message.Proposed change
agent = Agent( instructions="You are a helpful assistant", llm={ # Prefix with "openai/" so LiteLLM routes through the OpenAI-compatible path "model": "openai/deepseek-ai/deepseek-v4-pro", "api_base": "https://api.atlascloud.ai/v1", - "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key + "api_key": os.environ.get("OPENAI_API_KEY"), # your Atlas Cloud key }, ) + +if not agent.api_key: + raise ValueError( + "Missing OPENAI_API_KEY. Set it to your Atlas Cloud key before running this example." + )π€ Prompt for 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. In `@examples/python/providers/atlascloud/atlascloud_example.py` around lines 21 - 30, The os.environ.get("OPENAI_API_KEY") call in the Agent initialization can return None if the environment variable is not set, causing the error to be deferred until the first API call. Add an explicit validation check before the Agent initialization to verify that the API key is not None, and if it is missing, raise a clear error or exit with a helpful setup message that tells the user to set the OPENAI_API_KEY environment variable.
π€ 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.
Nitpick comments:
In `@examples/python/providers/atlascloud/atlascloud_example.py`:
- Around line 21-30: The os.environ.get("OPENAI_API_KEY") call in the Agent
initialization can return None if the environment variable is not set, causing
the error to be deferred until the first API call. Add an explicit validation
check before the Agent initialization to verify that the API key is not None,
and if it is missing, raise a clear error or exit with a helpful setup message
that tells the user to set the OPENAI_API_KEY environment variable.
βΉοΈ Review info
βοΈ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fa3146a3-2a2e-4b76-a5b6-d7c13dc8d821
π Files selected for processing (2)
README.mdexamples/python/providers/atlascloud/atlascloud_example.py
|
@claude You are the FINAL architecture reviewer. If the branch is under MervinPraison/PraisonAI (not a fork), you are able to make modifications to this branch and push directly. SCOPE: Focus ONLY on Python packages (praisonaiagents, praisonai). Do NOT modify praisonai-rust or praisonai-ts. Read ALL comments above from Gemini, Qodo, CodeRabbit, and Copilot carefully before responding. Phase 1: Review per AGENTS.md
Phase 2: FIX Valid Issues Phase 3: Final Verdict |
|
Claude finished @MervinPraison's task ββ View job Architecture Review for Atlas Cloud Provider IntegrationTodo List:
π Review SummaryThis PR adds documentation for Atlas Cloud as a new provider through two changes:
β Architecture Validation (per AGENTS.md)Protocol-driven: β Pass - Documentation-only change, no core SDK modifications Backward compatible: β Pass - No existing functionality affected Performance: β Pass - No runtime impact (docs/examples only) π Reviewer Feedback AnalysisValid Issues Found:
π― Final VerdictStatus: β Changes Required This PR cannot be merged in its current state due to the critical security issue of API key collision. The following changes are required: Required Changes:
Note to PR AuthorSince this PR is from a fork, I cannot make these changes directly. Please implement the required fixes above, particularly the critical API key collision issue, before this can be merged. |
Adds documentation for using Atlas Cloud (an OpenAI-compatible API gateway with 300+ models) with PraisonAI via its OpenAI-compatible / LiteLLM path, mirroring the existing provider examples. No code changes.
examples/python/providers/atlascloud/atlascloud_example.pyfollowing the same pattern as the other provider examples (e.g. vLLM, OpenRouter), using the documented OpenAI-compatiblellmdict config (model/api_base/api_key).Contact: marketing@atlascloud.ai
Summary by CodeRabbit
New Features
Documentation