feat: per-call model/provider override on delegate_task#3750
Closed
HenkDz wants to merge 3 commits into
Closed
Conversation
Add model and provider parameters to delegate_task tool schema and handler, allowing the LLM to specify which model/provider to use for each delegation call (overriding delegation config). Also fix credential resolution: when delegation.base_url is set but no api_key is found AND a provider is configured, fall through to provider resolution instead of raising an error. This handles the common case where base_url is redundant but provider can resolve creds from env.
23780ca to
7681a16
Compare
…l selection Map task categories (coding, research, reasoning, etc.) to specific models via delegation.task_models in config. The agent passes task_type when delegating, and the model is resolved automatically. Resolution order: per-call model > per-task model > task_models[type] > delegation.model > parent model. task_models only selects the model name; provider is always delegation.provider (or per-call provider, or parent). Also adds per-task model override in batch mode, task_type param in schema with documentation hints, and user-facing docs with examples.
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
modelandproviderparameters to thedelegate_tasktool, allowing per-delegation model routing. The LLM can now specify which model/provider to use for each delegation call, overriding the staticdelegation.model/delegation.providerconfig.Changes
modelandproviderstring fields toDELEGATE_TASK_SCHEMAdelegate_task()modelandprovideroptional params to functiondelegationconfig sectiondelegation.base_urlis set but no api_key found AND a provider is configured, fall through to provider resolution instead of erroringUse case
Routes this specific subagent to
glm-5.1on providerzai, while the parent runs on a different model.