Conversation
🦋 Changeset detectedLatest commit: 7431e42 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
src/core/webview/ClineProvider.ts
Outdated
There was a problem hiding this comment.
Consider using async/await instead of .then() for better readability and maintainability, as per our Development Standards: https://www.notion.so/Development-Standards-59febcf8ead647fd9c2ec3f60c22f3df?pvs=4#11869ad2d581809f9af3fdba09412ef6
1361179 to
fcc1c6f
Compare
|
Hi @mrubens! I'd value your review feedback. Let me know if you need any clarification, additional tests, or documentation updates to help move this forward. Thanks!" |
Thanks - sorry for the delay! Will try to look today or tomorrow. |
|
Just chiming here to say that this would be so incredibly useful to me. I frequently want to switch between deepseek and gemini and claude based on the problems I'm solving and right now it is so cumbersome that I use aider for it instead. Thanks a lot for implementing this. |
fcc1c6f to
895fbc8
Compare
|
Hey @samhvw8 and @vamshiaruru, I want to make sure that I'm clearly understanding the problem that this is solving for you, versus just using the existing API Provider dropdown to switch between providers. Is it that you have multiple keys for a specific provider? Or that you want to switch between multiple different OpenAI compatible providers for instance? @samhvw8 one thing on the implementation - I don't love storing the keys in plaintext in the config file. Would there be a way to continue to use the SecretStorage for this? And only somewhat related to this PR - I've been thinking about how we might get more flexible on the API configuration to support chat modes with different models like aider does. I don't think it's exactly the same problem this is solving, but would be curious to hear your perpectives if you are aider users. |
|
Hi @mrubens, thanks for your reply
Yes, my use case can be both scenarios. Since I currently don't have a company, I cannot upgrade my tier in Anthropic and am limited to tier 1. This is why I need to create 2 keys for that provider. Additionally, some providers aren't yet supported in cline & roo-cline, so I need to switch between them. It's quite tedious to switch manually by copying URLs and API keys.
Regarding the implementation - I understand your concern about storing keys in plaintext in the config file. I will look for a way to implement it with SecretStorage. In my case, since I want to sync configs across development environments, we could use encrypted text files with the secret key stored in SecretStorage.
Yes, I share the same idea on making it more flexible to support chat modes with different models like aider does. If we store configurations this way, we can have multiple AI agents, each with its separate API handler, similar to aider's approach |
|
@mrubens This has led to the following situation: other providers can work with dedicated integrations, but OpenAI-compatible providers are insufficient. I would prefer not to have to modify the base API URL and API key every time I want to use a different model. Currently, my approach is that Cline uses one setup, while Roo-Cline uses another. For example, I am currently using x.ai, deepseek, GitHub models, and Zhipu in Lobehub, all of which provide OpenAI v1-compatible structures. I am currently using Lobehub, which offers dozens of OpenAI-compatible model providers. I believe the content of this PR is exactly what I need. |
|
Thanks for explaining! What I'm mulling over is the alternative approach of:
I'm wondering if supporting these two scenarios more directly will be more intuitive to people and potentially doable with more localized code changes to avoid too much drift from mainline Cline. I think I need to sleep on it though. Feedback welcome in the meantime! |
|
@mrubens In my case, I had multiple open ai compatible providers. I had gemini and deepseek both under open ai compatile providers, so switching was hard. Now however both gemini and deepseek have their own support, so I can switch between them easily enough :D |
Hi @samhvw8, the more I think about it the more I like this approach. Do you have any more thoughts on how we can make the secret store work? |
Hi @mrubens, samhvw8@6328a0b#diff-b1440b9122103144a2cbb75b7f08b0e9bf6c2542d8d91a60796bbf68076ba150 |
7d23530 to
ad9d117
Compare
|
Hi @mrubens, I have already pushed the config manager implementation using secrets. I implemented it faster than expected. Could you review it for me?. Thanks |
16349a0 to
de2c782
Compare
Awesome! I’m traveling today but will review as soon as I can. |
Thanks for letting me know! Safe travels, and take your time reviewing when you're back. |
1ba6fb6 to
3be9e0e
Compare
…rovider from MrUbens
Added useEffect hooks to GlamaModelPicker, OpenAiModelPicker, and OpenRouterModelPicker components to ensure the search term stays synchronized with the selected model ID from apiConfiguration. This prevents the search term from getting out of sync when the model is changed.
- Move handleSave to useCallback for better performance - Add cleanup effect to save pending changes on unmount - Improve new config UX by setting default copy name - Fix code formatting
3e06c49 to
7431e42
Compare
|
Going to close this now that #297 was merged. Thank you for the contributions! 🙌 |
Description
New Feature that can make user can able to create and use multiple Api configuration
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Adds multi-API configuration management with UI support and tests.
ConfigManagerclass inConfigManager.tsfor managing multiple API configurations.ClineProvider.tsto handle new API configuration messages and manage state.ApiConfigManager.tsxfor managing API configurations in the UI.SettingsView.tsxto integrateApiConfigManagerand handle configuration changes.ConfigManager.test.tsforConfigManagerfunctionalities.SettingsView.test.tsxto test new UI components and interactions.checkExistApiConfig.tsutility for checking existing API keys.This description was created by
for fbdbd39a2c3538c8c4075f5038e877eea03108f0. It will automatically update as commits are pushed.