-
Notifications
You must be signed in to change notification settings - Fork 9
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
Added support for OpenRouter & Generic Models #203
Conversation
Hi, thanks for the idea and I like the Was just creating an API key for openrouter, was running the example you pushed and got this error:
does it work for you? btw, this should fix the codestyle issues in the pipeline:
or to run the entire quality pipeline locally:
|
Could you add var_dump($data) just before line 54 in src/Bridge/OpenRouter/Client.php and run again? Inside the if statement just before the "throw new". Could be a bunch of different errors (auth, out of credits, servers down, etc...). I am working on a better way to report errors to the user (for all providers), I will make it a separate pull request. Yes I will run the linter, thanks for the heads up. |
You are right, just tried it again with The error handling is something to improve in general. I would love to also have a more generalistic approach, but also the error responses depend on the specific model and platform. so a combination could be worth exploring 🤔 like a better default error handling and an extension point per platform/model that enables bridges to fine-tune specifics of error handling. |
So, all in all, thanks for the PR, happy to merge once the pipeline is green :) 👍 |
Should be good to merge now 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rglozman! 👍
Added support for OpenRouter which hosts over 300 models. This includes support for models from every provider into one easy to use API.
I created an example using Gemini (free model hosted by google), updated the .env, and the README.