Fix wrong-prefix silent ignore and Minimax image understand host
- Remove "Use .cmd for this role" reply when owner uses wrong prefix; wrong-prefix commands are now silently ignored for all users - Fix AIImageUnderstandConfig default api_host to api.minimax.chat (minimax-coding-plan-mcp routes all calls there, not api.minimax.io) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,4 +2,4 @@ TG_API_ID=123456
|
|||||||
TG_API_HASH=your_api_hash_here
|
TG_API_HASH=your_api_hash_here
|
||||||
SESSION_DIR=sessions
|
SESSION_DIR=sessions
|
||||||
ACCOUNTS_JSON=[{"name":"personal","session":"personal"},{"name":"work","session":"work"}]
|
ACCOUNTS_JSON=[{"name":"personal","session":"personal"},{"name":"work","session":"work"}]
|
||||||
# AI_CONFIG={"default_model":"mm","context_messages":12,"prompt":{"root":"prompts/ai","system_file":"system.md","parts_dir":"parts"},"image_understand":{"api_key":"your_minimax_token_plan_key_here","api_host":"https://api.minimax.io","command":["uvx","minimax-coding-plan-mcp","-y"]},"providers":{"minimax":{"api_key":"your_minimax_api_key_here","base_url":"https://api.minimax.chat/v1"},"openrouter":{"api_key":"your_openrouter_api_key_here","base_url":"https://openrouter.ai/api/v1"}},"models":{"mm":{"provider":"minimax","model":"MiniMax-Text-01"},"or":{"provider":"openrouter","model":"openai/gpt-4o-mini"}}}
|
# AI_CONFIG={"default_model":"mm","context_messages":12,"prompt":{"root":"prompts/ai","system_file":"system.md","parts_dir":"parts"},"image_understand":{"api_key":"your_minimax_token_plan_key_here","api_host":"https://api.minimax.chat","command":["uvx","minimax-coding-plan-mcp","-y"]},"providers":{"minimax":{"api_key":"your_minimax_api_key_here","base_url":"https://api.minimax.chat/v1"},"openrouter":{"api_key":"your_openrouter_api_key_here","base_url":"https://openrouter.ai/api/v1"}},"models":{"mm":{"provider":"minimax","model":"MiniMax-Text-01"},"or":{"provider":"openrouter","model":"openai/gpt-4o-mini"}}}
|
||||||
|
|||||||
@@ -80,10 +80,6 @@ class CommandDispatcher:
|
|||||||
|
|
||||||
expected_prefix = definition.expected_prefix(is_owner)
|
expected_prefix = definition.expected_prefix(is_owner)
|
||||||
if parsed.prefix != expected_prefix:
|
if parsed.prefix != expected_prefix:
|
||||||
if is_owner:
|
|
||||||
await message.reply_text(
|
|
||||||
f"Use {expected_prefix}{definition.name} for this account role"
|
|
||||||
)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
ctx = CommandContext(
|
ctx = CommandContext(
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class AIModelConfig:
|
|||||||
@dataclass(slots=True)
|
@dataclass(slots=True)
|
||||||
class AIImageUnderstandConfig:
|
class AIImageUnderstandConfig:
|
||||||
api_key: str
|
api_key: str
|
||||||
api_host: str = "https://api.minimax.io"
|
api_host: str = "https://api.minimax.chat"
|
||||||
command: tuple[str, ...] = ("uvx", "minimax-coding-plan-mcp", "-y")
|
command: tuple[str, ...] = ("uvx", "minimax-coding-plan-mcp", "-y")
|
||||||
timeout: float | None = None
|
timeout: float | None = None
|
||||||
|
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
},
|
},
|
||||||
"image_understand": {
|
"image_understand": {
|
||||||
"api_key": "your_minimax_token_plan_key_here",
|
"api_key": "your_minimax_token_plan_key_here",
|
||||||
"api_host": "https://api.minimax.io",
|
"api_host": "https://api.minimax.chat",
|
||||||
"command": ["uvx", "minimax-coding-plan-mcp", "-y"]
|
"command": ["uvx", "minimax-coding-plan-mcp", "-y"]
|
||||||
},
|
},
|
||||||
"providers": {
|
"providers": {
|
||||||
"minimax": {
|
"minimax": {
|
||||||
"api_key": "your_minimax_api_key_here",
|
"api_key": "your_minimax_api_key_here",
|
||||||
"base_url": "https://api.minimax.chat/v1"
|
"base_url": "https://api.minimax.io/v1"
|
||||||
},
|
},
|
||||||
"openrouter": {
|
"openrouter": {
|
||||||
"api_key": "your_openrouter_api_key_here",
|
"api_key": "your_openrouter_api_key_here",
|
||||||
|
|||||||
Reference in New Issue
Block a user