Skip to content
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

Disable transforming requests by default, unless configured accordingly. #4

Open
may opened this issue Jun 19, 2024 · 0 comments
Open

Comments

@may
Copy link

may commented Jun 19, 2024

If I'm reading the help correctly, OpenRouter is now transforming requests by default.

To prevent this, we need to modify lib/open_router/client.rb, line 40, to always send an empty array for the transforms parameter (unless, obviously, the user has specified a transformer).

OLD:
parameters[:transforms] = transforms if transforms.any?

NEW:
parameters[:transforms] = transforms

The method signature sets transforms to an empty array by default, which is what we need.

https://openrouter.ai/docs/transforms

Note: All OpenRouter models default to using middle-out, unless you exclude this transform by e.g. setting transforms: [] in the request body.

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

No branches or pull requests

1 participant