From 77bd0d206986da485779b0d77e411a1c7c194629 Mon Sep 17 00:00:00 2001 From: Varun Nuthalapati Date: Thu, 28 May 2026 23:24:11 -0700 Subject: [PATCH] docs: document Gemini and other model support via OpenRouter Issue #18 asks if Gemini is supported. It is, via OpenRouter, but this was undocumented. Add a note to the README and a model_gemini_openrouter.yaml example config file. Closes #18 --- README.md | 25 +++++++++++++++++++ .../config/model_gemini_openrouter.yaml | 12 +++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/webwright/config/model_gemini_openrouter.yaml diff --git a/README.md b/README.md index 22bd91e..f28f8f9 100644 --- a/README.md +++ b/README.md @@ -206,6 +206,31 @@ python -m webwright.run.cli \ | `--task-id` | Output subfolder name. | | `-o` | Output directory. | +### Other models via OpenRouter + +Any model accessible through [OpenRouter](https://openrouter.ai/) — including Gemini, Mistral, Llama, and others — works by using `model_class: openrouter` and setting `model_name` to the OpenRouter model ID. A ready-to-use config for Gemini is included: + +```bash +export OPENROUTER_API_KEY= +python -m webwright.run.cli \ + -c base.yaml -c model_gemini_openrouter.yaml \ + -t "Search for flights from SEA to JFK on 2026-08-15 to 2026-08-20" \ + --start-url https://www.google.com/flights \ + --task-id demo_gemini \ + -o outputs/default +``` + +To use a different OpenRouter model, override `model.model_name` inline: + +```bash +python -m webwright.run.cli \ + -c base.yaml -c model_openrouter.yaml \ + model.model_name=mistralai/mistral-large \ + -t "..." -o outputs/default +``` + +Available config files in `src/webwright/config/`: `model_openai.yaml`, `model_claude.yaml`, `model_openrouter.yaml`, `model_gemini_openrouter.yaml`. + --- ## 🔌 Use as a Plugin diff --git a/src/webwright/config/model_gemini_openrouter.yaml b/src/webwright/config/model_gemini_openrouter.yaml new file mode 100644 index 0000000..614bc42 --- /dev/null +++ b/src/webwright/config/model_gemini_openrouter.yaml @@ -0,0 +1,12 @@ +# Model modifier — Gemini via OpenRouter. +# +# Stack on top of base.yaml or local_browser.yaml: +# python -m webwright.run.cli -c base.yaml -c model_gemini_openrouter.yaml ... +# python -m webwright.run.cli -c base.yaml -c local_browser.yaml -c model_gemini_openrouter.yaml ... +# +# Required env: OPENROUTER_API_KEY. + +model: + model_class: openrouter + model_name: google/gemini-2.0-flash + openrouter_endpoint: https://openrouter.ai/api/v1/chat/completions