ModelWay is an AI model orchestration platform that provides a unified API for accessing multiple AI models from different providers. It solves the critical challenge of AI model reliability by automatically routing requests to alternative providers when your primary model is unavailable, ensuring continuous service without any code changes.
- Single API for Multiple Models: Access GPT-4, Claude, Llama, and more through one standardized interface
- Automatic Failover: Never worry about downtime - if one provider is down, your requests are automatically routed to alternatives
- Pay-As-You-Go: No monthly fees or commitments - only pay for the API calls you make
- Competitive Pricing: Transparent token-based pricing with no markup
- Performance Monitoring: Track latency, uptime, and other metrics across different AI providers
The project consists of two main components:
A NestJS server that handles:
- Unified API endpoint for all AI model interactions
- Intelligent request routing and failover mechanisms
- Provider health monitoring and availability tracking
- Usage quota management and billing
- Request history and analytics
An Angular application that provides:
- Dashboard for monitoring model performance and availability
- Interface for testing different models side-by-side
- Usage analytics and cost tracking
- API key management and documentation
- Account settings and billing information
- Model Orchestration: Automatically route requests to the best available model based on availability and performance
- Unified API: One consistent API format regardless of the underlying model provider
- Provider Redundancy: Maintain service continuity even when specific providers experience downtime
- Performance Metrics: Compare latency, token pricing, and reliability across providers
- Usage Analytics: Track your consumption and costs across different models
- Test Environment: Try different models before integrating them into your application
- Node.js (v18 or higher)
- npm or yarn
- MongoDB (for data storage)
- Firebase account (for authentication)
-
Clone the repository
git clone https://github.com/mardev60/modelway.git cd modelway/mw-server -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env # Edit the .env file with your API keys for different providers -
Start the development server
npm run start:dev
-
Navigate to the client folder
cd ../mw-client -
Install dependencies
npm install
-
Configure environment variables
# Edit the files in src/environments/ with your own values -
Start the development application
npm start
-
Access the application in your browser at
http://localhost:4200
- NestJS - Efficient Node.js server-side framework
- Firestore - NoSQL database and ODM
- Firebase Admin - For authentication and user management
- OpenAI SDK - For interacting with OpenAI models
- Angular - Progressive front-end framework
- TailwindCSS - Utility-first CSS framework
- Angular Fire - Firebase integration for Angular
- FontAwesome - Icon library
// Example API call using ModelWay
const response = await fetch('https://api.modelway.com/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model: 'gpt-4',
messages: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Tell me about AI orchestration.' }
]
})
});
const data = await response.json();
console.log(data.choices[0].message.content);This project is licensed under the MIT License.
For questions or suggestions, please contact us at contact@modelway.com.
Built with ❤️ by us for us
