Skip to content

feat: chat model selector#15

Open
psrednicki wants to merge 14 commits into
mainfrom
feat/model-selector-cli
Open

feat: chat model selector#15
psrednicki wants to merge 14 commits into
mainfrom
feat/model-selector-cli

Conversation

@psrednicki
Copy link
Copy Markdown
Contributor

Add --model flag to chat and new models command

Adds model selection to the CLI chat feature. Users can pick an AI model with --model and discover available models with the new models command [web:2][web:6].

Changes

  • --model <id> flag on chat — optional flag parsed from any position in the args; omitted from the CDP payload when not specified so the browser uses its default.
  • models command — calls opera_list_models, formats a bulleted list with * marking the default; returns a clear error when the browser doesn't support listing.
  • UNSUPPORTED_OPERATION error code added to CdpError.
  • Help text updated for chat (documents --model) and new models command.
  • Tests — 5 cases for parseChatArgs covering flag positioning, missing value, and empty prompt.
  • Spec — specs/chat-model-selector.md documents CLI UX, CDP contract, and MCP layer design.

Usage

opera-browser-cli chat --model claude-sonnet-4 "Summarize this page"
opera-browser-cli models

Notes

  • Companion MCP branch: feat/model-selector in opera-devtools-mcp adds opera_list_models tool and model param on opera_chat.
  • --model applies to chat only — extensible to other AI commands later.
  • No client-side model persistence; each invocation is stateless.

psrednicki and others added 8 commits May 25, 2026 17:38
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@psrednicki psrednicki requested a review from macieju-opera May 27, 2026 09:15
@psrednicki psrednicki self-assigned this May 27, 2026
@psrednicki psrednicki added the enhancement New feature or request label May 27, 2026
Comment thread src/cli.ts Outdated
Comment thread src/cli.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants