"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const useUploadthingPxkJ3LFs = require("../_vendor/@uploadthing/react/dist-use-uploadthing-pxkJ3LFs.cjs");
require("react");
require("react/jsx-runtime");
const API_ENDPOINT = "http://localhost:3001/api";
useUploadthingPxkJ3LFs.generateReactHelpers({
  url: `${API_ENDPOINT}/upload/uploadthing`
});
async function getAvailableModels() {
  try {
    const response = await fetch(`${API_ENDPOINT}/models`);
    if (!response.ok) {
      const errorText = await response.text();
      console.error(`❌ HTTP error! status: ${response.status}, body:`, errorText);
      throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`);
    }
    const data = await response.json();
    if (data.success && data.models) {
      return data.models;
    } else {
      console.error("❌ Invalid response format:", data);
      throw new Error(`Invalid response format: ${JSON.stringify(data)}`);
    }
  } catch (error) {
    console.error("❌ Failed to fetch models from server:", error);
    throw error;
  }
}
exports.getAvailableModels = getAvailableModels;
//# sourceMappingURL=backend-api.cjs.map
