Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your-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
Expand Down
12 changes: 12 additions & 0 deletions src/webwright/config/model_gemini_openrouter.yaml
Original file line number Diff line number Diff line change
@@ -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