feat: add per-agent model configuration support#2467
Draft
laststylebender14 wants to merge 11 commits intomainfrom
Draft
feat: add per-agent model configuration support#2467laststylebender14 wants to merge 11 commits intomainfrom
laststylebender14 wants to merge 11 commits intomainfrom
Conversation
|
Action required: PR inactive for 5 days. |
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
Add per-agent model configuration support, allowing users to set a specific model for each agent via CLI commands rather than using only global defaults.
Context
Currently, users can only set a global default model for the entire application. This PR enables per-agent model overrides, giving more flexibility when working with multiple agents that may require different models (e.g., o1 for reasoning tasks, GPT-4 for creative tasks).
Changes
AgentModelConfigdomain type to store both provider and model per agentAppConfigwith newagent_modelHashMap for per-agent overridesset_agent_modelandget_agent_modelservice methodsAgentProviderResolverto resolve models with priority: agent config > active agent YAML > global defaultset-agent-modelCLI command to configure per-agent modelsKey Implementation Details
Model IDs are scoped to a specific provider's namespace, so both provider and model are stored together in
AgentModelConfig. The resolution priority is:Use Cases
Testing
Links