chat-ui is excellent, thanks for all your amazing work here!
I have been experimenting with a model in Sagemaker and am having some issues with the model endpoint configuration. It currently requires credentials to be provided explicitly. This does work, but the ergonomics are not great for our use cases:
in development, my team uses AWS SSO and it would be great to use our session credentials and not need to update our MODELS environment variable manually every time our sessions refresh
in deployments, we would want to use an instance or task execution role to sign requests
I was able to update this area of code locally and support AWS credential resolution by switching this to use a different library aws-sigv4-fetch like so:
Yes I think that would be a great addition, especially since it's an added feature that doesn't require breaking changes 😄 Feel free to open a PR and I'll have a look!
chat-ui is excellent, thanks for all your amazing work here!
I have been experimenting with a model in Sagemaker and am having some issues with the model endpoint configuration. It currently requires credentials to be provided explicitly. This does work, but the ergonomics are not great for our use cases:
In my investigation I found this area of code https://github.com/huggingface/chat-ui/blob/eb071be4c938b0a2cf2e89a152d68305d4714949/src/lib/server/endpoints/aws/endpointAws.ts#L22-L37, which uses the
aws4fetch
library that only support signing with explicitly passed AWS credentials.I was able to update this area of code locally and support AWS credential resolution by switching this to use a different library
aws-sigv4-fetch
like so:My testing has found this supports passing credentials like today, or letting the AWS SDK resolve them through the default chain.
Would you be open to a PR with this change? Or is there a different/better/more suitable way to accomplish AWS credential resolution here?