Skip to content

feat(cli): give each agent its role's model at a provider - #1113

Merged
alexsoyes merged 4 commits into
feature/sub-agentsfrom
feat/agent-models
Oct 28, 2026
Merged

alexsoyes merged 4 commits into
feature/sub-agentsfrom
feat/agent-models

Conversation

@alexsoyes

Copy link
Copy Markdown
Contributor

🎯 What & why

Stacked on #1027. The plugin agents stay the single source and ship no model; this layer pins each role's model and effort at a chosen provider when the CLI installs them.

🛠️ How it works

  • agent-models.json: role → tier (explorer, executor, validator light; reviewer standard) → model and effort per provider (openai, anthropic, mistral), with host-specific IDs where a host names a model differently.
  • aidd translate … --provider <p> applies it through each host's agent function from feat(framework): ship generic sub-agents across six hosts #1027. A model an agent declares itself is kept; a provider the host cannot run is refused.
  • make reload reads the provider per host from scripts/reload-agents.json; Claude now installs from its build so the model applies.

🧪 How to verify

cd cli && pnpm typecheck && pnpm test
node cli/dist/cli.js translate . --to opencode --as flat --out /tmp/x --provider openai

Observed: OpenCode loads the executor as {id: gpt-6-luna, providerID: openai, variant: medium}; a Codex session spawned the explorer on gpt-6-luna under a gpt-6.1-sol parent.

⚠️ Heads-up

Still to build in this PR, before ready:

  • aidd setup --ide <host> [--provider <p>] [--main] [--global]: install in the current project by default, --global for the user's host directories; --ai and --scope stay as hidden aliases.
  • --main: pin the main session's model, keeping the previous value.
  • aidd clean: remove pinned models and restore the main one.
  • make reload reduced to aidd setup --global ….

✅ I certify

  • I DO CERTIFY I READ EACH LINE OF THE PULL REQUEST BECAUSE I AM A SOFTWARE ENGINEER, NOT A AI PUPPY.

agent-models.json maps each role to a tier and each tier to a model and effort per
provider. aidd translate --provider applies it through each host's agent function,
and make reload passes the provider scripts/reload-agents.json names per host.
@waewoo

waewoo commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Thanks for this work!

I have a question about the hardcoded provider/model mapping in agent-models.json.

The current configuration defines a fixed set of providers and models. However, tools like Kilo Code and OpenCode support a much wider range of providers and models, including locally hosted models, custom API endpoints, and OpenAI-compatible providers.

While omitting --provider preserves model inheritance, it doesn't allow users to benefit from role-based model selection with their preferred models.

Would it make sense to support user-defined model mappings, allowing users to override the default models for each role (explorer, executor, validator, reviewer), regardless of the provider or model they use?

This could preserve the built-in defaults while keeping concrete model selection under user control, consistent with the discussion in #677.

Is this flexibility already planned, either within this PR or as a follow-up?

@alexsoyes
alexsoyes merged commit a596947 into feature/sub-agents Oct 28, 2026
33 checks passed
@alexsoyes
alexsoyes deleted the feat/agent-models branch October 28, 2026 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants