import yaml

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

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

# 更新 minimax provider 配置，添加 api_type
for provider in config.get("custom_providers", []):
    if provider["name"] == "minimax":
        provider["api_type"] = "openai"
        print("Added api_type: openai to minimax provider")
        break

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

print("Config updated successfully")
