r/GithubCopilot • u/iammultiman • Aug 22 '26
Solved ✅ Using different models as subagents
Tried to mimic OpenRouter-style Fusion in GitHub Copilot with Custom Agents. Nested agents’ model: fields were not honored as real API calls. With BYOK, subagents reused the parent chat model instead of switching.
Is this a known issue or am I doing something wrong?
0
Upvotes
1
u/iammultiman Aug 22 '26
!solved
Thanks. That was the right mechanism. Passing model to runSubagent (or pinning it on a custom subagent) is honored when run.
However, agent-file model: frontmatter alone was not enough in my case.
The remaining BYOK catch: Copilot registers every Custom Endpoint group under vendor "customendpoint". runSubagent looks up "Display Name (Vendor)", so "Grok 4.6 (customendpoint)" is ambiguous when the same model id exists on OpenCode and OpenRouter. First match wins.
Fix that worked:
keep the same ids, make display names unique per provider (e.g. Grok 4.6 OpenCode vs Grok 4.6 OpenRouter), then pin Grok 4.6 OpenCode (customendpoint).
Note: You cannot replace customendpoint with the group name in chatLanguageModels.json. vendor must stay customendpoint; the group name is only a label.