feat: model selector for chat#19
Open
psrednicki wants to merge 17 commits into
Open
Conversation
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.
…ate availability with Opera Neon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
opera_list_modelstool andmodelparam toopera_chatMCP-layer support for AI model selection. Adds a new tool to list available models and an optional
modelparameter onopera_chatto select which model to use [web:26][web:29].Changes
modelparam onopera_chat— optional string passed through toOpera.dispatchAction({ action: 'chat', prompt, model });omitted from the payload when not specified so the browser uses its default.opera_list_modelstool — new read-only page tool that callsOpera.dispatchAction({ action: 'listModels' })and returns the JSON response; errors are caught and surfaced as a readable message.chrome-devtools-cli-options.tsupdated with the newmodelarg onopera_chatand the newopera_list_modelscommand entry.CDP contract
Both tools use
Opera.dispatchAction— no new CDP methods required.ActionPayloadResponse
listModels{ "action": "listModels" }{ "models": [{ "id": "string", "name": "string", "isDefault": true }] }chatwith 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
--modelapplies tochatonly — extensible to other AI commands later.opera_chatandopera_list_models.