import yaml

config_path = "/home/multica/.hermes/config.yaml"

with open(config_path, "r") as f:
    config = yaml.safe_load(f)

# 在 providers 部分添加 minimax
if "providers" not in config:
    config["providers"] = {}

config["providers"]["minimax"] = {
    "api_key": "sk-cp-4PndfHCLIer0Xoh67ARXqOtTqjH76AxCeXNsBd22-ljH7H4E8LGOh6CEe9TBWuLs3oDH56t-aXYDc4bPfa5hyRUJBdYZuNeg6r5ZcvkkqY-UaRdnLRwR0lY",
    "base_url": "https://api.minimax.io/v1"
}

# 写回配置文件
with open(config_path, "w") as f:
    yaml.dump(config, f, default_flow_style=False, allow_unicode=True)

print("Hermes config updated successfully")
