Problem
OpenCode currently only supports GitLab's agentic chat models (duo-chat-*). GitLab's Duo Agent Platform (DAP) provides server-side agentic workflow models (duo-workflow-*) that drive the agentic loop via the Duo Workflow Service (DWS) WebSocket protocol. These models need to be integrated into OpenCode so users can select and use them alongside existing chat models.
Proposal
- Bump
@gitlab/gitlab-ai-provider to 4.0.0 which includes GitLabWorkflowLanguageModel, GitLabModelDiscovery, GitLabModelCache, and isWorkflowModel() APIs
- Add dynamic model discovery that detects the user's GitLab project namespace and queries available DAP models
- Add a model selection picker when multiple workflow models are available, with file-based caching for preferences
- Wire DWS tool execution through OpenCode's existing permission-gated tool system
- Support OAuth instance matching with URL normalization for self-hosted GitLab instances
- Handle
finish event token counting for workflow models
Acceptance criteria
Problem
OpenCode currently only supports GitLab's agentic chat models (
duo-chat-*). GitLab's Duo Agent Platform (DAP) provides server-side agentic workflow models (duo-workflow-*) that drive the agentic loop via the Duo Workflow Service (DWS) WebSocket protocol. These models need to be integrated into OpenCode so users can select and use them alongside existing chat models.Proposal
@gitlab/gitlab-ai-providerto4.0.0which includesGitLabWorkflowLanguageModel,GitLabModelDiscovery,GitLabModelCache, andisWorkflowModel()APIsfinishevent token counting for workflow modelsAcceptance criteria
duo-workflow*models from the model pickergitlab-prefix to minimize upstream footprint