bytedance / bytedance/trae-agent
openai does not work
- Dominant language
- Python
- Stars
- 12.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
### What is your question?
I tried to use trae-cli on Windows(MINGW64). Both trae_config.json and export OPENAI_API_KEY was set but it does not work. How can I track this issue? The API key has no issue.
```
OpenAI API call failed: Error code: 401 - {'error': {'message': "You have insufficient permissions for this operation. Missing scopes: api.responses.write. 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': None, 'code': None}} will sleep for 12 seconds and will retry.
```
### Additional information that you believe is relevant to this question
_No response_
Contributor guide
Research direction
Start by reproducing the failure on Windows with MINGW64 using the reported trae_config.json and OPENAI_API_KEY setup. Trace the CLI's OpenAI request path and verify whether the 401 is caused by the key's required api.responses.write scope. Done means the cause and required configuration or permissions are documented and the request succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100