Remove MiniMax MCP support

This commit is contained in:
2026-05-18 18:32:51 +02:00
parent aab630661f
commit 1ef2893345
10 changed files with 66 additions and 750 deletions

View File

@@ -52,14 +52,6 @@ class AIModelConfig:
description: str | None = None
@dataclass(slots=True)
class AIImageUnderstandConfig:
api_key: str
api_host: str = "https://api.minimax.chat"
command: tuple[str, ...] = ("uvx", "minimax-coding-plan-mcp", "-y")
timeout: float | None = None
@dataclass(slots=True)
class AIPromptConfig:
root: Path
@@ -73,7 +65,6 @@ class AIConfig:
default_model: str
context_messages: int
prompt: AIPromptConfig
image_understand: AIImageUnderstandConfig | None = None
providers: dict[str, AIProviderConfig] = field(default_factory=dict)
models: dict[str, AIModelConfig] = field(default_factory=dict)
workspace_dir: Path = field(default_factory=lambda: Path("workspace"))
@@ -136,22 +127,6 @@ def _parse_float(value: Any, *, field_name: str) -> float:
raise ValueError(f"{field_name} must be a number") from exc
def _parse_command_tokens(value: Any, *, field_name: str, default: tuple[str, ...]) -> tuple[str, ...]:
if value is None:
return default
if isinstance(value, str):
tokens = value.strip().split()
if not tokens:
raise ValueError(f"{field_name} must not be empty")
return tuple(tokens)
if isinstance(value, list):
tokens = [str(item).strip() for item in value if str(item).strip()]
if not tokens:
raise ValueError(f"{field_name} must not be empty")
return tuple(tokens)
raise ValueError(f"{field_name} must be a string or a list")
def _parse_mapping(value: Any, *, field_name: str) -> dict[str, Any]:
if value is None:
return {}
@@ -252,31 +227,6 @@ def _parse_ai_config(raw_ai: Any, *, root: Path) -> AIConfig | None:
if context_messages < 0:
raise ValueError("ai.context_messages must be >= 0")
image_understand_raw = _parse_mapping(raw_ai.get("image_understand"), field_name="ai.image_understand")
image_understand: AIImageUnderstandConfig | None = None
if image_understand_raw:
api_key = str(image_understand_raw.get("api_key", "")).strip()
if not api_key:
raise ValueError("ai.image_understand.api_key is required")
api_host = str(image_understand_raw.get("api_host", "https://api.minimax.io")).strip()
if not api_host:
raise ValueError("ai.image_understand.api_host is required")
command = _parse_command_tokens(
image_understand_raw.get("command"),
field_name="ai.image_understand.command",
default=("uvx", "minimax-coding-plan-mcp", "-y"),
)
timeout_value = image_understand_raw.get("timeout")
timeout = None
if timeout_value is not None:
timeout = _parse_float(timeout_value, field_name="ai.image_understand.timeout")
image_understand = AIImageUnderstandConfig(
api_key=api_key,
api_host=api_host,
command=command,
timeout=timeout,
)
providers_raw = _parse_mapping(raw_ai.get("providers"), field_name="ai.providers")
models_raw = _parse_mapping(raw_ai.get("models"), field_name="ai.models")
@@ -341,7 +291,6 @@ def _parse_ai_config(raw_ai: Any, *, root: Path) -> AIConfig | None:
default_model=default_model,
context_messages=context_messages,
prompt=prompt,
image_understand=image_understand,
providers=providers,
models=models,
workspace_dir=workspace_dir,