Skip to content

feat: model selector for chat#19

Open
psrednicki wants to merge 17 commits into
mainfrom
feat/chat-model-selector-2
Open

feat: model selector for chat#19
psrednicki wants to merge 17 commits into
mainfrom
feat/chat-model-selector-2

Conversation

@psrednicki
Copy link
Copy Markdown
Contributor

Add opera_list_models tool and model param to opera_chat

MCP-layer support for AI model selection. Adds a new tool to list available models and an optional model parameter on opera_chat to select which model to use [web:26][web:29].

Changes

  • model param on opera_chat — optional string passed through to Opera.dispatchAction({ action: 'chat', prompt, model }); omitted from the payload when not specified so the browser uses its default.
  • opera_list_models tool — new read-only page tool that calls Opera.dispatchAction({ action: 'listModels' }) and returns the JSON response; errors are caught and surfaced as a readable message.
  • CLI options — chrome-devtools-cli-options.ts updated with the new model arg on opera_chat and the new opera_list_models command entry.

CDP contract

Both tools use Opera.dispatchAction — no new CDP methods required.

ActionPayloadResponse

listModels

{ "action": "listModels" }
{ "models": [{ "id": "string", "name": "string", "isDefault": true }] }

chat with model

{ "action": "chat", "prompt": "string", "model": "string" }

Same as current chat response.

Usage

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

Notes

  • --model applies to chat only — extensible to other AI commands later.
  • No client-side model persistence; each invocation is stateless.
  • Companion CLI support stays aligned with the MCP contract through opera_chat and opera_list_models.

psrednicki and others added 14 commits May 25, 2026 17:35
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…CDP method

Co-authored-by: Cursor <cursoragent@cursor.com>
- Introduced the `opera_list_models` tool to list available AI models for Opera chat.
- Updated README and tool reference documentation to reflect the addition of the new tool and its parameters.
- Added optional `model` parameter to the `opera_chat` tool documentation.
…y availability

- Enhanced the description of the `opera_list_models` tool to specify that it is only available when connected to Opera Neon.
@psrednicki psrednicki changed the title feat: model selector for chat module feat: model selector for chat May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant