Skip to content

Feature Request: Non-Interactive CLI Model Selection for Claude Code Integration #106

@johnib

Description

@johnib

Problem

Currently, when using --claude-code flag, users must manually select models through interactive prompts every time they start the server. This creates friction for:

  • CI/CD pipelines and automation scripts
  • Development workflows where the same models are used repeatedly
  • Quick restarts during development sessions

Current Behavior

npx copilot-api start --claude-code
# Always prompts for model selection interactively

Proposed Solution

Add --model and --small-model flags to allow non-interactive model specification:

# Specify both models directly
npx copilot-api start --claude-code --model "claude-3.5-sonnet" --small-model "claude-3.5-haiku"

# Short aliases also work
npx copilot-api start -c -m "claude-3.5-sonnet" -s "claude-3.5-haiku"

Benefits

  • Enables automation and scripting
  • Faster development iteration
  • Consistent model selection across environments
  • Maintains backward compatibility with interactive mode

Implementation Details

  • Both flags must be specified together for validation
  • Models are validated against available Copilot models
  • Falls back to interactive mode when flags are not provided
  • Comprehensive error handling with helpful messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions