import { generateReactHelpers } from "../_vendor/@uploadthing/react/dist-use-uploadthing-pxkJ3LFs.js";
import "react";
import "react/jsx-runtime";
const API_ENDPOINT = "http://localhost:3001/api";
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;
  }
}
export {
  getAvailableModels
};
//# sourceMappingURL=backend-api.js.map
