Feature Request: URL parameters for agent/model preselection in web UI #4155

Open
opened 2026-02-16 17:42:48 -05:00 by yindo · 1 comment
Owner

Originally created by @damejeras on GitHub (Jan 4, 2026).

Originally assigned to: @thdxr on GitHub.

Problem
When using opencode in serve mode and creating new sessions, there's no way to pre-select an agent or model via URL

Use case
Creating opencode sessions from external tools with specific agent, (optionally provider and model) pre-selected.

Proposed approach
Add ?agent=&model=/ URL parameters to /session endpoint

Why it belongs
Improves serve mode flexibility and shareability

My use case
I want opencode to be integrated into my IDE, which is nvim. I'd like to have a keybinding that would open session with specific agent preselected. I want planning agent to be pre-selected in some cases, but by default build agent is selected.

Originally created by @damejeras on GitHub (Jan 4, 2026). Originally assigned to: @thdxr on GitHub. Problem When using opencode in serve mode and creating new sessions, there's no way to pre-select an agent or model via URL Use case Creating opencode sessions from external tools with specific agent, (optionally provider and model) pre-selected. Proposed approach Add ?agent=<name>&model=<provider>/<model> URL parameters to /session endpoint Why it belongs Improves serve mode flexibility and shareability My use case I want opencode to be integrated into my IDE, which is nvim. I'd like to have a keybinding that would open session with specific agent preselected. I want planning agent to be pre-selected in some cases, but by default build agent is selected.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 4, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #3517: [Feature Request] Allow provider/model selection via HTTP API for sessions - similar request for HTTP API to accept provider/model parameters
  • #6651: [FEATURE]: Dynamic model selection for subagents via Task tool - related feature for selecting models dynamically in agent workflows
  • #6232: Feature Request: Desktop app deep links (opencode://session/) - related feature for session/context sharing and linking

Feel free to ignore if these don't fully address your specific use case of URL parameters for web UI preselection.

@github-actions[bot] commented on GitHub (Jan 4, 2026): This issue might be a duplicate of existing issues. Please check: - #3517: [Feature Request] Allow provider/model selection via HTTP API for sessions - similar request for HTTP API to accept provider/model parameters - #6651: [FEATURE]: Dynamic model selection for subagents via Task tool - related feature for selecting models dynamically in agent workflows - #6232: Feature Request: Desktop app deep links (opencode://session/<id>) - related feature for session/context sharing and linking Feel free to ignore if these don't fully address your specific use case of URL parameters for web UI preselection.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4155