Skip to content

Add model settings for Gemini 3.1 Pro Preview and Flash-Lite#5166

Open
Cyberfilo wants to merge 1 commit into
Aider-AI:mainfrom
Cyberfilo:feat/add-gemini-3-1-model-settings
Open

Add model settings for Gemini 3.1 Pro Preview and Flash-Lite#5166
Cyberfilo wants to merge 1 commit into
Aider-AI:mainfrom
Cyberfilo:feat/add-gemini-3-1-model-settings

Conversation

@Cyberfilo
Copy link
Copy Markdown
Contributor

Summary

Adds entries to aider/resources/model-settings.yml for the recently released Gemini 3.1 Pro Preview and Gemini 3.1 Flash-Lite models across three providers: native gemini/, vertex_ai/, and openrouter/google/.

These models already have pricing and context-window metadata in litellm's model_prices_and_context_window.json (the upstream aider pulls from at ModelInfoManager.MODEL_INFO_URL), but were missing the project-side settings (edit_format, weak_model_name, accepts_settings, etc.). Without explicit settings, aider falls back to defaults that don't match the diff-fenced edit format the 3.x Gemini line expects, so users have to override per-model on the CLI.

Models added

Provider Model
gemini/ gemini-3.1-pro-preview
gemini/ gemini-3.1-flash-lite
vertex_ai/ gemini-3.1-pro-preview
vertex_ai/ gemini-3.1-flash-lite
openrouter/google/ gemini-3.1-pro-preview
openrouter/google/ gemini-3.1-flash-lite

Settings shape

Mirrors the existing gemini-3-pro-preview / gemini-3-flash-preview block:

  • edit_format: diff-fenced (the 3.x line's preferred edit grammar)
  • use_repo_map: true
  • overeager: true
  • accepts_settings: [\"thinking_tokens\"]
  • Pro variants route to flash-lite for weak_model_name (and editor_model_name on Vertex), matching the cost-tiered weak-model pattern used elsewhere in the file.

Test plan

  • YAML validity: `python -c "import yaml; yaml.safe_load(open('aider/resources/model-settings.yml'))"` parses cleanly (363 entries total).
  • Diff is purely additive: 42 lines of YAML in one block + 1 line in HISTORY.md under `### main branch`. No existing entry modified.

Notes

I considered also adding the -customtools and -image-preview variants of gemini-3.1-pro-preview that litellm tracks, but skipped them — they're niche variants without a clear edit-flow use case in aider. Happy to add if a maintainer wants them in.

Adds entries to aider/resources/model-settings.yml for the
gemini-3.1-pro-preview and gemini-3.1-flash-lite models across the
gemini/, vertex_ai/, and openrouter/google/ providers. These models
already have pricing/context-window metadata in litellm's model cost
map (the upstream that aider pulls from) but were missing the
project-side settings (edit_format, weak_model_name, etc.), so
aider falls back to defaults that are wrong for the diff-fenced
edit format the 3.x line expects.

The configuration mirrors the existing gemini-3-pro-preview /
gemini-3-flash-preview entries: diff-fenced edit format, repo map
enabled, thinking_tokens accepted, with the pro variant routed
through flash-lite for weak/editor model duties.

Also adds a HISTORY.md entry under the main branch section.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 22, 2026

CLA assistant check
All committers have signed the CLA.

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.

2 participants