feat: implement multi-provider architecture and OpenAI support (#2)#6
Open
ArturCharylo wants to merge 8 commits intoIAmTomShaw:mainfrom
Open
feat: implement multi-provider architecture and OpenAI support (#2)#6ArturCharylo wants to merge 8 commits intoIAmTomShaw:mainfrom
ArturCharylo wants to merge 8 commits intoIAmTomShaw:mainfrom
Conversation
…nt for default system prompt and started implementing openai provider
…m for all providers as needed
…se new logic for multiple providers
…ccessary formatted info and be non blocking
Author
🚀 Final Update: Multi-Provider Support & Improved UXI've completed the implementation of the Anthropic Claude provider and significantly improved the CLI's stability and error handling. The architecture is now fully modular and ready for review. 🛠 Changes since the last update:
🧪 TestingI have verified the functionality locally for all three providers:
Note: As I don't have active subscriptions for OpenAI/Anthropic APIs, I’ve ensured the code is architecturally sound and matches the providers' requirements. I would appreciate it if you could perform a final "live" verification with your keys! Ready for your feedback @IAmTomShaw! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2
Description
As discussed in the issue, this PR introduces a multi-provider architecture to make the CLI accessible to users without a GitHub Copilot subscription.
I have refactored the core logic to use an
AIProviderinterface and implemented OpenAI as the first alternative provider.Changes made
AIProviderinterface and moved the existing Copilot logic into a dedicatedCopilotProvider.OpenAIProviderutilizing the latestgpt-5.2-chat-latestmodel.tools.tsso they can be consumed by both Copilot's SDK and OpenAI's native tool-calling format./settingsto allow users to select their preferred provider (copilotoropenai) and input their API keys.Next Steps
Since the architectural foundation is now in place, adding support for Anthropic (Claude) or local models like Ollama will be extremely straightforward. I plan to open separate, smaller PRs for those providers once this architectural change is reviewed and merged.