Skip to content

Conversation

MichalKalita
Copy link
Contributor

@MichalKalita MichalKalita commented Jun 4, 2025

Closes: https://github.com/apify/ai-team/issues/16

I created main part with proxy to Open Router.

It exists as actor in https://console.apify.com/actors/sxck9mShRCfmMOZ8S/source

It works simply, just make proxy for /api/v1 into open router servers. Stream response directly to request. And in the end read cost and call Actor.charge. Actors cannot have dynamic charge prices, so exist only one event with price $0.001 and real cost is made by count.

@MichalKalita MichalKalita marked this pull request as ready for review June 9, 2025 07:33
Copy link
Member

@jirimoravcik jirimoravcik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, had some comments

@jirispilka
Copy link

jirispilka commented Jun 9, 2025

@MichalKalita please add this in the PR description to automatically close the issue: Closes: https://github.com/apify/ai-team/issues/16

Copy link

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I like that you used FastifyProxy, it makes code really simple.

I left a couple of minor comments.

@MichalKalita
Copy link
Contributor Author

I added a readme with examples and a 10% fee. I hope all feedback was applied to the code.

Copy link

@jirispilka jirispilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I noticed there are some unresolved comments or questions from Jiri M. If you’ve already addressed them, I’d suggest marking them as resolved.

@jirispilka
Copy link

@MichalKalita for reference: Apify writing style

Copy link

@MQ37 MQ37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good job 👍 Only two minor comments

@MichalKalita MichalKalita changed the title Proxy feat: open router proxy Jun 12, 2025
@MichalKalita MichalKalita merged commit 3adc26b into main Jun 12, 2025
1 check passed
@MichalKalita MichalKalita deleted the proxy branch July 10, 2025 12:09
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.

4 participants