Skip to content

fix(agent-manager): allow explicit provider selection - #13419

Merged
marius-kilocode merged 2 commits into
mainfrom
fix-agent-manager-provider-selection
Aug 25, 2026
Merged

fix(agent-manager): allow explicit provider selection#13419
marius-kilocode merged 2 commits into
mainfrom
fix-agent-manager-provider-selection

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Agent Manager model-name resolution previously relied on the invoking provider and fallback ranking. Callers could not select a specific provider when the same model name was available from multiple providers.

Why This Change Was Made

Each Agent Manager task now accepts an optional provider beside model. The provider is trimmed and scoped to the available catalog before exact, name, fuzzy, and variant matching. Unknown providers, provider/model mismatches, provider-only requests, and malformed provider values fail safely without requesting Agent Manager permission.

Model-only requests keep the existing inherited-provider preference and deterministic tie-break behavior. The resolved event still carries only the concrete model reference, so protocol and SDK artifacts do not need regeneration.

User Impact

Callers can use tasks[].provider with a model name to force a provider, for example { "model": "Shared", "provider": "anthropic" }. Model search output and Agent Manager documentation describe the new field and provider IDs.

Evidence

  • bun test test/kilocode/agent-manager-tool.test.ts test/kilocode/agent-manager-models-tool.test.ts from packages/opencode, 43 tests passed.
  • bun run typecheck from packages/opencode passed.
  • bun run lint passed with zero errors and existing warnings.
  • bun run script/check-opencode-annotations.ts --worktree passed.
  • Prettier checks passed for all touched TypeScript files.

@kilo-code-bot

kilo-code-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/opencode/src/kilocode/tool/agent-manager.ts
Previous Review Summary (commit 78692a7)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 78692a7)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (7 files)
  • .changeset/explicit-agent-manager-provider.md
  • packages/kilo-docs/pages/automate/agent-manager.md
  • packages/opencode/src/kilocode/tool/agent-manager-models.ts
  • packages/opencode/src/kilocode/tool/agent-manager-models.txt
  • packages/opencode/src/kilocode/tool/agent-manager.ts
  • packages/opencode/src/kilocode/tool/agent-manager.txt
  • packages/opencode/test/kilocode/agent-manager-tool.test.ts

Reviewed by grok-4.6 · Input: 69.7K · Output: 4.9K · Cached: 193.7K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, ignorable bot remarks below

Comment thread packages/opencode/src/kilocode/tool/agent-manager.ts Outdated
@marius-kilocode
marius-kilocode merged commit d8eda0a into main Aug 25, 2026
34 checks passed
@marius-kilocode
marius-kilocode deleted the fix-agent-manager-provider-selection branch August 25, 2026 14:35
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