Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 17, 2025

Description

This PR attempts to address Issue #9320 by adding support for Cloud.ru Foundation Models (CFM) as a new provider in Roo Code. Feedback and guidance are welcome!

Changes

  • ✨ Added new Cloud.ru provider with support for GigaChat and Qwen models
  • 🏗️ Implemented CloudRuHandler extending BaseOpenAiCompatibleProvider for OpenAI-compatible API integration
  • 📝 Added model definitions for:
    • GigaChat models (Max, Pro, Plus, base, 2-Max)
    • Qwen Coder models (480B, 32B, 7B variants)
  • 🔧 Updated provider settings and type definitions to include Cloud.ru
  • ✅ Added comprehensive test coverage for the new provider
  • 🎨 Updated UI hooks to support Cloud.ru model selection

Implementation Details

The Cloud.ru provider is implemented as an OpenAI-compatible provider, allowing it to leverage existing infrastructure while providing access to Cloud.ru's Foundation Models. Users can:

  1. Select "Cloud.ru Foundation Models" from the provider dropdown
  2. Configure their Cloud.ru API key in settings
  3. Choose from available GigaChat and Qwen models
  4. Use these models for all standard Roo Code tasks (code generation, reasoning, refactoring, etc.)

Testing

  • ✅ All unit tests pass for the new CloudRuHandler
  • ✅ Type checking passes
  • ✅ Linting passes

Related Issue

Closes #9320

Checklist

  • Code follows the project's style guidelines
  • Tests have been added for new functionality
  • All tests pass
  • Documentation has been updated (model descriptions included)
  • The PR is linked to the relevant issue

Important

Adds Cloud.ru Foundation Models provider with GigaChat and Qwen models, including handler implementation, UI support, and tests.

  • Behavior:
    • Adds Cloud.ru provider with GigaChat and Qwen models support in cloudru.ts.
    • Implements CloudRuHandler in cloudru.ts for OpenAI-compatible API.
    • Updates provider-settings.ts to include Cloud.ru in provider settings and schemas.
    • Updates index.ts in api and providers to include CloudRuHandler.
    • Updates useSelectedModel.ts to support Cloud.ru model selection.
  • Models:
    • Defines GigaChat and Qwen models in cloudru.ts.
  • Testing:
    • Adds cloudru.spec.ts for testing CloudRuHandler behavior, including API key handling, model selection, message creation, and temperature configuration.
  • Misc:
    • Updates MODELS_BY_PROVIDER in provider-settings.ts to include Cloud.ru models.

This description was created by Ellipsis for 1b44fca. You can customize this summary. It will automatically update as commits are pushed.

- Add CloudRu provider with support for GigaChat and Qwen models
- Implement CloudRuHandler extending BaseOpenAiCompatibleProvider
- Add model definitions for GigaChat (Max, Pro, Plus, base, 2-Max) and Qwen Coder models
- Include comprehensive test coverage for the new provider
- Update provider settings and type definitions

Closes #9320
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 17, 2025 19:16
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 17, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review completed. Found one minor documentation issue with the test execution command.

  • Update test command comment to use correct workspace-relative path

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@dosubot dosubot bot added the enhancement New feature or request label Nov 17, 2025
@@ -0,0 +1,332 @@
// npx vitest run api/providers/__tests__/cloudru.spec.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test command in this comment will fail because tests must be run from the workspace containing the vitest dependency. According to the project's test execution rules in .roo/rules/rules.md, backend tests should be run with cd src && npx vitest run api/providers/__tests__/cloudru.spec.ts to avoid the "vitest: command not found" error.

Suggested change
// npx vitest run api/providers/__tests__/cloudru.spec.ts
// cd src && npx vitest run api/providers/__tests__/cloudru.spec.ts

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 17, 2025
@gdagil
Copy link

gdagil commented Nov 18, 2025

I'm creating PR #9326 to fix the /v1/models flow and adjust the legacy OpenAI API handling for the GigaChat model family

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add Cloud.ru Foundation Models provider

4 participants