fix(config): change LLM_BACKEND default from gpt-4o to openai - #178
Merged
sahoo-tech merged 2 commits intoMay 21, 2026
Merged
Conversation
LLMClientFactory.create() dispatches on backend == openai | gemini | llama. The previous default gpt-4o never matched any branch, causing an immediate ValueError for every user on default config. Change the default to openai so it routes correctly to OpenAIClient, and update .env.example to match. Also update the defaults assertion in test_config.py and add a guard test that verifies the default backend is always a value the factory can handle.
Contributor
Author
|
Hi @sahoo-tech, Thanks again for the review and support. |
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.
Summary
Fixes a configuration mismatch where the default
LLM_BACKENDvalue incore/config.pydid not match any backend supported byLLMClientFactory.create().Previously, users running Execra without overriding
LLM_BACKENDin.envwould hit:during startup because the factory only recognised:
openaigeminillamaThis PR updates the default backend to
openai, aligns.env.example, and adds regression coverage to prevent future config/factory mismatches.Closes #35
Changes Made
core/config.pyto:
.env.exampleopenaitests/unit/test_config.pyto verify the default configuration resolves successfully through
LLMClientFactoryImpact
Reliability
Prevents startup failures for users running Execra with default configuration values.
Configuration Consistency
Ensures configuration defaults remain aligned with supported factory backends.
Regression Protection
Adds automated coverage preventing future backend/default mismatches.
Testing
Verified default backend resolves successfully through
LLMClientFactory.create()Updated config default assertions
pytest tests/unit/test_config.pyTRUST_SCORE_W1 AttributeError) is pre-existing and unrelated to this changeNotes
This PR intentionally keeps the fix minimal and isolated: