import {
  setModelProvider
} from "./chunk-AGGE6NPR.js";
import "./chunk-CAY57CKF.js";
import "./chunk-KOO5733S.js";

// src/tools/set-model-provider.ts
async function handleSetModelProvider(params) {
  const providers = await setModelProvider(params);
  const updated = providers[params.provider];
  if (!updated) {
    throw new Error(
      `Model provider "${params.provider}" was not found in the response. The provider name may be invalid.`
    );
  }
  const lines = [];
  lines.push("Model provider updated successfully!\n");
  lines.push(`**Provider**: ${params.provider}`);
  lines.push(`**Status**: ${updated?.enabled ? "enabled" : "disabled"}`);
  if (updated?.customKeys) {
    const keyFields = Object.entries(updated.customKeys).map(([k, v]) => `${k}: ${v ? "set" : "not set"}`).join(", ");
    lines.push(`**Keys**: ${keyFields}`);
  }
  if (params.defaultModel) {
    const normalizedModel = params.defaultModel.includes("/") ? params.defaultModel : `${params.provider}/${params.defaultModel}`;
    lines.push(`**Default Model**: ${normalizedModel}`);
  }
  return lines.join("\n");
}
export {
  handleSetModelProvider
};
//# sourceMappingURL=set-model-provider-XENT5D2P.js.map