⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

added support for openrouter#30

Open
Guido1Alessandro1Trevisan wants to merge 3 commits intobrowser-use:mainfrom
Guido1Alessandro1Trevisan:added-openrouter
Open

added support for openrouter#30
Guido1Alessandro1Trevisan wants to merge 3 commits intobrowser-use:mainfrom
Guido1Alessandro1Trevisan:added-openrouter

Conversation

@Guido1Alessandro1Trevisan

Added support for any llm by subclassing ChatOpenAI.

@pyoneerC
Copy link
Contributor

  • maybe check if the key is actually there before trying to use it

  • looks like some of the error messages are kind of saying the same thing twice

  • might be good to throw in some tests, like what happens if one key is missing or both

  • could add a short note in the code saying what that new class is for

basically it's good, just needs a little cleanup and maybe a test or two

@Guido1Alessandro1Trevisan
Copy link
Author

@pyoneerC The code now checks the key using os.getenv and returns a single error message (instead of two) if the key is set to None. I added a brief note in the Openrouter class to explain its purpose. I tested the code for cases where one key is missing or both are missing, but I feel like adding a test for a missing key might be overkill. Should I perform the test when instantiating the class or when running the CLI command?

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