Skip to content

Adding nebius provider to roocode #3807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

arafatkatze
Copy link

@arafatkatze arafatkatze commented May 22, 2025

Related GitHub Issue

cline#2789

Closes: #

Description

This PR adds nebius provider to roocode

Test Procedure

  • Run this PR with a debugger and set the API key

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

Documentation Updates

Additional Notes

Get in Touch


Important

Adds Nebius as a new provider with model selection and configuration support across the codebase.

  • Behavior:
    • Adds nebius as a new provider option in ApiOptions.tsx, ModelPicker.tsx, and constants.ts.
    • Implements Nebius component in providers/Nebius.tsx for handling Nebius-specific settings.
    • Updates useSelectedModel.ts to support Nebius model selection.
  • Schemas and Types:
    • Updates providerNames and providerSettingsSchema in schemas/index.ts to include nebius.
    • Adds Nebius-related types and default model info in api.ts.
  • Validation:
    • Adds validation for nebiusApiKey in validate.ts.
  • Misc:
    • Updates providerSettingsEntrySchema and providerSettingsSchemaDiscriminated in schemas/index.ts to include nebius.
    • Adds Nebius to MODELS_BY_PROVIDER in constants.ts.

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

@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 22, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Review] to TEMP in Roo Code Roadmap May 26, 2025
@daniel-lxs daniel-lxs moved this from TEMP to PR [Needs Review] in Roo Code Roadmap May 27, 2025
Copy link
Collaborator

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Hey @arafatkatze, Thank you for your contribution!

I left a couple of points that would be great to address before we proceed with your PR.

I also noticed that the translations are missing, but I can probably help you with that later.

Let me know if you have any questions or want to discuss my suggestions further!


const computerModels = Array.from(COMPUTER_USE_MODELS)

// Process the model info from the response
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we use Zod to validate the API response like we do with OpenRouter? This would let us know if the structure of the data changes in the future and make the code more robust against unexpected API responses. Currently, if the API returns a different structure, the code might silently fail or produce incorrect results.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The new provider probably could use have some tests, you could use the OpenRouter ones as a base for this. Tests would help ensure the provider works correctly and catches any regressions in the future.

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap May 29, 2025
@arafatkatze
Copy link
Author

@daniel-lxs Thanks for the message. I might not have the bandwidth to fix all of those ideas.
It would be ideal if you can just take over this PR and take it to the finish line.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels May 29, 2025
arafatkatze and others added 4 commits May 29, 2025 12:52
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
- Fix typo in Nebius component (was using litellmApiKey)
- Fix inconsistent default base URL between UI and API handler
- Add Zod validation for Nebius API responses
- Add comprehensive unit tests for Nebius provider and fetcher
- Improve error handling with schema validation
@daniel-lxs daniel-lxs force-pushed the arafatkatze/adding-nebius-provider-to-roocode branch 2 times, most recently from 5a02fc1 to 0d38b54 Compare May 29, 2025 18:41
@daniel-lxs
Copy link
Collaborator

I created a new PR for this #4116

@daniel-lxs daniel-lxs closed this May 29, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap May 29, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PR - Draft / In Progress size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants