Cloud AI Provider Presets (core/cloud_presets.py)

autoclip · backend/core/cloud_presets.py · python · MIT
ai, integration, tag:configuration

Defines configuration presets for OpenAI-compatible AI providers like DeepSeek and Kimi. Use this to standardize API settings and base URLs across CLI, MCP, and web interfaces.

# Source: https://github.com/zhouxiaoka/autoclip | License: MIT | Copyright 2024 AutoClip Team
# Provided via justclaw.it.com; keep this notice with the code.
"""
云端 OpenAI 兼容预设:DeepSeek / Seed / Kimi / GLM / Grok / Infistar / 88API(赞助)。

底层仍是 openai + 官方 base_url,和 Ollama 预设同一套路,但必须带各家自己的 key,
不能复用用户的 OpenAI key。设置页、CLI、MCP 都用 `--provider deepseek` 这种名字。
"""
from __future__ import annotations

from dataclasses import dataclass
from typing import Dict, Optional, Tuple


@dataclass(frozen=True)
class CloudPreset:
    key: str
    display_name: str
    base_url: str
    default_model: str
    api_key_setting: str
    docs_url: str
    hint: str


CLOUD_PRESETS: Dict[str, CloudPreset] = {
    "deepseek": CloudPreset(
        key="deepseek",
        display_name="DeepSeek",
        base_url="h

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key