Provider registry enables use of other providers#43
Provider registry enables use of other providers#43martinemde wants to merge 1 commit intoOlympiaAI:mainfrom
Conversation
9a68ae9 to
ed603c8
Compare
This refactoring makes it possible to support more providers than the current two (openrouter and openai) without modifying the existing interface, fallback behavior, or expectations for consumers.
ed603c8 to
6518dcc
Compare
|
This was inspired by the need for raix-bedrock, which I just published. It can work without this, but I think the API is cleaner with this change. |
|
One reason not to merge this is that it doesn't go far enough. The interface inside of It would be great if we moved enough of the complexity so that the interface was more like "register tool, tool called, chat completion, completion result" in an abstract way so that the OpenAI response structure and the bedrock structure was hidden into the OpenAI provider and bedrock provider. Right now, I only normalized the call sites but none of the params or return formats. I'll take another stab at this when I have a moment. Let me know if you don't think it's worth the effort or you wouldn't want to merge it. |
This refactoring makes it possible to support more providers than the current two (openrouter and openai) without modifying the existing interface, fallback behavior, or expectations for consumers.