fix: case-insensitive agent name lookup in config (fixes #1097)#1175
Open
octo-patch wants to merge 5 commits into
Open
fix: case-insensitive agent name lookup in config (fixes #1097)#1175octo-patch wants to merge 5 commits into
octo-patch wants to merge 5 commits into
Conversation
This reverts commit 17923847f40863e977588d1a81bec2ae16e9801f.
|
Zvonimir Sabljic seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
90f59f5 to
a372904
Compare
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.
Fixes #1097
Problem
When users configure per-agent model overrides in
config.json, the agent name key must exactly match the internal Python class name (e.g."CodeMonkey","Importer"). When the case doesn't match (e.g. user writes"code_monkey"or"importer"), the lookup silently falls back to"default"with no warning, making overrides appear to have no effect.Solution
Made
llm_for_agentperform a case-insensitive match when the exact agent name is not found. This allows config keys like"codemonkey","importer", or"specwriter"to correctly resolve to the"CodeMonkey","Importer", and"SpecWriter"configurations respectively.Also updated
example-config.jsonto:Testing
Added a test case
test_case_insensitive_agent_lookupthat verifies:"codemonkey"resolves to the"CodeMonkey"config"default"All 11 existing tests continue to pass.