vision-agents-plugins-minimax 0.6.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,102 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .cursor/*
7
+ # Distribution / packaging
8
+ .Python
9
+ build/
10
+ dist/
11
+ downloads/
12
+ develop-eggs/
13
+ eggs/
14
+ .eggs/
15
+ lib64/
16
+ parts/
17
+ sdist/
18
+ var/
19
+ wheels/
20
+ share/python-wheels/
21
+ pip-wheel-metadata/
22
+ MANIFEST
23
+ *.egg-info/
24
+ *.egg
25
+
26
+ # Installer logs
27
+ pip-log.txt
28
+ pip-delete-this-directory.txt
29
+
30
+ # Unit test / coverage reports
31
+ htmlcov/
32
+ .tox/
33
+ .nox/
34
+ .coverage
35
+ .coverage.*
36
+ .cache
37
+ coverage.xml
38
+ nosetests.xml
39
+ *.cover
40
+ *.py,cover
41
+ .hypothesis/
42
+ .pytest_cache/
43
+
44
+ # Type checker / lint caches
45
+ .mypy_cache/
46
+ .dmypy.json
47
+ dmypy.json
48
+ .pytype/
49
+ .pyre/
50
+ .ruff_cache/
51
+
52
+ # Environments
53
+ .venv
54
+ env/
55
+ venv/
56
+ ENV/
57
+ env.bak/
58
+ venv.bak/
59
+ .env
60
+ .env.local
61
+ .env.*.local
62
+ .env.bak
63
+ pyvenv.cfg
64
+ .python-version
65
+
66
+ # Editors / IDEs
67
+ .vscode/
68
+ .idea/
69
+
70
+ # Jupyter Notebook
71
+ .ipynb_checkpoints/
72
+
73
+ # OS / Misc
74
+ .DS_Store
75
+ *.log
76
+
77
+ # Tooling & repo-specific
78
+ pyrightconfig.json
79
+ shell.nix
80
+ bin/*
81
+ lib/*
82
+ stream-py/
83
+
84
+ # Example lock files (regenerated by uv sync)
85
+ examples/*/uv.lock
86
+ plugins/*/example/uv.lock
87
+
88
+ # Artifacts / assets
89
+ *.pt
90
+ *.kef
91
+ *.onnx
92
+ profile.html
93
+
94
+ /opencode.json
95
+ .ralph-tui/
96
+ .claude/*
97
+ !.claude/skills/
98
+
99
+ .uv-cache/
100
+
101
+ # pytest json report
102
+ .report.json
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: vision-agents-plugins-minimax
3
+ Version: 0.6.3
4
+ Summary: MiniMax plugin for vision agents
5
+ Project-URL: Documentation, https://visionagents.ai/
6
+ Project-URL: Website, https://visionagents.ai/
7
+ Project-URL: Source, https://github.com/GetStream/Vision-Agents
8
+ License-Expression: MIT
9
+ Keywords: AI,agents,chat,llm,minimax,real-time,voice agents
10
+ Requires-Python: >=3.10
11
+ Requires-Dist: openai<3,>=2.26.0
12
+ Requires-Dist: vision-agents
13
+ Requires-Dist: vision-agents-plugins-openai
14
+ Description-Content-Type: text/markdown
15
+
16
+ # MiniMax Plugin for Vision Agents
17
+
18
+ The MiniMax plugin adds the [MiniMax](https://platform.minimax.io) family of language models as a first-class LLM provider for [Vision Agents](https://visionagents.ai). It uses the OpenAI-compatible Chat Completions API at `https://api.minimax.io/v1`, so the implementation inherits the streaming and tool-calling behavior of the OpenAI Chat Completions plugin.
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ uv add "vision-agents-plugins-minimax"
24
+ ```
25
+
26
+ ## Configuration
27
+
28
+ Set your MiniMax API key (sign up at <https://platform.minimax.io>):
29
+
30
+ ```bash
31
+ export MINIMAX_API_KEY=...
32
+ ```
33
+
34
+ The plugin also honors `MINIMAX_BASE_URL` for users that proxy the API.
35
+
36
+ ## Models
37
+
38
+ | Model | Description |
39
+ |-------|-------------|
40
+ | `MiniMax-M3` (default) | Latest flagship model. 512K context window, up to 128K output, supports image input. |
41
+ | `MiniMax-M2.7` | Previous generation flagship model. |
42
+ | `MiniMax-M2.7-highspeed` | Low-latency variant of M2.7. |
43
+
44
+ ## Usage
45
+
46
+ ```python
47
+ from vision_agents.plugins import minimax
48
+
49
+ llm = minimax.LLM() # defaults to MiniMax-M3
50
+ llm = minimax.LLM(model="MiniMax-M2.7")
51
+ ```
52
+
53
+ ## Notes
54
+
55
+ - Default base URL is `https://api.minimax.io/v1` (overseas). Do not use `api.minimax.chat` for production traffic.
56
+ - Default `temperature` is `1.0` (the API rejects `0.0`).
57
+ - The `response_format` field is not supported by the MiniMax Chat Completions API and is intentionally not exposed.
@@ -0,0 +1,42 @@
1
+ # MiniMax Plugin for Vision Agents
2
+
3
+ The MiniMax plugin adds the [MiniMax](https://platform.minimax.io) family of language models as a first-class LLM provider for [Vision Agents](https://visionagents.ai). It uses the OpenAI-compatible Chat Completions API at `https://api.minimax.io/v1`, so the implementation inherits the streaming and tool-calling behavior of the OpenAI Chat Completions plugin.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ uv add "vision-agents-plugins-minimax"
9
+ ```
10
+
11
+ ## Configuration
12
+
13
+ Set your MiniMax API key (sign up at <https://platform.minimax.io>):
14
+
15
+ ```bash
16
+ export MINIMAX_API_KEY=...
17
+ ```
18
+
19
+ The plugin also honors `MINIMAX_BASE_URL` for users that proxy the API.
20
+
21
+ ## Models
22
+
23
+ | Model | Description |
24
+ |-------|-------------|
25
+ | `MiniMax-M3` (default) | Latest flagship model. 512K context window, up to 128K output, supports image input. |
26
+ | `MiniMax-M2.7` | Previous generation flagship model. |
27
+ | `MiniMax-M2.7-highspeed` | Low-latency variant of M2.7. |
28
+
29
+ ## Usage
30
+
31
+ ```python
32
+ from vision_agents.plugins import minimax
33
+
34
+ llm = minimax.LLM() # defaults to MiniMax-M3
35
+ llm = minimax.LLM(model="MiniMax-M2.7")
36
+ ```
37
+
38
+ ## Notes
39
+
40
+ - Default base URL is `https://api.minimax.io/v1` (overseas). Do not use `api.minimax.chat` for production traffic.
41
+ - Default `temperature` is `1.0` (the API rejects `0.0`).
42
+ - The `response_format` field is not supported by the MiniMax Chat Completions API and is intentionally not exposed.
@@ -0,0 +1,42 @@
1
+ [build-system]
2
+ requires = ["hatchling", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "vision-agents-plugins-minimax"
7
+ dynamic = ["version"]
8
+ description = "MiniMax plugin for vision agents"
9
+ readme = "README.md"
10
+ keywords = ["minimax", "llm", "real-time", "chat", "AI", "voice agents", "agents"]
11
+ requires-python = ">=3.10"
12
+ license = "MIT"
13
+ dependencies = [
14
+ "vision-agents",
15
+ "vision-agents-plugins-openai",
16
+ "openai>=2.26.0,<3",
17
+ ]
18
+
19
+ [project.urls]
20
+ Documentation = "https://visionagents.ai/"
21
+ Website = "https://visionagents.ai/"
22
+ Source = "https://github.com/GetStream/Vision-Agents"
23
+
24
+ [tool.hatch.version]
25
+ source = "vcs"
26
+ raw-options = { root = "..", search_parent_directories = true, fallback_version = "0.0.0" }
27
+
28
+ [tool.hatch.build.targets.wheel]
29
+ packages = ["vision_agents"]
30
+
31
+ [tool.hatch.build.targets.sdist]
32
+ include = ["/vision_agents"]
33
+
34
+ [tool.uv.sources]
35
+ vision-agents = { workspace = true }
36
+ vision-agents-plugins-openai = { workspace = true }
37
+
38
+ [dependency-groups]
39
+ dev = [
40
+ "pytest>=8.4.1",
41
+ "pytest-asyncio>=1.0.0",
42
+ ]
@@ -0,0 +1,3 @@
1
+ from .minimax_llm import MiniMaxLLM as LLM
2
+
3
+ __all__ = ["LLM"]
@@ -0,0 +1,83 @@
1
+ """MiniMax LLM implementation using OpenAI-compatible Chat Completions API.
2
+
3
+ MiniMax provides an OpenAI-compatible API at https://api.minimax.io/v1.
4
+ Supported models: MiniMax-M3 (default), MiniMax-M2.7, MiniMax-M2.7-highspeed.
5
+ """
6
+
7
+ import logging
8
+ import os
9
+ from typing import Any
10
+
11
+ from openai import AsyncOpenAI
12
+ from vision_agents.plugins.openai import ChatCompletionsLLM
13
+
14
+ logger = logging.getLogger(__name__)
15
+
16
+
17
+ PLUGIN_NAME = "minimax"
18
+
19
+ DEFAULT_BASE_URL = "https://api.minimax.io/v1"
20
+ DEFAULT_MODEL = "MiniMax-M3"
21
+
22
+
23
+ class MiniMaxLLM(ChatCompletionsLLM):
24
+ """MiniMax LLM using OpenAI-compatible Chat Completions API.
25
+
26
+ MiniMax provides high-performance language models accessible through
27
+ an OpenAI-compatible API. This plugin reuses the OpenAI Chat Completions
28
+ streaming and tool-calling implementation, including ``<think>`` reasoning
29
+ stripping for reasoning models such as MiniMax-M3.
30
+
31
+ Examples:
32
+
33
+ from vision_agents.plugins import minimax
34
+ llm = minimax.LLM()
35
+ """
36
+
37
+ provider_name = PLUGIN_NAME
38
+
39
+ def __init__(
40
+ self,
41
+ *,
42
+ model: str = DEFAULT_MODEL,
43
+ api_key: str | None = None,
44
+ base_url: str | None = None,
45
+ client: AsyncOpenAI | None = None,
46
+ max_tokens: int | None = None,
47
+ tools_max_rounds: int = 3,
48
+ ) -> None:
49
+ """Initialize the MiniMaxLLM class.
50
+
51
+ Args:
52
+ model: The MiniMax model to use.
53
+ Defaults to ``"MiniMax-M3"`` (latest flagship, 512K context).
54
+ Supported models: ``"MiniMax-M3"``, ``"MiniMax-M2.7"``,
55
+ ``"MiniMax-M2.7-highspeed"``.
56
+ api_key: Optional API key. Defaults to ``MINIMAX_API_KEY`` env var.
57
+ base_url: Optional base URL. Defaults to
58
+ ``https://api.minimax.io/v1`` (overseas endpoint).
59
+ client: Optional ``AsyncOpenAI`` client for dependency injection.
60
+ max_tokens: This sets the upper limit for the number of tokens the
61
+ model can generate in response.
62
+ tools_max_rounds: max calling rounds for multi-hop tool call.
63
+ """
64
+ if client is None:
65
+ if api_key is None:
66
+ api_key = os.environ.get("MINIMAX_API_KEY")
67
+ if base_url is None:
68
+ base_url = os.environ.get("MINIMAX_BASE_URL", DEFAULT_BASE_URL)
69
+ super().__init__(
70
+ model=model,
71
+ api_key=api_key,
72
+ base_url=base_url,
73
+ client=client,
74
+ tools_max_rounds=tools_max_rounds,
75
+ )
76
+ self._max_tokens = max_tokens
77
+
78
+ def _extra_request_kwargs(self) -> dict[str, Any]:
79
+ # MiniMax rejects temperature 0.0, so default to 1.0.
80
+ kwargs: dict[str, Any] = {"temperature": 1.0}
81
+ if self._max_tokens is not None:
82
+ kwargs["max_tokens"] = self._max_tokens
83
+ return kwargs