feat(provider): add Atlas Cloud support - #92
Conversation
Signed-off-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthroughAdds Atlas Cloud support through the OpenAI-compatible Chat Completions API. The change adds provider construction, registry dispatch, API-key configuration, tests, README details, and an unreleased changelog entry. ChangesAtlas Cloud provider integration
Estimated code review effort: 2 (Simple) | ~15 minutes Merge Risk: ⚪ Minimal · up to This change adds Atlas Cloud support with configuration, endpoint, registry, documentation, and streaming updates; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@internal/provider/atlascloud_test.go`:
- Around line 5-40: Convert the independent Atlas Cloud cases in
internal/provider/atlascloud_test.go:5-40 into table-driven []struct{name,
input, want} tests covering constructor defaults, custom configuration, missing
API keys, and streaming support; combine the default and custom base-URL cases
into a table in internal/provider/registry_test.go:18-36; and add the Atlas
Cloud provider-to-environment-variable mapping as a row in the existing table in
internal/config/config_test.go:249-251.
In `@internal/provider/atlascloud.go`:
- Around line 16-18: Update the NewAtlasCloud error path around NewOpenAI to
detect a missing API key and return an input-category ProviderError with
guidance to set ATLASCLOUD_API_KEY, while preserving existing handling for other
initialization errors. Extend TestNewAtlasCloud_MissingAPIKey to assert both the
ProviderError category and the guidance message.
🪄 Autofix
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 0e3a4902-e539-4d36-a34c-b9a886a22900
⛔ Files ignored due to path filters (1)
docs/src/providers.mdis excluded by!docs/**
📒 Files selected for processing (9)
CHANGELOG.mdREADME.mdcmd/run_test.gointernal/config/config.gointernal/config/config_test.gointernal/provider/atlascloud.gointernal/provider/atlascloud_test.gointernal/provider/registry.gointernal/provider/registry_test.go
Signed-off-by: binyangzhu000-sudo <142146267+binyangzhu000-sudo@users.noreply.github.com>
Summary
ATLASCLOUD_API_KEYand support config orAXE_ATLASCLOUD_BASE_URLoverridesTesting
go test -race ./...go vet ./...go build ./...golangci-lint run(v2.8.0, 0 issues)atlascloud/qwen/qwen3.8-maxreturned the expected responseSummary
This update adds Atlas Cloud as an OpenAI-compatible provider. It supports API key resolution, custom base URLs, streaming, registry integration, tests, and documentation.
Added
ATLASCLOUD_API_KEYconfiguration mapping.Changed
atlascloud.