Will there be a ChatOpenRouter (or some equivalent) implementation?

Hello,

I was wondering if there was an implementation for chat models using the OpenRouter platform/API. I have viewed this link which works fine for building and testing purposes but I am not finding it helpful while deploying the application. If anyone would happen to know if there is some official implementation (either Langchain or community) in the works, I would really appreciate knowing about any related developments.

I am aware that I can likely build a custom class to interact with this but ideally I would like it to be similar to the other chat models and implement exception handling, message management for the LLM, etc., natively. I am also unsure of how to set up a feature where we can easily switch between models as we can with the API (and automatically alter the request/message formats, tool calling, and so on).

Thank you.

My understanding is that you should be able to use ChatOpenAI directly with OpenRouter as they implement OpenAI’s completions endpoint? All that’s required is updating the BaseURL.