Skip to content
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

FEAT: Add OpenRouter model provider #35

Conversation

charlwillia6
Copy link

Adds the OpenRouter model provider to Continue. This provides users with a single API to access a wide range of language models from various providers.

Description ✏️

The OpenRouter integration includes:

  • Configurable parameters for model selection, context length, and other settings.
  • Automatic detection and display of available models from OpenRouter.
  • Updated documentation for OpenRouter integration.

This feature enhances the flexibility and choice of language models available to PearAI users.

image
image
image
image
image
image
image
image
image
image
image
image

Testing

Testing the changes are easy. Just download the PR and follow the guidelines here: https://github.com/trypear/pearai-app/blob/main/CONTRIBUTING.md

Follow the screenshots.

Get a OpenRouter API key here

This has not been added to the documentation yet.

Checklist ✅

  • I have added screenshots (if UI changes are present).
  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).

Adds the OpenRouter model provider to Continue. This provides users with a single API to access a wide range of language models from various providers.

The OpenRouter integration includes:

- Configurable parameters for model selection, context length, and other settings.
- Automatic detection and display of available models from OpenRouter.
- Updated documentation for OpenRouter integration.

This feature enhances the flexibility and choice of language models available to Continue users.
@tobitege
Copy link

Great job, thank you! 👍

Copy link

@Fryingpannn Fryingpannn left a comment

Choose a reason for hiding this comment

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

sorry but gonna hold off on this PR until after inventory

@@ -86,3 +86,5 @@ Write-Output "`nInstalling docs dependencies..." -ForegroundColor White
Push-Location docs

npm install

Pop-Location

Choose a reason for hiding this comment

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

is this needed 🤔

@@ -103,26 +106,6 @@ function ConfigureProvider() {
[modelInfo, providerName],
);

const handleContinue = () => {

Choose a reason for hiding this comment

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

why dis deleted

@@ -118,6 +119,10 @@ function App() {
const dispatch = useDispatch();
useSetup(dispatch);

useEffect(() => {
console.log("Is overlay? ", (window as any).isOverlayPearAI);

Choose a reason for hiding this comment

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

to remove

Copy link
Author

Choose a reason for hiding this comment

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

The console.log was already there. I just put it into a useEffect so it would stop filling up the debugger. I will remove it.

@@ -32,6 +32,7 @@
"@tiptap/react": "^2.1.13",
"@tiptap/starter-kit": "^2.1.13",
"@tiptap/suggestion": "^2.1.13",
"axios": "^1.7.7",

Choose a reason for hiding this comment

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

we should prob not use axios, use fetch directly

@charlwillia6
Copy link
Author

I will redo this PR in the future so that it is easier to review with only the specific changes needed.

@charlwillia6 charlwillia6 mentioned this pull request Nov 11, 2024
3 tasks
@charlwillia6
Copy link
Author

This PR is replaced by #148

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.

3 participants