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

Add OpenRouter Anthropic model and update model list #50

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

PierrunoYT
Copy link

Add OpenRouter Anthropic model and update model list

Changes

  1. Added OpenRouter as a new provider in lib/models.ts
  2. Updated lib/models.json to include Claude 3.5 Sonnet via OpenRouter
  3. Modified getDefaultMode function to use 'json' mode for OpenRouter

Details

New OpenRouter Provider

  • Added OpenRouter to the providerConfigs in lib/models.ts
  • Uses the OpenAI-compatible API endpoint for OpenRouter
  • Configurable with OPENROUTER_API_KEY environment variable

New Model: Claude 3.5 Sonnet via OpenRouter

  • Added "anthropic/claude-3.5-sonnet" to the models list in lib/models.json
  • Provides access to Anthropic's Claude 3.5 Sonnet model through OpenRouter

Default Mode Update

  • Updated getDefaultMode function to return 'json' for OpenRouter, similar to Fireworks

Testing

  • Ensure the OpenRouter API key is set in the environment variables
  • Test creating a client for the new OpenRouter model
  • Verify that the model appears in the UI and can be selected
  • Test interactions with the Claude 3.5 Sonnet model via OpenRouter

Notes

  • OpenRouter logo should be added to public/thirdparty/logos/ if not already present
  • Update documentation to include information about the new OpenRouter integration and how to obtain and set up an API
    key

Copy link

vercel bot commented Sep 1, 2024

Someone is attempting to deploy a commit to the E2B Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Sep 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai-artifacts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 1, 2024 10:58am

@mishushakov
Copy link
Member

Why did you:

  • Updated getDefaultMode function to return 'json' for OpenRouter, similar to Fireworks

?

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