Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.4 KB
Raw Blame
"""QwenCloud LLM provider for Local Deep Research."""

from ..base import Exposure
from ..openai_base import OpenAICompatibleProvider


class QwenCloudProvider(OpenAICompatibleProvider):
    """QwenCloud provider using its OpenAI-compatible endpoint.

    QwenCloud (Alibaba's Qwen cloud platform) exposes an OpenAI-compatible
    API through its pay-as-you-go compatible-mode endpoint. API keys
    are issued at home.qwencloud.com/api-keys.
    """

    provider_name = "QwenCloud"
    api_key_setting = "llm.qwen.api_key"
    default_base_url = "https://maas.qwencloudapi.com/compatible-mode/v1"
    # Informational only (create_llm requires an explicit llm.model): the
    # flagship model from QwenCloud's own first-API-call quickstart, kept
    # concrete like deepseek/atlascloud rather than the "" no-fallback
    # convention used by providers without an obvious default.
    default_model = "qwen3.8-max"

    # Metadata for auto-discovery
    provider_key = "QWEN"
    company_name = "QwenCloud"
    is_cloud = True
    # Egress exposure (ADR-0007): cloud inference sink — data leaves the box.
    egress_exposure = Exposure.EXPOSING

    @classmethod
    def requires_auth_for_models(cls):
        """QwenCloud requires authentication for listing models.

        ``GET /compatible-mode/v1/models`` returns 401 without a valid
        Bearer key (verified live), so model discovery only runs once the
        API key is configured.
        """
        return True