Skip to content

feat(atlascloud): add Atlas Cloud provider (OpenAI-compatible)#1150

Merged
tbille merged 1 commit into
mozilla-ai:mainfrom
jonigl:feat/atlascloud-provider
Jun 30, 2026
Merged

feat(atlascloud): add Atlas Cloud provider (OpenAI-compatible)#1150
tbille merged 1 commit into
mozilla-ai:mainfrom
jonigl:feat/atlascloud-provider

Conversation

@jonigl

@jonigl jonigl commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Atlas Cloud (https://www.atlascloud.ai) exposes an OpenAI-compatible API at https://api.atlascloud.ai/v1 serving DeepSeek, Qwen, Kimi, GLM and MiniMax models. Add it as a first-class provider so it can be selected as "atlascloud/" with its own ATLASCLOUD_API_KEY env var.

Implemented as a thin BaseOpenAIProvider subclass (no new dependency, reuses the openai client). Declared capabilities: completion, streaming, reasoning and list_models. Embeddings, moderation, vision/PDF, rerank, batch, responses and image generation are left off as they are not exposed on the /v1 base.

  • constants: register ATLASCLOUD in the LLMProvider enum
  • pyproject: add the empty "atlascloud" extra and include it in "all"
  • conftest: add deepseek-ai/deepseek-v4-flash to the model and reasoning model maps
  • tests: unit coverage for metadata, key/base resolution, missing-key error, capability flags and enum/loader registration

Description

Adds Atlas Cloud as a first-class, OpenAI-compatible provider. It already works today by pointing the openai provider at https://api.atlascloud.ai/v1; this PR makes it a named provider (atlascloud/<model>) with its own ATLASCLOUD_API_KEY / ATLASCLOUD_API_BASE env vars and auto-generated docs.

The provider is a thin BaseOpenAIProvider subclass that only sets configuration defaults and capability flags, so it reuses the existing openai client and needs no new dependency. Declared capabilities (completion, streaming, reasoning, list_models) reflect what Atlas Cloud exposes on its /v1 base; embeddings, moderation, vision/PDF, rerank, batch, responses and image generation are intentionally left off because they are not available there (image/video generation live on a separate /api/v1 base).

PR Type

  • 🆕 New Feature

Relevant issues

N/A

Checklist

  • I understand the code I am submitting.
  • I have added unit tests that prove my fix/feature works
  • I have run this code locally and verified it fixes the issue works correctly.
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines
  • AI Usage:
    • No AI was used.
    • AI was used for drafting/refactoring.
    • This is fully AI-generated.

AI Usage Information

  • AI Model used: Claude Opus 4.8 and Claude Opus 4.6

  • AI Developer Tool used: Claude Code and Visual Studio Code with GitHub Copilot built in extension

  • Any other info you'd like to share: AI assisted with code drafting and tests; design decisions and final review are mine.

  • I am an AI Agent filling out this form (check box if true)

Summary by CodeRabbit

  • New Features

    • Added support for the Atlas Cloud provider, including provider discovery and configuration.
    • Expanded the bundled “all” option to include additional provider extras.
    • Added a new atlascloud optional dependency entry.
  • Bug Fixes

    • Improved provider detection so Atlas Cloud can be selected from its string name.
    • Added validation for API key and base URL handling, with sensible defaults when not set.
  • Tests

    • Added coverage for Atlas Cloud setup, capability flags, and provider registration.

Atlas Cloud (https://www.atlascloud.ai) exposes an OpenAI-compatible API at
https://api.atlascloud.ai/v1 serving DeepSeek, Qwen, Kimi, GLM and MiniMax
models. Add it as a first-class provider so it can be selected as
"atlascloud/<model>" with its own ATLASCLOUD_API_KEY env var.

Implemented as a thin BaseOpenAIProvider subclass (no new dependency, reuses
the openai client). Declared capabilities: completion, streaming, reasoning
and list_models. Embeddings, moderation, vision/PDF, rerank, batch, responses
and image generation are left off as they are not exposed on the /v1 base.

- constants: register ATLASCLOUD in the LLMProvider enum
- pyproject: add the empty "atlascloud" extra and include it in "all"
- conftest: add deepseek-ai/deepseek-v4-flash to the model and reasoning model maps
- tests: unit coverage for metadata, key/base resolution, missing-key error,
  capability flags and enum/loader registration
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds the Atlascloud provider, registers it in the provider enum and package exports, expands the consolidated optional dependency set, and updates fixtures and unit tests to cover provider lookup and configuration.

Changes

Atlascloud provider support

Layer / File(s) Summary
Provider registration and packaging
pyproject.toml, src/any_llm/constants.py, src/any_llm/providers/atlascloud/__init__.py
project.optional-dependencies.all expands, a new atlascloud extra is added, LLMProvider gains ATLASCLOUD, and the provider package exports AtlascloudProvider.
Atlascloud provider implementation
src/any_llm/providers/atlascloud/atlascloud.py
AtlascloudProvider extends BaseOpenAIProvider with Atlas Cloud base settings, environment variable names, and completion/model-listing capability flags.
Fixtures and provider tests
tests/conftest.py, tests/unit/providers/test_atlascloud_provider.py
Test fixtures map LLMProvider.ATLASCLOUD to reasoning and base models, and unit tests cover metadata, API key and base resolution, capability flags, and loader registration.

Possibly related PRs

  • mozilla-ai/any-llm#1147: Adds another provider with the same enum, registration, and provider-test wiring pattern.

Suggested reviewers

  • tbille
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarises the new Atlas Cloud provider.
Description check ✅ Passed The description follows the template and includes the required sections, checklist, and AI usage details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@pyproject.toml`:
- Line 24: The OpenAI-compatible extras are missing the runtime SDK dependency
needed by BaseOpenAIProvider, so installing one of these providers can later
fail when AsyncOpenAI is imported. Update the dependency entries in
pyproject.toml so the relevant extras (AtlascloudProvider and the other
empty-list OpenAI-compatible extras like azureopenai, cascadia, nebius,
neosantara, openai, openrouter, and portkey) explicitly include openai. Keep the
fix aligned with the existing extras definitions in the dependency array for
each provider.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cfa1cfa7-c7f3-4cbd-a340-9a2e579c33d2

📥 Commits

Reviewing files that changed from the base of the PR and between ca0ef07 and 37adbd4.

📒 Files selected for processing (6)
  • pyproject.toml
  • src/any_llm/constants.py
  • src/any_llm/providers/atlascloud/__init__.py
  • src/any_llm/providers/atlascloud/atlascloud.py
  • tests/conftest.py
  • tests/unit/providers/test_atlascloud_provider.py

Comment thread pyproject.toml

@tbille tbille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amazing! thanks for the contribution @jonigl !! 🚀

@jonigl jonigl temporarily deployed to integration-tests June 30, 2026 13:20 — with GitHub Actions Inactive
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/any_llm/constants.py 100.00% <100.00%> (ø)
src/any_llm/providers/atlascloud/__init__.py 100.00% <100.00%> (ø)
src/any_llm/providers/atlascloud/atlascloud.py 100.00% <100.00%> (ø)

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tbille tbille merged commit c40d588 into mozilla-ai:main Jun 30, 2026
16 checks passed
@jonigl jonigl deleted the feat/atlascloud-provider branch July 1, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants