Merge branch 'main' into feat/dbgpt_cli_start

This commit is contained in:
alan.cl
2026-03-20 17:02:38 +08:00
21 changed files with 135 additions and 20 deletions

View File

@@ -122,8 +122,6 @@ clean-dist: ## Clean up the distribution
.PHONY: build
build: clean-dist ## Package the project for distribution
uv build --all-packages
rm -rf dist/dbgpt_app-*
rm -rf dist/dbgpt_serve-*
.PHONY: publish
publish: build ## Upload the package to PyPI

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-acc-auto"
version = "0.7.5"
version = "0.8.0rc1"
description = "Add your description here"
authors = [
{ name = "csunny", email = "cfqcsunny@gmail.com" }

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -2,7 +2,7 @@
# https://github.com/astral-sh/uv/issues/2252#issuecomment-2624150395
[project]
name = "dbgpt-acc-flash-attn"
version = "0.7.5"
version = "0.8.0rc1"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-app"
version = "0.7.5"
version = "0.8.0rc1"
description = "Add your description here"
authors = [
{ name = "csunny", email = "cfqcsunny@gmail.com" }

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-client"
version = "0.7.5"
version = "0.8.0rc1"
description = "Add your description here"
authors = [
{ name = "csunny", email = "cfqcsunny@gmail.com" }

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt"
version = "0.7.5"
version = "0.8.0rc1"
description = """DB-GPT is an experimental open-source project that uses localized GPT \
large models to interact with your data and environment. With this solution, you can be\
assured that there is no risk of data leakage, and your data is 100% private and secure.\

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -24,7 +24,7 @@ if TYPE_CHECKING:
ClientType = Union[AsyncAzureOpenAI, AsyncOpenAI]
_DEFAULT_MODEL = "MiniMax-M2.5"
_DEFAULT_MODEL = "MiniMax-M2.7"
@auto_register_resource(
@@ -160,6 +160,28 @@ class MiniMaxLLMClient(OpenAILLMClient):
register_proxy_model_adapter(
MiniMaxLLMClient,
supported_models=[
ModelMetadata(
model="MiniMax-M2.7",
context_length=204800,
max_output_length=192000,
description=(
"MiniMax-M2.7 by MiniMax. Latest flagship model with enhanced "
"reasoning and coding."
),
link="https://platform.minimax.io/docs/api-reference/text-openai-api",
function_calling=True,
),
ModelMetadata(
model="MiniMax-M2.7-highspeed",
context_length=204800,
max_output_length=192000,
description=(
"MiniMax-M2.7-highspeed by MiniMax. High-speed version of M2.7 "
"for low-latency scenarios."
),
link="https://platform.minimax.io/docs/api-reference/text-openai-api",
function_calling=True,
),
ModelMetadata(
model="MiniMax-M2.5",
context_length=204800,

View File

@@ -0,0 +1,95 @@
"""Tests for MiniMax proxy LLM client."""
import os
from unittest.mock import patch
import pytest
from dbgpt.model.proxy.llms.minimax import (
_DEFAULT_MODEL,
MiniMaxDeployModelParameters,
MiniMaxLLMClient,
)
class TestMiniMaxDefaults:
"""Test MiniMax default model configuration."""
def test_default_model_is_m27(self):
assert _DEFAULT_MODEL == "MiniMax-M2.7"
@patch.dict(os.environ, {"MINIMAX_API_KEY": "test-key"})
def test_client_default_model(self):
client = MiniMaxLLMClient()
assert client.default_model == "MiniMax-M2.7"
@patch.dict(os.environ, {"MINIMAX_API_KEY": "test-key"})
def test_client_custom_model(self):
client = MiniMaxLLMClient(model="MiniMax-M2.5")
assert client.default_model == "MiniMax-M2.5"
def test_deploy_params_provider(self):
assert MiniMaxDeployModelParameters.provider == "proxy/minimax"
class TestMiniMaxModelList:
"""Test MiniMax model registration."""
def test_model_list_contains_m27(self):
# Import triggers registration
from dbgpt.model.adapter.base import get_model_adapter
from dbgpt.model.proxy.llms.minimax import MiniMaxLLMClient # noqa: F811
adapter = get_model_adapter("proxy/minimax", "MiniMax-M2.7")
assert adapter is not None
def test_model_list_contains_m27_highspeed(self):
from dbgpt.model.adapter.base import get_model_adapter
from dbgpt.model.proxy.llms.minimax import MiniMaxLLMClient # noqa: F811
adapter = get_model_adapter("proxy/minimax", "MiniMax-M2.7-highspeed")
assert adapter is not None
def test_model_list_contains_m25(self):
from dbgpt.model.adapter.base import get_model_adapter
from dbgpt.model.proxy.llms.minimax import MiniMaxLLMClient # noqa: F811
adapter = get_model_adapter("proxy/minimax", "MiniMax-M2.5")
assert adapter is not None
def test_model_list_contains_m25_highspeed(self):
from dbgpt.model.adapter.base import get_model_adapter
from dbgpt.model.proxy.llms.minimax import MiniMaxLLMClient # noqa: F811
adapter = get_model_adapter("proxy/minimax", "MiniMax-M2.5-highspeed")
assert adapter is not None
class TestMiniMaxTemperatureClamping:
"""Test temperature clamping behavior."""
@patch.dict(os.environ, {"MINIMAX_API_KEY": "test-key"})
def test_valid_temperature_passthrough(self):
from dbgpt.core import ModelMessage, ModelRequest
client = MiniMaxLLMClient()
request = ModelRequest(
model="MiniMax-M2.7",
messages=[ModelMessage(role="user", content="hi")],
temperature=0.5,
)
payload = client._build_request(request)
assert payload["temperature"] == 0.5
@patch.dict(os.environ, {"MINIMAX_API_KEY": "test-key"})
def test_high_temperature_clamped(self):
from dbgpt.core import ModelMessage, ModelRequest
client = MiniMaxLLMClient()
request = ModelRequest(
model="MiniMax-M2.7",
messages=[ModelMessage(role="user", content="hi")],
temperature=2.0,
)
payload = client._build_request(request)
assert payload["temperature"] == 1.0

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-ext"
version = "0.7.5"
version = "0.8.0rc1"
description = "Add your description here"
authors = [
{ name = "csunny", email = "cfqcsunny@gmail.com" }

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-sandbox"
version = "0.7.3"
version = "0.8.0rc1"
description = "A secure sandbox execution environment for DB-GPT Agent"
authors = [
{ name = "csunny", email = "cfqcsunny@gmail.com" }

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-serve"
version = "0.7.5"
version = "0.8.0rc1"
description = "Add your description here"
authors = [
{ name = "csunny", email = "cfqcsunny@gmail.com" }

View File

@@ -1 +1 @@
version = "0.7.5"
version = "0.8.0rc1"

View File

@@ -1,6 +1,6 @@
[project]
name = "dbgpt-mono"
version = "0.7.5"
version = "0.8.0rc1"
description = """DB-GPT is an experimental open-source project that uses localized GPT \
large models to interact with your data and environment. With this solution, you can be\
assured that there is no risk of data leakage, and your data is 100% private and secure.\

View File

@@ -38,7 +38,7 @@ export const MODEL_ICON_INFO: Record<string, ModelIconInfo> = {
minimax: {
label: 'MiniMax',
icon: '/models/minimax.png',
patterns: ['minimax', 'm2.5', 'm2.1', 'm2'],
patterns: ['minimax', 'm2.7', 'm2.5', 'm2.1', 'm2'],
},
doubao: {
label: 'Doubao',