Is there any workaround how this Client Library could be used?
You will likely need to talk to the endpoints directly for now but there is a native runtime in EAP. https://developer.atlassian.com/platform/forge/runtime-reference/native-nodejs-runtime/. It might work with the library
Another problem you will run into is the 25 second time limit on forge functions. OpenAI calls I’m doing for a non-forge project take around 10-40 seconds each. Most of them are above or very close to 25 seconds.
Unfortunately native runtime is not yet available for the production (and I need the production env to be able to distribute the app to interested users).
And yes, currently looking into Async Events to solve the 25s limit.