Skip to content

Improve opencode agent startup DX with provider and model selection #89

@bdougie

Description

@bdougie

Problem

When running tapes start opencode, the agent fails to start properly. OpenCode is designed to work with multiple LLM providers and models, but the current startup logic doesn't adequately handle provider configuration and model selection. This creates a poor developer experience.

Current Behavior

  • tapes start opencode attempts to launch the OpenCode agent
  • OpenCode requires specific provider and model configuration to function
  • No UI/CLI feedback for users to select providers and models
  • Startup may fail silently or with unclear error messages
  • No guidance on how to configure OpenCode for different providers

Expected Behavior

  • Users can run tapes start opencode and be prompted to select a provider (e.g., OpenAI, Anthropic, Ollama, etc.)
  • Users can select or configure which model to use with the chosen provider
  • Credentials for the selected provider are verified/requested as needed
  • Clear error messages and setup guidance if configuration is incomplete
  • Save provider/model preferences for future runs

Related Issues

Related Branch

  • feat/tapes-start-agents - Initial agent startup framework

Implementation Approach

  1. Create interactive provider selection CLI during opencode startup
  2. Persist provider/model preferences in config
  3. Validate credentials for selected provider
  4. Generate appropriate configuration for OpenCode based on selection
  5. Provide helpful error messages for missing configuration

Related Code

  • OpenCode startup: cmd/tapes/start/start.go:188-191
  • Config structure: pkg/config/types.go
  • Agent launch logic: cmd/tapes/start/start.go:152-219

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions