Replies: 4 comments 2 replies
|
Open Router has become popular enough that I was thinking about adding it as a first class AI_Service like Anthropic and Groq. But I wonder which type of connection would be best to choose if I do, and presenting the user with that overwhelming list of models... I dunno. Does this difference in parameters affect anything beyond response_format? |
|
Yeah. OpenRouter is an easy way to access many different models with different architectures under a unified API (which is why I'm using it instead of directly using Gemini via Google's API). But that unified API is only accessible via the |
|
Ha! Indeed you can. You can get the complex structured outputs (using a JSON schema) from OpenAI's models if you use the unified API via OpenRouter (Direct Web Connection). That's pretty cool. (Edit: although it didn't follow my text prompt to write a story about the provided image, which is odd... It just described the image in the returned JSON. I did notice in the Gemini API docs that "When using a single image with text, place the text prompt after the image part in the contents array." That makes me think that the order that the image and text prompt are provided to the APIs matters, and if it will tend to ignore the text prompt if it receives the image after the text prompt?) |
|
It would be a while before I would be able to do that. But it's on my radar. |
Uh oh!
There was an error while loading. Please reload this page.
In the README.md in the section how to connect to OpenRouter, you might consider adding a note that if a user chooses to use the
OpenAI API Connectionthen any parameters added must follow the OpenAI API spec, and if they are using theDirect Web Connectionthen any parameters added must follow the OpenRouter API spec (unified API). This difference in API types is also noted in the OpenRouter docs here. This tripped me up for a minute when adding structured output parameters for OpenRouter.All reactions