eca icon indicating copy to clipboard operation
eca copied to clipboard

Support provider-dependent agent `defaultModel` selection in `config.json`

Open adrianf0 opened this issue 5 months ago • 2 comments

Hi, Thank you for ECA.

I’m trying to configure multiple providers and would like agent/subagent model selection to follow the currently selected provider.

Problem

The current config schema supports:

  • multiple providers
  • per-provider models
  • per-agent defaultModel

For example, an agent can be configured like:

{
  "agent": {
    "explorer": {
      "defaultModel": "github-copilot/raptor-mini"
    }
  }
}

However, agent.<name>.defaultModel is a single fixed string, so it is not possible to express:

  • if selected provider is github-copilot, use github-copilot/raptor-mini
  • if selected provider is company-litellm, use company-litellm/hf-qwen3-32b-awq

Use case

I have two providers configured:

  • github-copilot
  • company-litellm

I would like the built-in explorer subagent to use a small/fast model from the currently selected provider:

  • github-copilot/raptor-mini
  • company-litellm/hf-qwen3-32b-awq

Right now, as far as I can tell, the options are only:

  1. hardcode one model in agent.explorer.defaultModel
  2. create separate agents like explorer-copilot and explorer-litellm
  3. maintain separate config overlays/files

None of these gives simple automatic provider-relative model selection.

Request

Would it be possible to support provider-dependent agent model configuration?

Possible approaches:

Option A: defaultModelByProvider

{
  "agent": {
    "explorer": {
      "defaultModelByProvider": {
        "github-copilot": "raptor-mini",
        "company-litellm": "hf-qwen3-32b-awq"
      }
    }
  }
}

or with full names:

{
  "agent": {
    "explorer": {
      "defaultModelByProvider": {
        "github-copilot": "github-copilot/raptor-mini",
        "company-litellm": "company-litellm/hf-qwen3-32b-awq"
      }
    }
  }
}

Option B: provider-local model alias resolution

Allow agent models to reference a logical alias, resolved within the currently selected provider:

{
  "providers": {
    "github-copilot": {
      "models": {
        "explorer-small": {
          "modelName": "raptor-mini"
        }
      }
    },
    "company-litellm": {
      "models": {
        "explorer-small": {
          "modelName": "hf-qwen3-32b-awq"
        }
      }
    }
  },
  "agent": {
    "explorer": {
      "defaultModel": "explorer-small"
    }
  }
}

That would let the same agent config work across providers.

Why this would help

This would make it much easier to:

  • switch providers interactively
  • keep the same agent/subagent setup
  • use provider-appropriate small/fast models for helper agents like explorer

Question

Is there already a recommended way to do this today, especially for built-in subagents like explorer?

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

adrianf0 avatar Jun 16 '26 14:06 adrianf0

@adrianf0 your reasoning is correct, the only ok way I see right now is having different agents for that indeed, but I agree would be nice to ECA adapt to the selected provider, especially for cases like: "I'm on my-company mode" vs "I'm on personal model". c/c @zikajk

ericdallo avatar Jun 17 '26 13:06 ericdallo

Done option B which was easy to implement and fixes the issue, thank you!

ericdallo avatar Jun 17 '26 18:06 ericdallo