repo_description: Parallax is a distributed model serving framework that lets you build your own AI cluster anywhere
repo_topics: blackwell chatbot decentralized-inference deepseek distributed-systems glm kimi large-language-models llama llm llm-serving minimax oss-gpt python pytorch qwen transformer
code: import { dirname, resolve } from 'node:path';
  import { fileURLToPath } from 'node:url';
  
  import { defineConfig } from 'vite';
  import react from '@vitejs/plugin-react-swc';
  
  const __dirname = dirname(fileURLToPath(import.meta.url));
  
  // https://vite.dev/config/
  export default defineConfig({
    build: {
      rollupOptions: {
        input: {
          main: resolve(__dirname, 'index.html'),
          chat: resolve(__dirname, 'chat.html'),
        },
      },
    },
    plugins: [react()],
    server: {
      proxy: {
        '/proxy-api/v1/chat/completions': {
          target: 'http://localhost:3001',
          // target: 'https://ztrxxhzxdt3bn6-3000.proxy.runpod.net',
          rewrite: (path) => path.replace(/^\/proxy-api/, ''),
        },
        '/proxy-api': {
          target: 'http://localhost:3001',
          rewrite: (path) => path.replace(/^\/proxy-api/, ''),
        },
      },
    },
  });
  