Closed michabbb closed 2 months ago
There might be something useful in the logs for Advanced Paste. /bugreport
okay, found an error in the logs:
[18:43:12.5813920] [Error] AICompletionsHelper::AIFormatString
GetAICompletion failed
You have insufficient permissions for this operation. Missing scopes: model.request. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Member, Owner), and if you're using a restricted API key, that it has the necessary scopes.
Status: 401 (Unauthorized)
Content:
{
"error": {
"message": "You have insufficient permissions for this operation. Missing scopes: model.request. Check that you have the correct role in your organization (Reader, Writer, Owner) and project (Member, Owner), and if you're using a restricted API key, that it has the necessary scopes.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
so, I don´t know why "model.request" is needed here. but it looks like the minimum scopes that must be set are these:
Usually, a "read-only" token should be enough when talking to any model. i would be happy if the author of "Advanced Paste" could clarify which minimum settings are needed and also put that info on the docs page.
@craigloewen-msft , any input here?
My fault. I don´t know what you can do with a "read-only" token, but you need at least the scopes you see in my screenshot to chat with the model. I guess I misunderstood the definition of "read-only" here 😏
Note: if you change the scopes of your key, it can take several minutes till these changes become active. That´s annoying because you cannot test these scopes by trial and error. It´s faster to delete the old key and create a new one because the new one is active immediately.
Anyway: It´s still a good idea to let the user know, which scopes the key needs 😏
Microsoft PowerToys version
v0.81.0
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
Advanced Paste
Steps to reproduce
setup an openai api token, use any prompt to change the copied text
✔️ Expected Behavior
get result from openai
❌ Actual Behavior
power-toys always says: Invalid API key or endpoint
without knowing which endpoint is used here, I don´t know how to debug this.
Other Software
No response