Skip to content

fix(llm): default Gemini supportsParallelTools to false - #212

Open
yablokolabs wants to merge 1 commit into
AtomicBot-ai:mainfrom
yablokolabs:fix/gemini-parallel-tools-flag
Open

fix(llm): default Gemini supportsParallelTools to false#212
yablokolabs wants to merge 1 commit into
AtomicBot-ai:mainfrom
yablokolabs:fix/gemini-parallel-tools-flag

Conversation

@yablokolabs

Copy link
Copy Markdown
Contributor

Summary

Follow-up to PR #207 (fixes #104). The review on #207 flagged that the provider-capability half of the fix is currently inert for Gemini — every built-in provider kind sets supportsParallelTools from supportsTools, and since Gemini supports tools, the capability is always true. The only provider that declared false was subscription-cli.

This adds an explicit supportsParallelTools?: boolean field to the provider config entry and the user config schema. Every provider kind reads it with fallback to supportsTools, but Gemini defaults to false — overriding the fallback. Users can explicitly set supportsParallelTools: true on a Gemini entry to opt in if their deployment supports it.

Changes

  • src/config/llm-config.ts — new supportsParallelTools?: boolean field on UserLlmProviderEntry + parser
  • src/config/config-schema.ts — schema acceptance for the new field
  • src/llm/provider/registry/provider-types.ts — new field on LlmProviderConfigEntry
  • src/llm/provider/registry/register-built-in-providers.ts — all kinds use entry.supportsParallelTools ?? entry.supportsTools ?? true; Gemini uses entry.supportsParallelTools ?? false

Test coverage

7 new tests:

  • Config: round-trip through parseLlmProviderEntry (explicit true and false), absent field stays undefined, non-boolean rejected
  • Registry: Gemini defaults supportsParallelTools to false, explicit true override respected

Verification

  • npm run lint clean
  • 909 tests pass across src/llm/, src/agent/, src/config/

…alse

The previous fix (PR AtomicBot-ai#207) threaded provider capabilities through to
the parallel_tool_calls wire, but every built-in provider kind set
supportsParallelTools from supportsTools — so Gemini (which supports
tools) always got true, and the capability term was inert for the exact
use case issue AtomicBot-ai#104 describes.

This adds an explicit supportsParallelTools?: boolean field to
LlmProviderConfigEntry and the user config schema. Every provider kind
reads it with fallback to supportsTools, but Gemini defaults to false
overriding that fallback. Users can explicitly set supportsParallelTools:
true on a Gemini entry to opt in.

7 new tests (3 config round-trip, 2 registry Gemini default/override,
2 rejection).
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.

maxParallelToolCalls=1 still sends parallel_tool_calls: true to OpenAI-compatible providers

1 participant