fix(llm): default Gemini supportsParallelTools to false - #212
yablokolabs wants to merge 1 commit into
Conversation
…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).
|
Thank you @yablokolabs, and apologies for the month without a reply. The change is clean and well tested, but main has moved underneath it. The case for defaulting Gemini to So we are closing this one. If you still see merged or dropped calls with Gemini on v0.6.4, please open an issue with a captured stream and we will pick it up. A standalone |
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
supportsParallelToolsfromsupportsTools, and since Gemini supports tools, the capability is alwaystrue. The only provider that declaredfalsewassubscription-cli.This adds an explicit
supportsParallelTools?: booleanfield to the provider config entry and the user config schema. Every provider kind reads it with fallback tosupportsTools, but Gemini defaults tofalse— overriding the fallback. Users can explicitly setsupportsParallelTools: trueon a Gemini entry to opt in if their deployment supports it.Changes
src/config/llm-config.ts— newsupportsParallelTools?: booleanfield onUserLlmProviderEntry+ parsersrc/config/config-schema.ts— schema acceptance for the new fieldsrc/llm/provider/registry/provider-types.ts— new field onLlmProviderConfigEntrysrc/llm/provider/registry/register-built-in-providers.ts— all kinds useentry.supportsParallelTools ?? entry.supportsTools ?? true; Gemini usesentry.supportsParallelTools ?? falseTest coverage
7 new tests:
parseLlmProviderEntry(explicittrueandfalse), absent field staysundefined, non-boolean rejectedsupportsParallelToolstofalse, explicittrueoverride respectedVerification
npm run lintcleansrc/llm/,src/agent/,src/config/