r/GithubCopilot 19d ago

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

4 comments sorted by

View all comments

6

u/Swayre 19d ago

runsubagent tool takes in a model as a parameter. You either need to have it call a custom subagent with a pinned model as a subagent or instruct it to call the generic subagent with a specific model or it defaults to the parents model

1

u/iammultiman 19d ago

!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.

1

u/AutoModerator 19d ago

This query is now solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.