Skip to content

fix(agents): add installVersion to BaseAgentAdapter for npm-based agents#222

Merged
8nevil8 merged 1 commit intocodemie-ai:mainfrom
DmitriyStoyanov:gemini_supported_version
Mar 19, 2026
Merged

fix(agents): add installVersion to BaseAgentAdapter for npm-based agents#222
8nevil8 merged 1 commit intocodemie-ai:mainfrom
DmitriyStoyanov:gemini_supported_version

Conversation

@DmitriyStoyanov
Copy link
Contributor

@DmitriyStoyanov DmitriyStoyanov commented Mar 19, 2026

Summary

While trying to install supported version of gemini, faced with issue that it install latest instead supported:

$ codemie install gemini --supported
Gemini CLI v0.34.0 is already installed (requested: 0.29.5 (supported))
? Reinstall with version 0.29.5 (supported)? Yes
⠴ Installing Gemini CLI v0.29.5 (supported version)...✓ @google/gemini-cli installed successfully
✔ Gemini CLI v0.34.0 installed successfully

⚠️  Note: This version (0.34.0) is newer than the supported version (0.29.5).
   You may encounter compatibility issues with the CodeMie backend.
   To install the supported version, run: codemie install gemini --supported

When running codemie install gemini --supported, the install command was falling back to install() which always installs the latest version, because installVersion() method was missing from BaseAgentAdapter.

Changes

Added installVersion(version?: string) method that:

  • Resolves 'supported' to the actual version from metadata.supportedVersion
  • Calls npm.installGlobal() with the version option

Impact

This fix applies to all npm-based agents (Gemini, OpenCode, etc.), while Claude continues to use its custom override for native installation.

Testing

Tested successfully locally

codemie install gemini --supported
Gemini CLI v0.34.0 is already installed (requested: 0.29.5 (supported))
? Reinstall with version 0.29.5 (supported)? Yes
⠙ Installing Gemini CLI v0.29.5 (supported version)...✓ @google/gemini-cli@0.29.5 installed successfully
✔ Gemini CLI v0.29.5 installed successfully

Checklist

  • Self-reviewed
  • Manual testing performed
  • Documentation updated (if needed)
  • No breaking changes (or clearly documented)

When running `codemie install gemini --supported`, the install command
was falling back to `install()` which always installs the latest version,
because `installVersion()` method was missing from BaseAgentAdapter.

Added `installVersion(version?: string)` method that:
- Resolves 'supported' to the actual version from metadata.supportedVersion
- Calls npm.installGlobal() with the version option

This fix applies to all npm-based agents (Gemini, OpenCode, etc.),
while Claude continues to use its custom override for native installation.

Generated with AI
@8nevil8 8nevil8 merged commit 11edad1 into codemie-ai:main Mar 19, 2026
5 checks passed
@DmitriyStoyanov DmitriyStoyanov deleted the gemini_supported_version branch March 19, 2026 08:34
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