Skip to content

Navigation Menu

Sign in
Sign up

Q: How to get the opencode go's model id when create custom subagent ? #56

Unanswered
dengyakui asked this question in Q&A
Discussion options

I used to use opencode go cli, it can configure subagents by specific format like:

  • opencode-go/deepseek-v4-flash
  • openrouter/deepseek-v4-flash
  • /

but in vscode copilot, i don't know if it was the same format when insturct the model to spaw some subagent
Is there any model full id list ? I can't see it from extension configure page.

vscode copilot model config json

{
		"name": "OpenCode Go",
		"vendor": "opencodego",
		"apiKey": "${input:chat.lm.secret.-33b8da4f}",
		"settings": {
			"opencodego:deepseek-v4-flash::session-2026年05月21日-b": {
				"reasoningEffort": "max"
			}
		}
	}

opencodego.json
image

image
You must be logged in to vote

Replies: 2 comments 2 replies

Comment options

Hey @dengyakui. Good question, and the short answer is the format here is not the same as the OpenCode Go CLI.

Model ID format

Every model this extension registers follows one shape:

{vendor}:{rawModelId}::{tag}

For your case, that becomes:

Provider Vendor Example
OpenCode Go (chat) opencodego opencodego:deepseek-v4-flash::session-2026年05月21日-b
OpenCode Zen (chat) opencodezen opencodezen:big-pickle::session-2026年05月21日-b
OpenCode Go (agents) opencodego-agent opencodego:deepseek-v4-flash::agent-host
OpenCode Zen (agents) opencodezen-agent opencodezen:big-pickle::agent-host

That suffix ::session-2026年05月21日-b you saw in your settings key is not part of the model name. It is a metadata revision tag this extension appends so VS Code can invalidate cached picker metadata (token limits, modality flags, etc.) whenever we ship a correction. The ::agent-host suffix marks the agent-window variant, the one that carries targetChatSessionType: "copilotcli" and shows up in the Agents window.

The raw ID in the middle, deepseek-v4-flash, is what actually gets sent to the OpenCode gateway. Same identifier the CLI uses, minus the opencode-go/ prefix.

Getting the full list

The CLI-style format (opencode-go/...) won't work here, because VS Code's Language Model Chat Provider API expects the {vendor}:{id} shape above. Rather than hand-maintain a list, the extension ships a command that dumps every registered model live:

  1. Command Palette (Cmd/Ctrl+Shift+P)
  2. Run OpenCode: Model Picker Diagnostics
  3. A Markdown report opens listing every registered model: id, family, version, vendor, detail, and the configuration schema, for opencodego, opencodezen, the two -agent variants, and Copilot's own models.

You copy the id straight from there. Worth running it periodically too, since Zen rotates free models.

Using it in a custom agent

Here's where it diverges from the CLI. VS Code Copilot custom agents (.chatmode.md, .agent.md) do not take a model ID in the frontmatter the way OpenCode CLI's agents config does. The model is selected at runtime, from the chat or Agents-window picker, and your custom agent inherits whatever OpenCode model is currently selected. So you don't typically hardcode opencodego:deepseek-v4-flash::session-2026年05月21日-b into the agent file.

If you want a specific agent to always run on a specific OpenCode model, the practical workflow:

  1. Add the model once via Copilot Chat, model picker, Add Models.... That's what populates the config JSON you pasted.
  2. Select that model in the picker before invoking the agent.
  3. For Agents-window / Copilot CLI sessions, pick the ...::agent-host variant from the Copilot section of the picker (the opencodego-agent / opencodezen-agent vendors).

The reasoningEffort key in your settings JSON is the per-model Thinking override. Values differ per family: max for DeepSeek, low|medium|high for most openai-compatible families, thinking_budget for Qwen. Those are covered in the README under Reasoning controls.

One caveat

The ::session-2026年05月21日-b tag bumps when we ship a metadata correction, like a context-window fix. The raw ID (deepseek-v4-flash) stays stable. So if you pin a full ID somewhere and it stops resolving after an extension update, re-run Model Picker Diagnostics and grab the fresh one.

Anything unclear, ping back.

You must be logged in to vote
1 reply
Comment options

Would naming the models in a certain way impact the GHCP prompts being injected into them?
https://github.com/microsoft/vscode/pull/323500/changes

Comment options

@CogitoBurrito good catch. Short answer: yes, but it comes from the family value we register, not the vendor name.

Looking at vscode#323500, isKimiFamily() checks model.family or model id starting with kimi-k2.6 / kimi-k2.7-code. If it matches, Copilot injects the Kimi-specific prompt and routes Kimi to replace-string edit tools (no insert-edit/apply-patch). If it doesn't, the model falls back to the default prompt.

In this extension we set family as {vendor}-{rawModelId}-{revision} (e.g. opencodego-kimi-k2.7-code-session-...). So the vendor prefix makes it not match startsWith('kimi-k2.7-code'). Copilot sees it as unknown family, default prompt applies.

The fallback path matters here: the matcher also checks getModelId(model). If that returns the raw id (kimi-k2.7-code), the Kimi prompt still kicks in. In practice Kimi flows through the OpenCode gateway with the same id the CLI uses, so Copilot's Kimi prompt should activate, which is what we want.

The vendor prefix in family is intentional: without it two deepseek-v4-flash entries look identical in the picker. Trade-off is picker uniqueness vs. matching Copilot's family-specific prompts. So far no user reports, but I'll watch it once 1.127 hits stable. Thanks for flagging the PR.

You must be logged in to vote
1 reply
Comment options

Thank you for the explanation! I think they just made some improves.
https://github.com/microsoft/vscode/pull/324814/changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /