-
Notifications
You must be signed in to change notification settings - Fork 7.1k
fix(config): allow user-defined providers to override built-in providers #8670
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
base: main
Are you sure you want to change the base?
fix(config): allow user-defined providers to override built-in providers #8670
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80b117cfeb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| assert_eq!(ollama_provider.name, "Remote Ollama"); | ||
| assert_eq!( | ||
| ollama_provider.base_url, | ||
| Some("http://192.168.1.50:11434/v1".to_string()) | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use pretty_assertions::assert_eq in tests
The repo root AGENTS.md specifies under “Test assertions” that tests should use pretty_assertions::assert_eq for clearer diffs. This new test uses the standard assert_eq! (see the comparisons here), which violates that guideline and makes failure output harder to read. Please import pretty_assertions::assert_eq in the test module and use it for these comparisons, per /workspace/codex/AGENTS.md.
Useful? React with 👍 / 👎.
Fixes #8240
When users define a model provider in
config.tomlwith the same name as a built-in provider (e.g.,ollama), the user's configuration should override the built-in defaults. Previously,or_insertwas used which only inserted if the key didn't exist, causing user-definedbase_urlvalues to be ignored for built-in provider names.Changed to
insertso user-defined providers properly override built-in ones.Added a regression test to verify the fix.