Skip to content

Adding MakeHub, the smart router for AI coding assistant #631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ffp5
Copy link

@ffp5 ffp5 commented Jun 5, 2025

Context

As daily users of Kilocode, my team and I frequently encounter rate limits and performance inconsistencies when using certain AI providers. These limitations hinder our development workflow, especially when leveraging advanced models. We seek a solution that offers:

-consistent performance
-reduced latency
-cost-effective access to various AI models
-A Solution for Developers by Developers.

So, We propose integrating MakeHub.ai as an AI provider within Kilocode. MakeHub.ai offers a high-speed LLM API that performs real-time speed and price arbitrage across multiple providers for close and open source models. Users can define performance parameters such as speed and price, allowing MakeHub to select the most cost-effective provider that meets these requirements. This integration would enable developers to experience consistent performance and pricing across various models, all through a single API key.

Implementation

Some description of HOW you achieved it. Perhaps give a high level description of the program flow. Did you need to refactor something? What tradeoffs did you take? Are there things in here which you’d particularly like people to pay close attention to?

We’ve followed Kilocode’s current pattern for adding providers. Since MakeHub is OpenAI API compatible (including chat/completions/embeddings endpoints), integration required no major refactor. Also, we add MakeHub in the necessary tests.

Screenshots

before after
Everything stays de same we added MakeHub as a provider
Kilocode_MakeHub

How to Test

A straightforward scenario of how to test your changes will help reviewers that are not familiar with the part of the code that you are changing but want to see it in action. This section can include a description or step-by-step instructions of how to get to the state of v2 that your change affects.

  1. Open the API provider picker in Kilocode.
  2. Select MakeHub as your provider.
  3. Click Get your API key, you’ll be redirected to MakeHub.ai to log in and retrieve your key.
  4. Paste your API key back into Kilocode
  5. Choose any model and start building

Get in Touch

We'd love to have a way to chat with you about your changes if necessary. If you're in the Kilo Code Discord, please share your handle here. -->

We’d love to discuss this integration further and hear your feedback.
We’re on the Kilocode Discord:

  • @fernando172001
  • @hommefeue

Copy link

changeset-bot bot commented Jun 5, 2025

⚠️ No Changeset found

Latest commit: f7d16e2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ffp5 added 2 commits June 5, 2025 17:36
- Add makehubApiKey translation to Spanish locale
- Add makehubApiKey and getMakehubApiKey translations to Indonesian locale
- Ensures consistent localization coverage for MakeHub API configuration
@drakonen drakonen requested a review from Copilot June 5, 2025 16:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates MakeHub as a new AI provider into Kilocode to deliver consistent performance, reduced latency, and cost-effective access across various models. The changes include the addition of MakeHub-specific configuration options and UI components, updates to model fetching and API handling, and modifications to type definitions and provider schemas.

Reviewed Changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
webview-ui/src/components/ui/hooks/useSelectedModel.ts Added support for MakeHub in model selection logic.
webview-ui/src/components/settings/providers/MakeHub.tsx Introduced a new settings component for configuring MakeHub.
webview-ui/src/components/settings/ApiOptions.tsx Included MakeHub in provider switch-case and configuration defaults.
src/shared/api.ts, ProfileValidator.ts, and others Updated provider lists and type definitions to include MakeHub.
src/api/providers/makehub.ts New API handler for MakeHub with cost calculation and message streaming.
src/api/providers/fetchers/makehub.ts New model fetcher for MakeHub integrating API response parsing.
packages/types and evals packages Updated type definitions and provider schemas for MakeHub.
Comments suppressed due to low confidence (1)

src/api/providers/makehub.ts:1

  • The import of 'Anthropic' is unused in this file. Removing it may improve code clarity.
import { Anthropic } from "@anthropic-ai/sdk"

ffp5 and others added 3 commits June 5, 2025 18:27
Update LiteLLM component props to pass organizationAllowList instead of
routerModels parameter for better configuration management.
Replace routerModels with organizationAllowList in LiteLLM component
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ffp5
Copy link
Author

ffp5 commented Jun 5, 2025

Hello,

I’ve implemented the needed corrections and pushed the updates.
Please take another look when you have a moment, and let me know if anything else needs adjusting

Best,

ffp5 and others added 2 commits June 6, 2025 10:10
…longside existing providers (OpenRouter, Requesty, Glama, Unbound, LiteLLM, and Kilocode-OpenRouter). Added corresponding test assertions and error handling for the new provider.
Update test cases to include MakeHub as a new router model provider
@ffp5
Copy link
Author

ffp5 commented Jun 6, 2025

Hi,

I have added Makehub to the necessary test files.

Best

@ffp5
Copy link
Author

ffp5 commented Jun 6, 2025

Hello,

I have update the PR to the lastest commits.

Best,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant