Open
Conversation
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
This pull request introduces enhancements to how agent profile-specific settings are loaded and applied in the
python/helpers/settings.pymodule. The primary change is the addition of a mechanism to load and merge settings from agent profile directories when the active profile changes.Profile settings loading and merging:
get_profile_settingsfunction to load and merge settings fromusr/agents/{profile}/settings.jsonandagents/{profile}/settings.json, returning a merged dictionary orNoneif no settings file is found.set_settingsfunction to check if theagent_profilehas changed, and if so, load and merge profile-specific settings into the active settings before normalization and saving.This way, if you want to use an expensive model, or even completely different provider for one agent, and a cheaper model for another agent you can quickly switch by just switching agents.
Examples
Simply create a settings.json file in the agent directory and set the provider and model settings.
/a0/agents/developer/settings.json:
{ "chat_model_provider": "anthropic", "chat_model_name": "claude-sonnet-4", "util_model_provider": "anthropic", "util_model_name": "claude-3-5-haiku-latest" }/a0/agents/researcher/settings.json:
{ "chat_model_provider": "openai", "chat_model_name": "gpt-4o", "util_model_provider": "openai", "util_model_name": "gpt-4o-mini" }