# shellcheck shell=dash

___x_cmd log init siliconflow
xrc:mod:lib     siliconflow    cfg model user chat/_index

___X_CMD_SILICONFLOW_DEFAULT_FIRST_MODEL='deepseek-ai/DeepSeek-R1'
___X_CMD_SILICONFLOW_DEFAULT_ENDPOINT='https://api.siliconflow.cn'

___x_cmd_siliconflow___main(){
    [ "$#" -gt 0 ] ||   set -- --help

    local op="$1";      shift
    case "$op" in
        chat)           ___x_cmd_siliconflow_chat "$@"          ;;
        init|--init)    ___x_cmd_siliconflow_init "$@"          ;;
        model|user)     ___x_cmd_siliconflow_"$op" "$@"         ;;
        --cur|--cfg)    ___x_cmd_siliconflow_"${op#--}" "$@"    ;;
        --has-apikey)   ___x_cmd_siliconflow_has_apikey "$@"    ;;
        -h|--help)      ___x_cmd help -m siliconflow "$@";      return 0     ;;
        *)              ___x_cmd help -m siliconflow "$@";      return 64    ;;
    esac
}
