Skip to content

Agents: report subagent model capability for requested model#113

Merged
dgarson merged 1 commit intodgarson/forkfrom
codex/add-capability-check-for-agent-assignment
Feb 24, 2026
Merged

Agents: report subagent model capability for requested model#113
dgarson merged 1 commit intodgarson/forkfrom
codex/add-capability-check-for-agent-assignment

Conversation

@dgarson
Copy link
Owner

@dgarson dgarson commented Feb 23, 2026

Motivation

  • Orchestrators need a way to know which allowlisted target agents can actually run a requested provider/model before calling sessions_spawn so spawns are routed to capable agents.

Description

  • Extend the agents_list tool to accept an optional model parameter and resolve it as either provider-only (e.g. minimax) or full provider/model (e.g. minimax/minimax-m2.5).
  • Add requestedModel to the tool response and include each candidate agent's resolved subagentModel in the payload.
  • Compute and return capableForRequestedModel for each agent by matching the requested provider/model against the agent's subagent spawn model selection, supporting provider-only checks and model alias resolution.
  • Files changed: src/agents/tools/agents-list-tool.ts and test coverage added in src/agents/openclaw-tools.agents.e2e.test.ts (two new tests for exact model and provider-only matching).

Testing

  • Ran the e2e test file with pnpm vitest --config vitest.e2e.config.ts src/agents/openclaw-tools.agents.e2e.test.ts and all tests in that file passed (6 passed).
  • The new tests exercise full provider/model matching and provider-only capability checks and succeeded.

Codex Task

@dgarson dgarson changed the base branch from main to dgarson/fork February 23, 2026 19:26
@dalefrieswthat dalefrieswthat mentioned this pull request Feb 23, 2026
15 tasks
@dgarson dgarson merged commit 7760837 into dgarson/fork Feb 24, 2026
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant