Skip to content

feat: add support for custom provider configuration in the user config #537

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

Merged
merged 23 commits into from
Apr 23, 2025

Conversation

kshern
Copy link
Contributor

@kshern kshern commented Apr 22, 2025

What

  • Add support for loading and merging custom provider configurations from the config file.
  • Allow users to override or extend default providers with their own settings.

Why

This change enables users to flexibly customize and extend provider endpoints and API keys without modifying the codebase, making the CLI more adaptable for various LLM backends and enterprise use cases.

How

  • Introduced loadProvidersFromFile and getMergedProviders in config logic.
  • Added/updated related tests in [tests/config.test.tsx]

Checklist

  • Lint passes for changed files
  • Tests pass for all files
  • Documentation/comments updated as needed

Copy link

github-actions bot commented Apr 22, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@kshern
Copy link
Contributor Author

kshern commented Apr 22, 2025

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Apr 22, 2025
@tibo-openai
Copy link
Collaborator

@kshern Could you take a look at the CI failures and then I will have a proper read through the implementation before commenting further. Thank you!

@bolinfest
Copy link
Collaborator

We are planning to have a unified config, so could you update this PR so that the changes apply to StoredConfig instead?

@tibo-openai tibo-openai changed the title feat: Add support for custom provider configuration via providers.json feat: add support for custom provider configuration via providers.json Apr 22, 2025
@tibo-openai
Copy link
Collaborator

@kshern Will merge once it's a single config and CI issue have been fixed.

@kshern
Copy link
Contributor Author

kshern commented Apr 22, 2025

We are planning to have a unified config, so could you update this PR so that the changes apply to StoredConfig instead?

Thanks for your patience! I've now completed the refactor to integrate the custom provider logic into StoredConfig as discussed.

@kshern Will merge once it's a single config and CI issue have been fixed.

and CI issue have been fixed

The PR should now be ready for another look. Please let me know if there's anything else needed. Thanks again for your guidance!

@kshern kshern requested a review from tibo-openai April 23, 2025 05:28
@tibo-openai tibo-openai changed the title feat: add support for custom provider configuration via providers.json feat: add support for custom provider configuration in the user config Apr 23, 2025
@tibo-openai
Copy link
Collaborator

Fixed merge conflicts and adjusted code structure and comments a bit. This is now going in, thank you for making your first contribution to the project, keep them coming!

@tibo-openai tibo-openai merged commit 146a61b into openai:main Apr 23, 2025
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants