Skip to content
Merged
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ python main.py --query="Go to Google and type 'Hello World' into the search bar"

You can choose the model to use by specifying the ```--model <model name>``` flag. Available options on Gemini Developer API and Vertex AI Client:

- `gemini-3.5-flash`: This is the default model.
- `gemini-3.6-flash`: This is the default model.
- `gemini-3.5-flash-lite`: A low-latency, cost-efficient model with computer use support.
- `gemini-3.5-flash`: An earlier Gemini 3.5 Flash model with computer use support.
- `gemini-2.5-computer-use-preview-10-2025`: An earlier computer use preview model.
- `gemini-3-flash-preview`: The preview version of Gemini 3 Flash.

Expand All @@ -147,7 +149,7 @@ The `main.py` script is the command-line interface (CLI) for running the browser
| `--env` | The computer use environment to use. Must be one of the following: `playwright`, or `browserbase` | No | N/A | All |
| `--initial_url` | The initial URL to load when the browser starts. | No | https://www.google.com | All |
| `--highlight_mouse` | If specified, the agent will attempt to highlight the mouse cursor's position in the screenshots. This is useful for visual debugging. | No | False (not highlighted) | `playwright` |
| `--model` | The model to use. See the "Available Models" section for more information. | No | `gemini-3.5-flash` | All |
| `--model` | The model to use. See the "Available Models" section for more information. | No | `gemini-3.6-flash` | All |

### Environment Variables

Expand Down
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def main() -> int:
)
parser.add_argument(
"--model",
default='gemini-3.5-flash',
default='gemini-3.6-flash',
help="Set which main model to use.",
)
Comment on lines 55 to 59

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To improve validation and automatically generate helpful error messages, we should restrict the --model argument to the predefined set of supported models using the choices parameter in argparse. Additionally, let's use double quotes for the default value to maintain consistency with the rest of the file.

    parser.add_argument(
        "--model",
        default="gemini-3.6-flash",
        choices=(
            "gemini-3.6-flash",
            "gemini-3.5-flash-lite",
            "gemini-3.5-flash",
            "gemini-2.5-computer-use-preview-10-2025",
            "gemini-3-flash-preview",
            "gemini-3.1-pro-preview",
        ),
        help="Set which main model to use.",
    )
References
  1. Use the choices parameter in argparse for arguments with a predefined set of valid string values to enable automatic validation and help message generation.

args = parser.parse_args()
Expand Down
Loading