prompty icon indicating copy to clipboard operation
prompty copied to clipboard

Authentication failure with prompty for serverless AI models

Open ciccioIelo opened this issue 1 year ago • 4 comments

When using the prompty extension with a serverless AI model (custom endpoint), an authentication error occurs with the following message: { "statusCode": 401, "message": "Auth token validation failed. Please provide a valid key or a valid AAD token" } The issue does not occur when using GitHub-provided AI model endpoints. By looking at the prompty output(verbose) I noticed that the api_key used in the API request does not match the one explicitly specified in the .prompty configuration file. I temporarily resolved the issue by modifying the executor.py file of the prompty library. I added the following lines: Image However, this fix only works when running a Python script with prompty.execute. Running the .prompty file directly still results in the same authentication error.

ciccioIelo avatar Dec 13 '24 10:12 ciccioIelo

Makes sense - I will take a look at maxing the fix in the extension.

sethjuarez avatar Jan 09 '25 17:01 sethjuarez

OK - I think I fixed this error in the latest release - it was a silly error on my part.

sethjuarez avatar Jan 14 '25 08:01 sethjuarez

@sethjuarez What was the mistake?

Manouchehri avatar Feb 25 '25 17:02 Manouchehri

I take it back... I think I fixed the issue in the lib but not the extension

sethjuarez avatar Feb 25 '25 19:02 sethjuarez