Skip to content

Support effort config for Gemini CLI driver via thinkingLevel/thinkingBudget #63

@moodmosaic

Description

@moodmosaic

Summary

The effort field in swarm.json agent config is currently ignored
by the Gemini CLI driver (agent_docker_env is a no-op). Claude Code
and Codex CLI both support it.

Context

The Gemini API supports reasoning control but the CLI has no flag:

  • Gemini 3 models: thinkingLevel (minimal/low/medium/high)
  • Gemini 2.5 models: thinkingBudget (numeric token count)

The CLI only exposes this via settings.json model alias overrides.
There's an upstream feature request at google-gemini/gemini-cli#25122.

Proposed approach

Map the swarm effort value to Gemini config in agent_settings():

  1. Detect model family (3.x vs 2.5) from SWARM_MODEL
  2. Write thinkingLevel or thinkingBudget into
    ~/.gemini/settings.json before each session
  3. Mapping: lowLOW, mediumMEDIUM,
    highHIGH, none/minimalMINIMAL (3.x only)

Alternatively, wait for upstream CLI flag support
(google-gemini/gemini-cli#25122) and use that directly.

Motivation

Without effort control, Gemini 3 agents default to HIGH thinking
on every request, even trivial ones like git status or lock file
checks. This wastes thinking tokens and adds latency on simple
tasks. Conversely, users running complex audits can't request
deeper reasoning. The other two drivers already support this,
making Gemini the odd one out in mixed-driver swarms where the
same effort value is set across all agents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions